Commit afa59dbf authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Update: InputTextField as default for datatypes

parent 627085b8
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment