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 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>
@ -9,29 +10,41 @@
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
<div class="row"> <div class="row">
<mat-form-field class="col-md-12"> <p class="col-md-12">
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.NAME' | translate}}" <b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.ABOUT' | translate}}</b></p>
type="text" name="label" formControlName="label" required> <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')"> <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" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}" <textarea matInput class="description-area"
formControlName="description"></textarea> placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}"
<mat-hint>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION-HINT' | translate}}</mat-hint> 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>
<mat-form-field class="col-12 mt-3"> <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}}" <app-single-auto-complete [required]='true' [formControl]="formGroup.get('datasetProfile')"
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()"> placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE' | translate}}"
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()">
</app-single-auto-complete> </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')"> <mat-error *ngIf="formGroup.get('datasetProfile').hasError('backendError')">
{{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error> {{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('required')"> <mat-error *ngIf="formGroup.get('datasetProfile').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> {{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </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"> <!-- <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}}"
@ -57,6 +70,9 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<!-- <div class="row">
</div> -->
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</form> </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-header>
<mat-card-content> <mat-card-content>
<div class="row" *ngIf="!isNew"> <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')" <app-single-auto-complete required='true' [formControl]="formGroup.get('existProject')"
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.SELECT-PROJECT' | translate}}" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.SELECT-PROJECT' | translate}}"
[configuration]="projectAutoCompleteConfiguration"> [configuration]="projectAutoCompleteConfiguration">
@ -20,6 +21,7 @@
</div> </div>
<div class="row" *ngIf="isNew"> <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"> <mat-form-field class="col-md-12">
<input matInput <input matInput
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL' | translate}}" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.LABEL' | translate}}"
@ -43,13 +45,13 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col"> <div class="align-self-center mt-2 col">
<hr> <hr>
</div> </div>
<h3 class="col-auto"> <h3 class="col-auto">
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate}} {{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.OR' | translate}}
</h3> </h3>
<div class="col"> <div class="align-self-center mt-2 col">
<hr> <hr>
</div> </div>
</div> </div>

View File

@ -880,6 +880,8 @@
}, },
"FIRST-STEP": { "FIRST-STEP": {
"TITLE": "Project", "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", "OR": "or",
"FIELDS": { "FIELDS": {
"SELECT-PROJECT": "Select the project that the DMP is associated with", "SELECT-PROJECT": "Select the project that the DMP is associated with",
@ -891,6 +893,7 @@
}, },
"SECOND-STEP": { "SECOND-STEP": {
"TITLE": "DMP Profile", "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": "", "NEW-TITLE": "",
"DMP-NAME": "DMP For Project : ", "DMP-NAME": "DMP For Project : ",
"FIELDS": { "FIELDS": {
@ -898,7 +901,8 @@
"DESCRIPTION": "Summary", "DESCRIPTION": "Summary",
"DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP", "DESCRIPTION-HINT": "Briefly describe the context and purpose of the DMP",
"PROFILE": "Dataset Description Template", "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": { "THIRD-STEP": {