Skip to content
Snippets Groups Projects
Commit e8429d1f authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

fix: code style

parent dd1e6ea7
No related branches found
No related tags found
1 merge request!206feat: update DLCM APIs
<form [formGroup]="form" class="form-two-columns">
<form [formGroup]="form"
class="form-two-columns"
>
<div class="two-columns-wrapper">
<div class="left-part">
<dlcm-shared-searchable-single-select *ngIf="getFormControl(formDefinition.organizationalUnitId) as fd"
[resourceNameSpace]="appAuthorizedOrganizationalUnitNameSpace" [state]="appAuthorizedOrganizationalUnitState"
[formControl]="fd" [required]="formValidationHelper.hasRequiredField(fd)" [labelKey]="'name'"
[valueKey]="'resId'" [placeholder]="'aip.form.organizationUnit' | translate" [readonly]="true">
[resourceNameSpace]="appAuthorizedOrganizationalUnitNameSpace"
[state]="appAuthorizedOrganizationalUnitState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[placeholder]="'aip.form.organizationUnit' | translate"
[readonly]="true"
>
</dlcm-shared-searchable-single-select>
<mat-form-field>
<mat-label>{{'aip.form.resId' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.id">
<input matInput
[formControlName]="formDefinition.id"
>
</mat-form-field>
<mat-form-field>
<mat-label>{{'aip.form.name' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.name">
<input matInput
[formControlName]="formDefinition.name"
>
</mat-form-field>
<mat-form-field>
<mat-label>{{'aip.form.description' | translate }}</mat-label>
<textarea matInput cdkTextareaAutosize cdkAutosizeMinRows="5" cdkAutosizeMaxRows="7"
[formControlName]="formDefinition.description">
<textarea matInput
cdkTextareaAutosize
cdkAutosizeMinRows="5"
cdkAutosizeMaxRows="7"
[formControlName]="formDefinition.description"
>
</textarea>
</mat-form-field>
<mat-form-field>
<mat-label>{{'aip.form.yearOfcreation' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.yearOfCreation">
<input matInput
[formControlName]="formDefinition.yearOfCreation"
>
</mat-form-field>
<mat-form-field *ngIf="getFormControl(formDefinition.status) as fd">
<mat-label>{{'aip.form.status' | translate }}</mat-label>
<mat-select [formControl]="fd">
<mat-option *ngFor="let packageStatus of packageStatusEnumValues" [value]="packageStatus.key">
<mat-select [formControl]="fd"
>
<mat-option *ngFor="let packageStatus of packageStatusEnumValues"
[value]="packageStatus.key"
>
{{packageStatus.value | translate}}
</mat-option>
</mat-select>
......@@ -40,14 +61,19 @@
<mat-form-field>
<mat-label>{{'aip.form.lastChecksumCheck.label' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.lastchecksumCheck">
<input matInput
[formControlName]="formDefinition.lastchecksumCheck"
>
</mat-form-field>
</div>
<div class="right-part">
<mat-form-field *ngIf="getFormControl(formDefinition.accessLevel) as fd">
<mat-label>{{'aip.form.accessLevel' | translate }}</mat-label>
<mat-select [formControl]="fd">
<mat-option *ngFor="let accessLevel of accessEnumValues" [value]="accessLevel.key">
<mat-select [formControl]="fd"
>
<mat-option *ngFor="let accessLevel of accessEnumValues"
[value]="accessLevel.key"
>
{{accessLevel.value | translate}}
</mat-option>
</mat-select>
......@@ -55,47 +81,66 @@
<dlcm-shared-searchable-single-select *ngIf="getFormControl(formDefinition.licenseId) as fd"
[resourceNameSpace]="sharedLicenseActionNameSpace" [state]="sharedLicenseState" [formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)" [labelKey]="'title'" [valueKey]="'resId'"
[placeholder]="'aip.form.licence' | translate" [readonly]="readonly">
[resourceNameSpace]="sharedLicenseActionNameSpace"
[state]="sharedLicenseState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'title'"
[valueKey]="'resId'"
[placeholder]="'aip.form.licence' | translate"
[readonly]="readonly"
>
</dlcm-shared-searchable-single-select>
<dlcm-shared-compliance-level-rating [formControl]="getFormControl(formDefinition.complianceLevel)">
</dlcm-shared-compliance-level-rating>
<dlcm-shared-compliance-level-rating [formControl]="getFormControl(formDefinition.complianceLevel)"></dlcm-shared-compliance-level-rating>
<mat-form-field>
<mat-label>{{'aip.form.archive' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.archive">
<input matInput
[formControlName]="formDefinition.archive"
>
</mat-form-field>
<div class="span-row">
<mat-form-field>
<mat-label>{{'aip.form.container' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.container">
<input matInput
[formControlName]="formDefinition.container"
>
</mat-form-field>
<mat-form-field>
<mat-label>{{'aip.form.metadataVersion' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.metadataVersion">
<input matInput
[formControlName]="formDefinition.metadataVersion"
>
</mat-form-field>
</div>
<div class="span-row">
<mat-form-field>
<mat-label>{{'aip.form.size' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.size">
<input matInput
[formControlName]="formDefinition.size"
>
</mat-form-field>
<mat-form-field>
<mat-label>{{'aip.form.files' | translate }}</mat-label>
<input matInput [formControlName]="formDefinition.files">
<input matInput
[formControlName]="formDefinition.files"
>
</mat-form-field>
</div>
<div *ngIf="!(model.sipIds | isNullOrUndefined) && (model.sipIds | isNonEmptyArray)" class="link">
<div *ngIf="!(model.sipIds | isNullOrUndefined) && (model.sipIds | isNonEmptyArray)"
class="link"
>
<mat-label class="disabled">{{'preservation.aip.form.sip' | translate}}</mat-label>
<a *ngFor="let sipId of model.sipIds; let i = index" [href]="getSipPath(sipId)">
<a *ngFor="let sipId of model.sipIds; let i = index"
[href]="getSipPath(sipId)"
>
{{'app.sip' | translate:{number: i + 1} }}
</a>
</div>
</div>
</div>
</form>
\ No newline at end of file
</form>
......@@ -77,7 +77,6 @@ export class AipFormPresentational extends SharedAbstractFormPresentational<Aip>
[this.formDefinition.size]: [FileUtil.transformFileSize(aip.archiveSize), []],
[this.formDefinition.files]: [aip.archiveFileNumber, []],
[this.formDefinition.metadataVersion]: [aip.info.metadataVersion, []],
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment