Removes the Validation from the DMP description on the second step of Quick Wizard.
This commit is contained in:
parent
0432aed3cb
commit
b45d4d5905
|
@ -43,7 +43,7 @@ export class DmpEditorWizardModel {
|
|||
baseContext.validation.push({ key: 'id', validators: [BackendErrorValidator(this.validationErrorModel, 'id')] });
|
||||
baseContext.validation.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
|
||||
baseContext.validation.push({ key: 'status', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'status')] });
|
||||
baseContext.validation.push({ key: 'description', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'description')] });
|
||||
baseContext.validation.push({ key: 'description', validators: [BackendErrorValidator(this.validationErrorModel, 'description')] });
|
||||
baseContext.validation.push({ key: 'datasetProfile', validators: [Validators.required, ValidJsonValidator, BackendErrorValidator(this.validationErrorModel, 'datasetProfile')] });
|
||||
return baseContext;
|
||||
}
|
||||
|
|
|
@ -1,42 +1,36 @@
|
|||
<div class="dmp-editor">
|
||||
<div>
|
||||
<mat-card-title *ngIf="isNew">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.NEW-TITLE' | translate}}</mat-card-title>
|
||||
<mat-card-title *ngIf="!isNew">
|
||||
<h3>{{formGroup?.get('label')?.value}} </h3>
|
||||
</mat-card-title>
|
||||
</div>
|
||||
<form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="row">
|
||||
<mat-form-field class="col-md-12">
|
||||
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.NAME' | translate}}" type="text" name="label"
|
||||
formControlName="label" required>
|
||||
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
||||
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="col-md-12">
|
||||
<textarea matInput class="description-area"
|
||||
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}" formControlName="description"
|
||||
required></textarea>
|
||||
<mat-error *ngIf="formGroup.get('description').hasError('backendError')">
|
||||
{{formGroup.get('description').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
|
||||
translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="col-12">
|
||||
<app-single-auto-complete [required]='true' [formControl]="formGroup.get('datasetProfile')"
|
||||
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE' | translate}}"
|
||||
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()">
|
||||
</app-single-auto-complete>
|
||||
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('backendError')">
|
||||
{{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="col-md-6">
|
||||
<div>
|
||||
<mat-card-title *ngIf="isNew">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.NEW-TITLE' | translate}}</mat-card-title>
|
||||
<mat-card-title *ngIf="!isNew">
|
||||
<h3>{{formGroup?.get('label')?.value}} </h3>
|
||||
</mat-card-title>
|
||||
</div>
|
||||
<form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup">
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<div class="row">
|
||||
<mat-form-field class="col-md-12">
|
||||
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.NAME' | translate}}"
|
||||
type="text" name="label" formControlName="label" required>
|
||||
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
||||
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="col-md-12">
|
||||
<textarea matInput class="description-area" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}"
|
||||
formControlName="description"></textarea>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="col-12">
|
||||
<app-single-auto-complete [required]='true' [formControl]="formGroup.get('datasetProfile')" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE' | translate}}"
|
||||
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()">
|
||||
</app-single-auto-complete>
|
||||
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('backendError')">
|
||||
{{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error>
|
||||
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('required')">
|
||||
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field class="col-md-6">
|
||||
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
|
||||
placeholder="{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}"
|
||||
[configuration]="dmpProfileAutoCompleteConfiguration">
|
||||
|
@ -60,8 +54,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</form>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue