@ -89,11 +89,10 @@
< div class = "col-auto mb-3" >
< button mat-button class = "action-btn" type = "button" ( click ) = " addField ( sectionIndex ) " [ disabled ] = " formGroup . disabled " > {{'DMP-BLUEPRINT-EDITOR.ACTIONS.ADD-FIELD' | translate}}< / button >
< / div >
< / div >
< div class = "row" >
< div cdkDropList class = "col-12 mt-3" ( cdkDropListDropped ) = " dropFields ( $ event , sectionIndex ) " >
< ng-container * ngFor = "let field of section.get('fields').controls; let fieldIndex=index;" cdkDrag class = "" [ cdkDragDisabled ] = " formGroup . disabled " >
< div class = "section-fields-wrapper row" ( mouseenter ) = " onSectionHover ( fieldIndex ) " ( mouseleave ) = " clearHoveredSection ( ) " >
< div * ngFor = "let field of section.get('fields').controls; let fieldIndex=index;" cdkDrag class = "section-fields-wrapper row" [ cdkDragDisabled ] = " formGroup . disabled " ( mouseenter ) = " onSectionHover ( fieldIndex ) " ( mouseleave ) = " clearHoveredSection ( ) " >
< div class = "col-auto section-options-vertical" >
< div class = "row justify-content-center" >
< div class = "col-auto" >
@ -107,11 +106,9 @@
< / div >
< / div >
< / div >
< div class = "col-auto section-field section-options-horizontal" >
< div class = "w-1" >
< div class = "col-auto pr-0 section-field section-options-horizontal" >
< span * ngIf = "!isSectionSelected(fieldIndex)" style = "font-size: 18px; box-sizing: border-box; display: inline-block; padding: 0.85rem 0.45rem;" > {{fieldIndex + 1}}< / span >
< mat-icon * ngIf = "isSectionSelected(fieldIndex)" [ ngClass ] = " { ' drag-handle-disabled ' : formGroup . disabled } " cdkDragHandle class = "drag-handle" > drag_indicator< / mat-icon >
< / div >
< / div >
< div class = "col" >
< div class = "row" >
@ -164,7 +161,7 @@
< mat-error * ngIf = "field.get('label').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / mat-form-field >
< / div >
< div class = "col-4 section-field" * ngIf = "field.get('category').value != null" >
< div class = "col-4 section-field" * ngIf = "field.get('category').value != null" >
< mat-form-field class = "mt-3 w-100" >
< mat-label > {{'DMP-BLUEPRINT-EDITOR.FIELDS.FIELD-PLACEHOLDER' | translate}}< / mat-label >
< input matInput type = "text" name = "placeholder" [ formControl ] = " field . get ( ' placeholder ' ) " >
@ -205,24 +202,25 @@
< / div >
< / div >
< / div >
< / div >
< / ng-container >
< / div >
< mat-error * ngIf = "section.get('fields').dirty && section.get('fields').hasError('required')" > {{'DMP-BLUEPRINT-EDITOR.FIELDS-REQUIRED' | translate}}< / mat-error >
< mat-error * ngIf = "section.get('fields').hasError('backendError')" > {{section.get('fields').getError('backendError').message}}< / mat-error >
< / div >
< / div >
< div class = "col-12" >
< div class = "row d-flex flex-column" >
< div class = "col-auto pl-2" >
< mat-checkbox [ formControl ] = " section . get ( ' hasTemplates ' ) " ( change ) = " removeAllDescriptionTemplates ( $ event , sectionIndex ) " >
{{'DMP-BLUEPRINT-EDITOR.FIELDS.DESCRIPTION-TEMPLATES' | translate}}
< / mat-checkbox >
< mat-error * ngIf = "section.get('hasTemplates').hasError('backendError')" > {{section.get('hasTemplates').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "section.get('hasTemplates').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / div >
< div class = "col-auto" * ngIf = "section.get('hasTemplates').value == true" >
< button mat-button class = "action-btn" type = "button" ( click ) = " addDescriptionTemplate ( sectionIndex ) " [ disabled ] = " formGroup . disabled " > {{'DMP-BLUEPRINT-EDITOR.ACTIONS.ADD-DESCRIPTION-TEMPLATE' | translate}}< / button >
< div class = "row" >
< div class = "col-12" >
< div class = "row d-flex flex-column" >
< div class = "col-auto" >
< mat-checkbox [ formControl ] = " section . get ( ' hasTemplates ' ) " ( change ) = " removeAllDescriptionTemplates ( $ event , sectionIndex ) " >
{{'DMP-BLUEPRINT-EDITOR.FIELDS.DESCRIPTION-TEMPLATES' | translate}}
< / mat-checkbox >
< mat-error * ngIf = "section.get('hasTemplates').hasError('backendError')" > {{section.get('hasTemplates').getError('backendError').message}}< / mat-error >
< mat-error * ngIf = "section.get('hasTemplates').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
< / div >
< div class = "col-auto" * ngIf = "section.get('hasTemplates').value == true" >
< button mat-button class = "action-btn" type = "button" ( click ) = " addDescriptionTemplate ( sectionIndex ) " [ disabled ] = " formGroup . disabled " > {{'DMP-BLUEPRINT-EDITOR.ACTIONS.ADD-DESCRIPTION-TEMPLATE' | translate}}< / button >
< / div >
< / div >
< / div >
< / div >