Skip to content

Commit

Permalink
Invert sequence of licensing
Browse files Browse the repository at this point in the history
  • Loading branch information
lpandath authored and ZenoLC committed Sep 19, 2023
1 parent 08e870c commit 9fc923a
Showing 1 changed file with 57 additions and 30 deletions.
87 changes: 57 additions & 30 deletions libs/damap/src/lib/components/dmp/licenses/licenses.component.html
Original file line number Diff line number Diff line change
@@ -1,59 +1,78 @@
<app-step-intro>{{ 'dmp.steps.licensing.intro' | translate }} </app-step-intro>
<p>{{ 'dmp.steps.licensing.hint' | translate }}</p>
<app-step-intro>{{ "dmp.steps.licensing.intro" | translate }} </app-step-intro>
<p>{{ "dmp.steps.licensing.hint" | translate }}</p>
<div [formGroup]="dmpForm">
<ng-container formArrayName="datasets" *ngFor="let dataset of datasets?.controls; index as i">
<mat-card *ngIf="dataset.value.source === datasetSource.NEW" class="mat-selected">
<ng-container
formArrayName="datasets"
*ngFor="let dataset of datasets?.controls; index as i">
<mat-card
*ngIf="dataset.value.source === datasetSource.NEW"
class="mat-selected">
<ng-container [formGroupName]="i">
<div class="mat-card-container">
<div class="mat-card-left">
<h4>{{ dataset.value.title }}</h4>
</div>
</div>
<div class="mat-card-container">
<mat-form-field>
<mat-label>{{
"dmp.steps.licensing.question.dataAccess" | translate
}}</mat-label>
<mat-select formControlName="dataAccess">
<mat-option
*ngFor="let type of accessType | keyvalue"
[value]="type.key">
{{ translateEnumPrefix + type.value | translate }}<br />
</mat-option>
</mat-select>
</mat-form-field>
</div>
<ng-container *ngIf="dataset.value.dataAccess === accessType.OPEN">
<div class="warning" *ngIf="
<div
class="warning"
*ngIf="
dataset.value.personalData ||
dataset.value.sensitiveData ||
dataset.value.legalRestrictions
">
<div class="warning-icon">
<mat-icon>error_outline</mat-icon>
</div>
<ng-container *ngIf="dataset.value.personalData || dataset.value.sensitiveData">
{{ 'dmp.steps.licensing.warning.personalData' | translate }}
<ng-container
*ngIf="dataset.value.personalData || dataset.value.sensitiveData">
{{ "dmp.steps.licensing.warning.personalData" | translate }}
<ng-container *ngIf="!isAnonymisedOrPseudonymised">
{{ 'dmp.steps.licensing.warning.pseudonymisation' | translate }}
{{ "dmp.steps.licensing.warning.pseudonymisation" | translate }}
</ng-container>
</ng-container>
<ng-container *ngIf="dataset.value.legalRestrictions">
{{ 'dmp.steps.licensing.warning.legalRestrictions' | translate }}
{{ "dmp.steps.licensing.warning.legalRestrictions" | translate }}
</ng-container>
</div>
<div class="mat-card-container">
<mat-form-field class="full-width">
<mat-label>{{'dmp.steps.licensing.question.license' | translate}}</mat-label>
<mat-label>{{
"dmp.steps.licensing.question.license" | translate
}}</mat-label>
<mat-select formControlName="license">
<mat-option *ngFor="let license of licenses" [value]="license.id | translate">
{{license.name | translate}}
<mat-option
*ngFor="let license of licenses"
[value]="license.id | translate">
{{ license.name | translate }}
</mat-option>
</mat-select>
</mat-form-field>
<app-license-wizard (selectedLicense)="setLicenseSelectorResult($event, i)"></app-license-wizard>
<app-license-wizard
(selectedLicense)="
setLicenseSelectorResult($event, i)
"></app-license-wizard>
</div>
</ng-container>
<div class="mat-card-container">
<mat-form-field>
<mat-label>{{
'dmp.steps.licensing.question.dataAccess' | translate
}}</mat-label>
<mat-select formControlName="dataAccess">
<mat-option *ngFor="let type of accessType | keyvalue" [value]="type.key">
{{ translateEnumPrefix + type.value | translate }}<br />
</mat-option>
</mat-select>
</mat-form-field>
</div>

<ng-container *ngIf="dataset.value.dataAccess === accessType.CLOSED">
<app-data-deletion [dataset]="getFormGroup(i)" [dmpForm]="dmpForm"></app-data-deletion>
<app-data-deletion
[dataset]="getFormGroup(i)"
[dmpForm]="dmpForm"></app-data-deletion>
</ng-container>
</ng-container>
</mat-card>
Expand All @@ -63,23 +82,31 @@ <h4>{{ dataset.value.title }}</h4>
<div [formGroup]="dmpForm">
<ng-container *ngIf="restricted?.length > 0">
<mat-form-field class="full-width">
<mat-label class="wrap-normal-label">{{ 'dmp.steps.licensing.question.restrictedAccessInfo' | translate }}
<mat-label class="wrap-normal-label"
>{{ "dmp.steps.licensing.question.restrictedAccessInfo" | translate }}
<ng-container *ngFor="let set of restricted; last as last">
"{{ set.title }}"<span *ngIf="!last">, </span>.
</ng-container>
</mat-label>
<textarea matInput formControlName="restrictedAccessInfo" [maxLength]="4000"></textarea>
<textarea
matInput
formControlName="restrictedAccessInfo"
[maxLength]="4000"></textarea>
</mat-form-field>
</ng-container>

<ng-container *ngIf="closed?.length > 0">
<mat-form-field class="full-width">
<mat-label class="wrap-normal-label">{{ 'dmp.steps.licensing.question.closedAccessInfo' | translate }}
<mat-label class="wrap-normal-label"
>{{ "dmp.steps.licensing.question.closedAccessInfo" | translate }}
<span *ngFor="let set of closed; last as last">
"{{ set.title }}"<span *ngIf="!last">, </span>.
</span>
</mat-label>
<textarea matInput formControlName="closedAccessInfo" [maxLength]="4000"></textarea>
<textarea
matInput
formControlName="closedAccessInfo"
[maxLength]="4000"></textarea>
</mat-form-field>
</ng-container>
</div>
Expand Down

0 comments on commit 9fc923a

Please sign in to comment.