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