Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-generator
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
frontend
libraries
form-generator
Merge requests
!41
Product/619 client validation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Product/619 client validation
Product/619-clientValidation
into
Sprint/2020-19
Overview
0
Commits
3
Pipelines
2
Changes
12
Merged
Marcel Nellesen
requested to merge
Product/619-clientValidation
into
Sprint/2020-19
4 years ago
Overview
0
Commits
3
Pipelines
2
Changes
12
Expand
0
0
Merge request reports
Compare
Sprint/2020-19
version 1
0a25de72
4 years ago
Sprint/2020-19 (base)
and
latest version
latest version
75b252c5
3 commits,
4 years ago
version 1
0a25de72
2 commits,
4 years ago
12 files
+
1778
−
765
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
Search (e.g. *.vue) (Ctrl+P)
src/components/InputBooleanCombobox.vue
+
21
−
7
Options
@@ -15,13 +15,25 @@
<
script
lang=
"ts"
>
import
Vue
from
'
vue
'
;
import
VueI18n
from
'
vue-i18n
'
;
import
Multiselect
from
'
vue-multiselect
'
;
import
'
vue-multiselect/dist/vue-multiselect.min.css
'
;
import
FieldReader
from
'
@/util/FieldReader
'
;
Vue
.
use
(
VueI18n
);
const
i18n
=
new
VueI18n
({
locale
:
'
en
'
,
messages
:
(
window
.
coscine
&&
coscine
.
i18n
)
?
coscine
.
i18n
[
'
form-generator
'
]
:
{},
silentFallbackWarn
:
true
,
});
export
default
Vue
.
extend
({
i18n
,
name
:
'
InputBooleanCombobox
'
,
beforeMount
()
{
i18n
.
locale
=
this
.
languageCode
;
// set the datatype
this
.
$set
(
this
.
formData
[
this
.
nodeName
][
0
],
'
type
'
,
'
literal
'
);
this
.
$set
(
@@ -54,11 +66,13 @@ export default Vue.extend({
},
methods
:
{
input
()
{
if
(
this
.
selectedOption
!==
null
)
{
this
.
$set
(
this
.
formData
[
this
.
nodeName
][
0
],
'
value
'
,
(
this
.
selectedOption
as
any
).
value
);
}
else
{
this
.
$set
(
this
.
formData
[
this
.
nodeName
][
0
],
'
value
'
,
''
);
}
FieldReader
.
setField
(
this
.
formData
,
this
.
v
,
this
.
nodeName
,
this
.
selectedOption
!==
null
?
(
this
.
selectedOption
as
any
).
value
:
''
,
this
.
$set
);
this
.
updateFixedValues
();
},
loadData
()
{
@@ -81,9 +95,8 @@ export default Vue.extend({
locked
:
Boolean
,
required
:
Boolean
,
nodeName
:
String
,
formFieldInformation
:
Object
,
formFieldInformation
:
Array
,
formData
:
Object
,
fixedValues
:
Object
,
fixedValueMode
:
Boolean
,
disabledMode
:
Boolean
,
checkField
:
Function
,
@@ -91,6 +104,7 @@ export default Vue.extend({
resourceId
:
String
,
projectId
:
String
,
languageCode
:
String
,
v
:
Object
,
},
components
:
{
Multiselect
,
Loading