Adds text (Issue #123) - (Issue #124)

This commit is contained in:
apapachristou 2019-06-26 13:51:16 +03:00
parent 4a3a6cac90
commit c06e0acee4
4 changed files with 40 additions and 14 deletions

View File

@ -1,6 +1,7 @@
<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">
{{'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>
@ -9,29 +10,41 @@
<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>
<p class="col-md-12">
<b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.ABOUT' | translate}}</b></p>
<mat-form-field class="col-md-12 mt-3">
<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-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION-HINT' | translate}}</mat-hint>
<textarea matInput class="description-area"
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}"
formControlName="description"></textarea>
<mat-hint>
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION-HINT' | translate}}
</mat-hint>
</mat-form-field>
<mat-form-field class="col-12 mt-3">
<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 [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-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE-HINT' | translate}}</mat-hint>
<mat-hint>
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE-HINT' | translate}}
</mat-hint>
<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>
<div class="col-md-12 mt-3 help">
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.HELP' | translate}}
</div>
<!-- <mat-form-field class="col-md-6">
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
placeholder="{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}"
@ -57,6 +70,9 @@
</div>
</div> -->
</div>
<!-- <div class="row">
</div> -->
</mat-card-content>
</mat-card>
</form>

View File

@ -0,0 +1,4 @@
.help {
font-size: 12px;
margin-top: 3em;
}

View File

@ -7,7 +7,8 @@
</mat-card-header>
<mat-card-content>
<div class="row" *ngIf="!isNew">
<mat-form-field class="col-md-12">
<p class="col-md-12"><b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.ABOUT' | translate}}</b></p>
<mat-form-field class="col-md-12 mt-2">
<app-single-auto-complete required='true' [formControl]="formGroup.get('existProject')"
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.SELECT-PROJECT' | translate}}"
[configuration]="projectAutoCompleteConfiguration">
@ -20,6 +21,7 @@
</div>
<div class="row" *ngIf="isNew">
<p class="col-md-12"><b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.ABOUT-NEW' | translate}}</b></p>
<mat-form-field class="col-md-12">
<input matInput
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL' | translate}}"
@ -43,13 +45,13 @@
</div>
<div class="row">
<div class="col">
<div class="align-self-center mt-2 col">
<hr>
</div>
<h3 class="col-auto">
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate}}
</h3>
<div class="col">
<div class="align-self-center mt-2 col">
<hr>
</div>
</div>

View File

@ -880,6 +880,8 @@
},
"FIRST-STEP": {
"TITLE": "Project",
"ABOUT": "Find the project that your DMP is associated with and link it to funders' information. If the project is not listed or you are creating a DMP for a grant proposal or for other purposes, use \"Add Project\"",
"ABOUT-NEW": "If you are creating a DMP for a grant proposal, institutional or research community use or training and educational purposes, add information below by creating a new project.",
"OR": "or",
"FIELDS": {
"SELECT-PROJECT": "Select the project that the DMP is associated with",
@ -891,6 +893,7 @@
},
"SECOND-STEP": {
"TITLE": "DMP Profile",
"ABOUT": "A Data Management Plan consists of a set of questions that you should answer with a level of detail appropriate to the project or with relevance to the purpose that you are creating the DMP. Contents of each DMP vary depending on the selected Dataset Description Template(s) which contain(s) a set of tailored questions in response to policy requirements of funders, institutions, research communities.",
"NEW-TITLE": "",
"DMP-NAME": "DMP For Project : ",
"FIELDS": {
@ -898,7 +901,8 @@
"DESCRIPTION": "Summary",
"DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP",
"PROFILE": "Dataset Description Template",
"PROFILE-HINT": "Select a template to describe your dataset(s)"
"PROFILE-HINT": "Select a template to describe your dataset(s). If you want to select multiple dataset templates use \"New DMP (Expert)\". You can also add new dataset descriptions at any time after the DMP creation.",
"HELP": "If you can't find a template or if you want to create a personalized template for your institution, research community or training needs, please contact us."
}
},
"THIRD-STEP": {