Skip to content

Commit f3f7983

Browse files
Simone-RamundiAndrea Barbasso
authored andcommitted
Merged in DSC-1590 (pull request DSpace#1530)
[DSC-1590] Approved-by: Andrea Barbasso
2 parents f835e19 + 97ce799 commit f3f7983

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ds-chips [chips]="chips"
77
[editable]="!model.readOnly"
88
[showIcons]="model.hasAuthority"
9-
[wrapperClass]="'border-bottom border-light'">
9+
[wrapperClass]="'border-bottom'">
1010

1111
<input *ngIf="!model.hasAuthority"
1212
class="border-0 form-control-plaintext tag-input flex-grow-1 mt-1 mb-1"

src/app/shared/form/builder/parsers/tag-field-parser.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import { FieldParser } from './field-parser';
22
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
33
import { DynamicTagModel, DynamicTagModelConfig } from '../ds-dynamic-form-ui/models/tag/dynamic-tag.model';
4-
4+
import {DynamicFormControlLayout} from '@ng-dynamic-forms/core';
55
export class TagFieldParser extends FieldParser {
6-
76
public modelFactory(fieldValue?: FormFieldMetadataValueObject | any, label?: boolean): any {
7+
let clsTag: DynamicFormControlLayout;
8+
clsTag = {
9+
grid: {
10+
container: 'mb-3 mt-3',
11+
}
12+
};
813
const tagModelConfig: DynamicTagModelConfig = this.initModel(null, label);
914
if (this.configData.selectableMetadata[0].controlledVocabulary
1015
&& this.configData.selectableMetadata[0].controlledVocabulary.length > 0) {
1116
this.setVocabularyOptions(tagModelConfig, this.parserOptions.collectionUUID);
1217
}
13-
1418
this.setValues(tagModelConfig, fieldValue, null, true);
15-
16-
const tagModel = new DynamicTagModel(tagModelConfig);
17-
19+
tagModelConfig.placeholder = 'Enter the Keywords';
20+
const tagModel = new DynamicTagModel(tagModelConfig, clsTag);
1821
return tagModel;
1922
}
2023

0 commit comments

Comments
 (0)