Skip to content
Snippets Groups Projects
Commit afa59dbf authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Update: InputTextField as default for datatypes

parent 627085b8
No related branches found
No related tags found
3 merge requests!71Chore: 1.13.0,!67Sprint/2021 22,!66Fixes
......@@ -253,7 +253,7 @@ export default LinkedDataHandler.extend({
},
fieldDefinition(formElement: any) {
if (this.checkField(formElement, 'http://www.w3.org/ns/shacl#datatype')) {
let datatype = FieldReader.getObject(
const datatype = FieldReader.getObject(
formElement,
'http://www.w3.org/ns/shacl#datatype'
);
......@@ -281,6 +281,7 @@ export default LinkedDataHandler.extend({
) {
return 'InputBooleanCombobox';
}
return 'InputTextField';
} else {
if (this.checkField(formElement, 'http://www.w3.org/ns/shacl#class')) {
return 'InputCombobox';
......
......@@ -21,12 +21,17 @@ export default Vue.extend({
// take whatever is defined in formdata now and try to get the content if we are not in fixed value mode
this.replacePlaceholder();
const datatype = FieldReader.getObject(
this.formFieldInformation,
'http://www.w3.org/ns/shacl#datatype'
);
// set the datatype
this.$set(this.formData[this.nodeName][this.entryKey], 'type', 'literal');
this.$set(
this.formData[this.nodeName][this.entryKey],
'datatype',
'http://www.w3.org/2001/XMLSchema#string'
datatype['value']
);
if (this.fixedValueMode) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment