Skip to content

Commit

Permalink
Submission Button on Previews removed
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofreitas96 committed Jun 2, 2020
1 parent a6220dd commit a0ba02c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions frontend/src/app/components/view-template.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
Edit Entity
</button>
</div>
<div class="example-button-row">
<button type="button" class="btn btn-primary-outline pull-right" (click)="editTemplate();"><i class="fa fa-plus"></i>
Edit Template
</button>
</div>
</div>

<div class="row" *ngIf="!hasTemplate" style="align-content: center">
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/edit-template/edit-template.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*ngIf="load"
[form]= "form"
[options]='jsonFormOptions'
[framework]="'bootstrap-4'">
[framework]="'bootstrap-4'"
[widgets]= "yourWidgets">
</json-schema-form>
</div>

Expand Down
16 changes: 10 additions & 6 deletions frontend/src/app/edit-template/edit-template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {MyServiceService} from '../service/my-service.service';
import {ActivatedRoute} from '@angular/router';
import {Location} from '@angular/common';
import {ComboBoxComponent} from '../combo-box/combo-box.component';
import {NoneComponent} from 'angular7-json-schema-form';

@Component({
selector: 'app-edit-template',
Expand Down Expand Up @@ -40,6 +41,9 @@ export class EditTemplateComponent implements OnInit {

chosenprops = [];

yourWidgets = {
submit: NoneComponent,
};
copyProp;

goBack() {
Expand All @@ -49,13 +53,13 @@ export class EditTemplateComponent implements OnInit {
ngOnInit() {
this.route.paramMap.subscribe(params => {
this.uid = params.get('id');
console.log('Testing 2:');
console.log(this.uid);
this.load = false;
// this.getSchemaNode(this.uid);
this.getNodeTemplate(this.uid);
console.log('Testing:');
console.log(this.form);
this.route.queryParamMap.subscribe(query => {
this.template = JSON.parse(query.get('template'));
this.getSchemaNodeWithTemplate(this.uid, this.template);
});
// this.getNodeTemplate(this.uid);

});
}
Expand Down Expand Up @@ -112,7 +116,7 @@ export class EditTemplateComponent implements OnInit {
this.schemaname = schemaName;
properties[this.uid] = {
$ref: ref,
title: 'Editing'
title: 'Entity Edition Preview'
};
jsonSchema.properties = properties;
jsonSchema.desc = 'Description';
Expand Down

0 comments on commit a0ba02c

Please sign in to comment.