2019-01-18 18:03:45 +01:00
< div [ formGroup ] = " form " class = "row dataset-profile-editor" >
< h4 style = "font-weight: bold" class = "col-12" > {{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.TITLE' | translate}}< / h4 >
< mat-form-field class = "col-md-3" >
< input matInput type = "text" placeholder = "{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.ID' | translate}}" formControlName = "id" >
< / mat-form-field >
< mat-form-field class = "col-md-3" >
< input matInput type = "text" placeholder = "{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.TITLE' | translate}}" formControlName = "title" >
< / mat-form-field >
< mat-form-field class = "col-md-3" >
< mat-select placeholder = "{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.PAGE' | translate}}" formControlName = "page" required >
< mat-option * ngFor = "let pageGroup of form.root.get('pages')['controls'];" [ value ] = " pageGroup . get ( ' id ' ) . value " > {{pageGroup.get('title').value}}< / mat-option >
< / mat-select >
< / mat-form-field >
< mat-form-field class = "col-md-3" >
< input matInput type = "number" placeholder = "{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.ORDER' | translate}}" formControlName = "ordinal" >
< / mat-form-field >
<!-- <div class="col - md - 6">
< label > Default Visibility< / label >
< mat-radio-group formControlName = "defaultVisibility" class = "full-width" >
< mat-radio-button [ value ] = " true " > true< / mat-radio-button >
< mat-radio-button [ value ] = " false " > false< / mat-radio-button >
< / mat-radio-group >
< / div > -->
< h4 style = "font-weight: bold" class = "col-12" > {{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.FIELDS-TITLE' | translate}}< / h4 >
< div class = "col-12" >
< mat-card class = "field-card" * ngFor = "let fieldControl of form.get('fieldSets')['controls'] let i=index;" >
< div class = "row" >
< mat-card-title class = "col-12" > {{i + 1}}. {{getFieldTile(fieldControl, i)}}
< button mat-icon-button type = "button" class = "btn btn-sm" style = "margin-left:5px;" ( click ) = " deleteFieldSet ( i ) ; " >
< mat-icon > delete< / mat-icon >
< / button >
< / mat-card-title >
< app-dataset-profile-editor-composite-field-component class = "col-12" [ form ] = " fieldControl " [ indexPath ] = " indexPath + ' cf ' + i " > < / app-dataset-profile-editor-composite-field-component >
< / div >
< / mat-card >
< / div >
< div class = "col-12" > < button mat-button class = "full-width" ( click ) = " addField ( ) " > {{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.ACTIONS.ADD-FIELD' | translate}}< / button > < / div >
< h4 style = "font-weight: bold" class = "col-12" > {{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.SUB-SECTIONS-TITLE' | translate}}< / h4 >
< div * ngIf = "dataModel.sections.length > 0" class = "col-12" >
< mat-expansion-panel * ngFor = "let section of dataModel.sections; let i=index;" # panel >
< mat-expansion-panel-header >
< div class = "row" >
< span class = "col" > {{i + 1}}. {{form.get('sections').get(''+i).get('title').value}}< / span >
2019-01-28 13:18:48 +01:00
< button mat-icon-button type = "button" class = "col-auto" ( click ) = " DeleteSectionInSection ( i ) ; " >
2019-01-18 18:03:45 +01:00
< mat-icon > delete< / mat-icon >
< / button >
< / div >
< / mat-expansion-panel-header >
< div id = "{{indexPath + 's' + i}}" * ngIf = "panel.expanded" class = "row" >
< app-dataset-profile-editor-section-component class = "col-12" [ form ] = " form . get ( ' sections ' ) . get ( ' ' + i ) " [ dataModel ] = " section " [ indexPath ] = " indexPath + ' s ' + i " > < / app-dataset-profile-editor-section-component >
< / div >
< / mat-expansion-panel >
< / div >
< div class = "col-12" > < button mat-button class = "full-width" ( click ) = " addSectioninSection ( ) " > {{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.ACTIONS.ADD-SUB-SECTION' | translate}}< / button > < / div >
< / div >