Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Coscine
frontend
libraries
form-generator
Commits
afa59dbf
Commit
afa59dbf
authored
Nov 19, 2021
by
Benedikt Heinrichs
Browse files
Update: InputTextField as default for datatypes
parent
627085b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/FormGenerator.vue
View file @
afa59dbf
...
...
@@ -253,7 +253,7 @@ export default LinkedDataHandler.extend({
},
fieldDefinition
(
formElement
:
any
)
{
if
(
this
.
checkField
(
formElement
,
'
http://www.w3.org/ns/shacl#datatype
'
))
{
le
t
datatype
=
FieldReader
.
getObject
(
cons
t
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
'
;
...
...
src/components/InputTextField.vue
View file @
afa59dbf
...
...
@@ -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
)
{
...
...
CoscineBot
⚙
@CoscineBot
mentioned in commit
72dcdfbd
·
Nov 19, 2021
mentioned in commit
72dcdfbd
mentioned in commit 72dcdfbdac5437b6d69831b3b2b4ba4541d6db7a
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment