Reorganize and Rename (english only) DMP Editor Fields (ref #7700)

update-configs
George Kalampokis 2 years ago
parent b891907724
commit 78bceeb8ae

@ -20,6 +20,44 @@
</div>
</div>
</div>
<!-- Visibility field-->
<div class="row">
<div class="col-12">
<div class="heading">3.2 {{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}</div>
<div class="hint">{{'DMP-EDITOR.FIELDS.VISIBILITY-HINT' | translate}}</div>
<div class="visibility-form">
<mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}">
<mat-option *ngFor="let vis of visibles" [value]="vis.value">
{{vis.name | translate}}
</mat-option>
</mat-select>
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('backendError')">
{{formGroup.get('extraProperties').get('visible').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- Publication Field -->
<div class="row" *ngIf="formGroup.get('extraProperties').get('visible').value">
<div class="col-12">
<div class="heading">3.3 {{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}*</div>
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
<div class="publication-form">
<mat-form-field>
<input matInput [matDatepicker]="picker" [formControl]="formGroup.get('extraProperties').get('publicDate')" placeholder="{{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}" [required]="formGroup.get('extraProperties').get('visible').value">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('backendError')">
{{formGroup.get('extraProperties').get('publicDate').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-12">
<div class="heading">4.6 {{'DMP-EDITOR.FIELDS.COST' | translate}}</div>

@ -15,7 +15,10 @@ import { LicenseCriteria } from '@app/core/query/license/license-criteria';
import { AddCostComponent } from '../cost-editor/add-cost/add-cost.component';
import { CostEditorModel } from '../cost-editor/add-cost/add-cost.model';
interface Visible {
value: boolean;
name: string;
}
@Component({
selector: 'license-info',
@ -33,6 +36,11 @@ export class LicenseInfoComponent extends BaseComponent implements OnInit {
public formControl = new FormControl();
visibles: Visible[] = [
{ value: true, name: 'DMP-EDITOR.VISIBILITY.PUBLIC' },
{ value: false, name: 'DMP-EDITOR.VISIBILITY.RESTRICTED' }
]
licenseAutoCompleteConfiguration: SingleAutoCompleteConfiguration = {
filterFn: this.licenseSearch.bind(this),
initialItems: (excludedItems: any[]) => this.licenseSearch('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),

@ -31,50 +31,10 @@
</div>
</div>
</div>
<!-- Language field -->
<div class="row">
<div class="col-12">
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}*</div>
<div class="hint">{{'DMP-EDITOR.FIELDS.LANGUAGE-HINT' | translate}}</div>
<div class="language-form">
<mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
{{ lang.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('backendError')">
{{formGroup.get('extraProperties').get('language').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- Visibility field-->
<div class="row">
<div class="col-12">
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}</div>
<div class="hint">{{'DMP-EDITOR.FIELDS.VISIBILITY-HINT' | translate}}</div>
<div class="visibility-form">
<mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('visible')" placeholder="{{'DMP-EDITOR.FIELDS.VISIBILITY' | translate}}">
<mat-option *ngFor="let vis of visibles" [value]="vis.value">
{{vis.name | translate}}
</mat-option>
</mat-select>
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('backendError')">
{{formGroup.get('extraProperties').get('visible').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('visible').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- Researchers field-->
<div class="row">
<div class="col-12">
<div class="heading">1.5 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
<div class="heading">1.3 {{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}</div>
<div class="hint">
<div class="pb-1">{{'DMP-EDITOR.FIELDS.RESEARCHERS-HINT' | translate}}</div>
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
@ -102,7 +62,7 @@
<!-- Organizations Field -->
<div class="row">
<div class="col-12">
<div class="heading">1.6 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
<div class="heading">1.4 {{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}</div>
<div class="hint">
<div class="pb-1">{{'DMP-EDITOR.FIELDS.ORGANISATIONS-HINT' | translate}}</div>
<div><span class="material-icons-outlined align-bottom">info</span> {{'DMP-EDITOR.MAIN-INFO.TYPING' | translate}}</div>
@ -126,10 +86,30 @@
</div>
</div>
</div>
<!-- Language field -->
<div class="row">
<div class="col-12">
<div class="heading">1.5 {{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}*</div>
<div class="hint">{{'DMP-EDITOR.FIELDS.LANGUAGE-HINT' | translate}}</div>
<div class="language-form">
<mat-form-field>
<mat-select [formControl]="formGroup.get('extraProperties').get('language')" placeholder="{{'DMP-EDITOR.FIELDS.LANGUAGE' | translate}}" required>
<mat-option *ngFor="let lang of getLanguageInfos()" [value]="lang.code">
{{ lang.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('backendError')">
{{formGroup.get('extraProperties').get('language').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('language').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
<!-- Contact Field -->
<div class="row">
<div class="col-12">
<div class="heading">1.7 {{'DMP-EDITOR.FIELDS.CONTACT' | translate}}*</div>
<div class="heading">1.6 {{'DMP-EDITOR.FIELDS.CONTACT' | translate}}*</div>
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
<div class="contact-form">
<mat-form-field>
@ -146,23 +126,5 @@
</div>
</div>
</div>
<!-- Publication Field -->
<div class="row" *ngIf="formGroup.get('extraProperties').get('visible').value">
<div class="col-12">
<div class="heading">1.8 {{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}*</div>
<!-- <div class="hint">{{'DMP-EDITOR.LICENSE-INFO.HINT' | translate}}</div> -->
<div class="publication-form">
<mat-form-field>
<input matInput [matDatepicker]="picker" [formControl]="formGroup.get('extraProperties').get('publicDate')" placeholder="{{'DMP-EDITOR.FIELDS.PUBLICATION' | translate}}" [required]="formGroup.get('extraProperties').get('visible').value">
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
<mat-datepicker #picker></mat-datepicker>
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('backendError')">
{{formGroup.get('extraProperties').get('publicDate').getError('backendError').message}}</mat-error>
<mat-error *ngIf="formGroup.get('extraProperties').get('publicDate').hasError('required')">
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field>
</div>
</div>
</div>
</div>
</div>

@ -25,11 +25,6 @@ import { AuthService } from '@app/core/services/auth/auth.service';
import { Principal } from '@app/core/model/auth/principal';
import { OrganisationService } from '@app/core/services/organisation/organisation.service';
interface Visible {
value: boolean;
name: string;
}
@Component({
selector: 'main-info',
templateUrl: './main-info.component.html',
@ -45,10 +40,6 @@ export class MainInfoComponent extends BaseComponent implements OnInit {
@Output() onFormChanged: EventEmitter<any> = new EventEmitter();
public formControl = new FormControl();
visibles: Visible[] = [
{ value: true, name: 'DMP-EDITOR.VISIBILITY.PUBLIC' },
{ value: false, name: 'DMP-EDITOR.VISIBILITY.RESTRICTED' }
]
private associates: UserModel[] = [];

@ -1033,8 +1033,8 @@
"LANGUAGE": "Language",
"LANGUAGE-HINT": "Select the language of your DMP",
"LICENSE": "License",
"VISIBILITY": "Visibility",
"VISIBILITY-HINT": "Choose how the DMP is displayed in Argos. By choosing Public, the DMP is automatically made available to all users from the “Public DMPs” collection.",
"VISIBILITY": "Access Rights",
"VISIBILITY-HINT": "Choose how the DMP is displayed after is published on Zenodo. By choosing Open Access, the DMP will be open on Zenodo after the Publication Date. By choosing Restricted Access, the DMP will be restricted after the publication is made.",
"PUBLICATION": "Publication Date",
"CONTACT": "Contact",
"COST": "Costs",
@ -1072,16 +1072,16 @@
"OK": "OK"
},
"VISIBILITY": {
"PUBLIC": "Public",
"RESTRICTED": "Restricted"
"PUBLIC": "Open Access",
"RESTRICTED": "Restricted Access"
},
"STEPPER": {
"USER-GUIDE": "Guide steps",
"MAIN-INFO": "Main info",
"FUNDING-INFO": "Funding info",
"FUNDING-INFO": "Funding",
"DATASET-SELECTION": "Dataset selection",
"DATASET-INFO": "Dataset info",
"LICENSE-INFO": "License info",
"LICENSE-INFO": "License",
"DATASET": "Dataset",
"PREVIOUS": "Previous",
"NEXT": "Next"

Loading…
Cancel
Save