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