mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
[CST-12043] fix: translation for custom switch
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
(change)="onChange($event)"
|
||||
(focus)="onFocus($event)"/>
|
||||
<label class="form-check-label custom-control-label" [for]="bindId && model.id">
|
||||
<span [innerHTML]="model.label"
|
||||
<span [innerHTML]="model.label | translate"
|
||||
[ngClass]="[getClass('element', 'label'), getClass('grid', 'label')]"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
@@ -29,6 +29,7 @@ import {
|
||||
BITSTREAM_FORM_ACCESS_CONDITION_TYPE_CONFIG,
|
||||
BITSTREAM_FORM_ACCESS_CONDITION_TYPE_LAYOUT,
|
||||
BITSTREAM_FORM_PRIMARY,
|
||||
BITSTREAM_FORM_PRIMARY_LAYOUT,
|
||||
BITSTREAM_METADATA_FORM_GROUP_CONFIG,
|
||||
BITSTREAM_METADATA_FORM_GROUP_LAYOUT
|
||||
} from './section-upload-file-edit.model';
|
||||
@@ -305,7 +306,7 @@ export class SubmissionSectionUploadFileEditComponent
|
||||
});
|
||||
const formModel: DynamicFormControlModel[] = [];
|
||||
|
||||
formModel.push(new DynamicCustomSwitchModel(BITSTREAM_FORM_PRIMARY, BITSTREAM_METADATA_FORM_GROUP_LAYOUT));
|
||||
formModel.push(new DynamicCustomSwitchModel(BITSTREAM_FORM_PRIMARY, BITSTREAM_FORM_PRIMARY_LAYOUT));
|
||||
|
||||
const metadataGroupModelConfig = Object.assign({}, BITSTREAM_METADATA_FORM_GROUP_CONFIG);
|
||||
metadataGroupModelConfig.group = this.formBuilderService.modelFromConfiguration(
|
||||
|
@@ -58,7 +58,7 @@ export const BITSTREAM_FORM_ACCESS_CONDITION_TYPE_LAYOUT: DynamicFormControlLayo
|
||||
}
|
||||
};
|
||||
export const BITSTREAM_FORM_PRIMARY_LAYOUT: DynamicFormControlLayout = {
|
||||
grid: {
|
||||
element: {
|
||||
host: 'col-6'
|
||||
}
|
||||
};
|
||||
@@ -66,7 +66,7 @@ export const BITSTREAM_FORM_PRIMARY_LAYOUT: DynamicFormControlLayout = {
|
||||
export const BITSTREAM_FORM_PRIMARY: DynamicSwitchModelConfig = {
|
||||
id: 'primary',
|
||||
name: 'primary',
|
||||
label: 'Primary bitstream',
|
||||
label: 'bitstream.edit.form.primaryBitstream.label'
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user