Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a3336953
Commit
a3336953
authored
Jun 17, 2020
by
Justin Ho
Committed by
Lukas Eipert
Jul 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable form fields when not overriding
Apply to all form components
parent
28d65da6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
4 deletions
+34
-4
app/assets/javascripts/integrations/edit/components/active_toggle.vue
...avascripts/integrations/edit/components/active_toggle.vue
+5
-0
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
...avascripts/integrations/edit/components/dynamic_field.vue
+3
-0
app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
...ipts/integrations/edit/components/jira_trigger_fields.vue
+18
-3
app/assets/javascripts/integrations/edit/components/trigger_fields.vue
...vascripts/integrations/edit/components/trigger_fields.vue
+8
-1
No files found.
app/assets/javascripts/integrations/edit/components/active_toggle.vue
View file @
a3336953
<
script
>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
GlFormGroup
,
GlToggle
}
from
'
@gitlab/ui
'
;
import
{
GlFormGroup
,
GlToggle
}
from
'
@gitlab/ui
'
;
...
@@ -21,6 +22,9 @@ export default {
...
@@ -21,6 +22,9 @@ export default {
activated
:
this
.
initialActivated
,
activated
:
this
.
initialActivated
,
};
};
},
},
computed
:
{
...
mapGetters
([
'
disableForm
'
]),
},
mounted
()
{
mounted
()
{
// Initialize view
// Initialize view
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
@@ -42,6 +46,7 @@ export default {
...
@@ -42,6 +46,7 @@ export default {
v-model=
"activated"
v-model=
"activated"
name=
"service[active]"
name=
"service[active]"
class=
"gl-display-block gl-line-height-0"
class=
"gl-display-block gl-line-height-0"
:disabled=
"disableForm"
@
change=
"onToggle"
@
change=
"onToggle"
/>
/>
</gl-form-group>
</gl-form-group>
...
...
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
View file @
a3336953
<
script
>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
capitalize
,
lowerCase
,
isEmpty
}
from
'
lodash
'
;
import
{
capitalize
,
lowerCase
,
isEmpty
}
from
'
lodash
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
...
@@ -59,6 +60,7 @@ export default {
...
@@ -59,6 +60,7 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'
disableForm
'
]),
isCheckbox
()
{
isCheckbox
()
{
return
this
.
type
===
'
checkbox
'
;
return
this
.
type
===
'
checkbox
'
;
},
},
...
@@ -107,6 +109,7 @@ export default {
...
@@ -107,6 +109,7 @@ export default {
id
:
this
.
fieldId
,
id
:
this
.
fieldId
,
name
:
this
.
fieldName
,
name
:
this
.
fieldName
,
state
:
this
.
valid
,
state
:
this
.
valid
,
disabled
:
this
.
disableForm
,
};
};
},
},
valid
()
{
valid
()
{
...
...
app/assets/javascripts/integrations/edit/components/jira_trigger_fields.vue
View file @
a3336953
<
script
>
<
script
>
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
{
mapGetters
}
from
'
vuex
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
GlFormGroup
,
GlFormCheckbox
,
GlFormRadio
}
from
'
@gitlab/ui
'
;
import
{
GlFormGroup
,
GlFormCheckbox
,
GlFormRadio
}
from
'
@gitlab/ui
'
;
...
@@ -55,6 +56,7 @@ export default {
...
@@ -55,6 +56,7 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'
disableForm
'
]),
showEnableComments
()
{
showEnableComments
()
{
return
this
.
triggerCommit
||
this
.
triggerMergeRequest
;
return
this
.
triggerCommit
||
this
.
triggerMergeRequest
;
},
},
...
@@ -74,12 +76,20 @@ export default {
...
@@ -74,12 +76,20 @@ export default {
"
"
>
>
<input
name=
"service[commit_events]"
type=
"hidden"
value=
"false"
/>
<input
name=
"service[commit_events]"
type=
"hidden"
value=
"false"
/>
<gl-form-checkbox
v-model=
"triggerCommit"
name=
"service[commit_events]"
>
<gl-form-checkbox
v-model=
"triggerCommit"
name=
"service[commit_events]"
:disabled=
"disableForm"
>
{{
__
(
'
Commit
'
)
}}
{{
__
(
'
Commit
'
)
}}
</gl-form-checkbox>
</gl-form-checkbox>
<input
name=
"service[merge_requests_events]"
type=
"hidden"
value=
"false"
/>
<input
name=
"service[merge_requests_events]"
type=
"hidden"
value=
"false"
/>
<gl-form-checkbox
v-model=
"triggerMergeRequest"
name=
"service[merge_requests_events]"
>
<gl-form-checkbox
v-model=
"triggerMergeRequest"
name=
"service[merge_requests_events]"
:disabled=
"disableForm"
>
{{
__
(
'
Merge request
'
)
}}
{{
__
(
'
Merge request
'
)
}}
</gl-form-checkbox>
</gl-form-checkbox>
</gl-form-group>
</gl-form-group>
...
@@ -90,7 +100,11 @@ export default {
...
@@ -90,7 +100,11 @@ export default {
data-testid=
"comment-settings"
data-testid=
"comment-settings"
>
>
<input
name=
"service[comment_on_event_enabled]"
type=
"hidden"
value=
"false"
/>
<input
name=
"service[comment_on_event_enabled]"
type=
"hidden"
value=
"false"
/>
<gl-form-checkbox
v-model=
"enableComments"
name=
"service[comment_on_event_enabled]"
>
<gl-form-checkbox
v-model=
"enableComments"
name=
"service[comment_on_event_enabled]"
:disabled=
"disableForm"
>
{{
s__
(
'
Integrations|Enable comments
'
)
}}
{{
s__
(
'
Integrations|Enable comments
'
)
}}
</gl-form-checkbox>
</gl-form-checkbox>
</gl-form-group>
</gl-form-group>
...
@@ -106,6 +120,7 @@ export default {
...
@@ -106,6 +120,7 @@ export default {
v-model=
"commentDetail"
v-model=
"commentDetail"
:value=
"commentDetailOption.value"
:value=
"commentDetailOption.value"
name=
"service[comment_detail]"
name=
"service[comment_detail]"
:disabled=
"disableForm"
>
>
{{
commentDetailOption
.
label
}}
{{
commentDetailOption
.
label
}}
<template
#help
>
<template
#help
>
...
...
app/assets/javascripts/integrations/edit/components/trigger_fields.vue
View file @
a3336953
<
script
>
<
script
>
import
{
mapGetters
}
from
'
vuex
'
;
import
{
startCase
}
from
'
lodash
'
;
import
{
startCase
}
from
'
lodash
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
GlFormGroup
,
GlFormCheckbox
,
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
GlFormGroup
,
GlFormCheckbox
,
GlFormInput
}
from
'
@gitlab/ui
'
;
...
@@ -32,6 +33,7 @@ export default {
...
@@ -32,6 +33,7 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'
disableForm
'
]),
placeholder
()
{
placeholder
()
{
return
placeholderForType
[
this
.
type
];
return
placeholderForType
[
this
.
type
];
},
},
...
@@ -58,7 +60,11 @@ export default {
...
@@ -58,7 +60,11 @@ export default {
<div
id=
"trigger-fields"
class=
"gl-pt-3"
>
<div
id=
"trigger-fields"
class=
"gl-pt-3"
>
<gl-form-group
v-for=
"event in events"
:key=
"event.title"
:description=
"event.description"
>
<gl-form-group
v-for=
"event in events"
:key=
"event.title"
:description=
"event.description"
>
<input
:name=
"checkboxName(event.name)"
type=
"hidden"
value=
"false"
/>
<input
:name=
"checkboxName(event.name)"
type=
"hidden"
value=
"false"
/>
<gl-form-checkbox
v-model=
"event.value"
:name=
"checkboxName(event.name)"
>
<gl-form-checkbox
v-model=
"event.value"
:name=
"checkboxName(event.name)"
:disabled=
"disableForm"
>
{{
startCase
(
event
.
title
)
}}
{{
startCase
(
event
.
title
)
}}
</gl-form-checkbox>
</gl-form-checkbox>
<gl-form-input
<gl-form-input
...
@@ -66,6 +72,7 @@ export default {
...
@@ -66,6 +72,7 @@ export default {
v-model=
"event.field.value"
v-model=
"event.field.value"
:name=
"fieldName(event.field.name)"
:name=
"fieldName(event.field.name)"
:placeholder=
"placeholder"
:placeholder=
"placeholder"
:disabled=
"disableForm"
/>
/>
</gl-form-group>
</gl-form-group>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
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