Rename fields on Dmp Wizard - (Issue #123) and fixes breadcrumb get language

This commit is contained in:
apapachristou 2019-06-26 10:39:25 +03:00
parent fb824c70e9
commit 9d92225f68
3 changed files with 19 additions and 11 deletions

View File

@ -24,15 +24,17 @@
<input matInput
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL' | translate}}"
type="text" name="label" [formControl]="formGroup.get('label')" required>
<mat-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL-HINT' | translate}}</mat-hint>
<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">
<mat-form-field class="col-md-12 mt-2">
<textarea matInput class="description-area"
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION' | translate}}"
[formControl]="formGroup.get('description')" required></textarea>
<mat-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION-HINT' | translate}}</mat-hint>
<mat-error *ngIf="formGroup.get('description').hasError('backendError')">
{{formGroup.get('description').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('description').hasError('required')">
@ -65,4 +67,4 @@
</mat-card-content>
</mat-card>
</form>
</div>
</div>

View File

@ -50,11 +50,15 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit,
this.quickWizard = new QuickWizardEditorWizardModel();
this.quickWizard.project = new ProjectEditorWizardModel();
this.formGroup = this.quickWizard.buildForm();
this.breadCrumbs = Observable.of([{
parentComponentName: 'Dashboard',
label: this.language.instant('NAV-BAR.DMP-WIZARD'),
url: '/quick-wizard'
}]);
this.language.get('NAV-BAR.DMP-WIZARD').pipe(takeUntil(this._destroyed)).subscribe(x => {
this.breadCrumbs = Observable.of([
{
parentComponentName: 'Dashboard',
label: x,
url: '/quick-wizard'
}]
);
})
}
isActive(step: string): boolean {

View File

@ -874,16 +874,18 @@
"SAVE-AND-FINALIZE": "Save and Finalize",
"NEXT": "Next",
"BACK": "Back",
"CREATE-NEW": "Create new project",
"CREATE-NEW": "Add project",
"EXIST": "Existing Project"
},
"FIRST-STEP": {
"TITLE": "Project",
"OR": "or",
"FIELDS": {
"SELECT-PROJECT": "Pick the project the DMP is associate with",
"LABEL": "Label",
"DESCRIPTION": "Description"
"SELECT-PROJECT": "Select the project that the DMP is associated with",
"LABEL": "Project Name",
"LABEL-HINT": "Add the name of the project as it appears in the call for grant proposal",
"DESCRIPTION": "Description",
"DESCRIPTION-HINT": "Briefly explain the aims and objectives of the project"
}
},
"SECOND-STEP": {