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
7f63cc0d
Commit
7f63cc0d
authored
Jul 23, 2021
by
Kev
Committed by
Peter Hegman
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate group permissions checkboxes to gitlab_ui_checkbox_component
parent
3e8bc389
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
app/views/groups/settings/_permissions.html.haml
app/views/groups/settings/_permissions.html.haml
+12
-16
spec/views/groups/edit.html.haml_spec.rb
spec/views/groups/edit.html.haml_spec.rb
+1
-1
No files found.
app/views/groups/settings/_permissions.html.haml
View file @
7f63cc0d
...
...
@@ -15,26 +15,22 @@
checkbox_options:
{
disabled:
!
can_change_prevent_sharing_groups_outside_hierarchy?
(
@group
)
}
.form-group.gl-mb-3
.gl-form-checkbox.custom-control.custom-checkbox
=
f
.
check_box
:share_with_group_lock
,
disabled:
!
can_change_share_with_group_lock?
(
@group
),
class:
'custom-control-input'
=
f
.
label
:share_with_group_lock
,
class:
'custom-control-label'
do
%span
=
s_
(
'GroupSettings|Prevent sharing a project within %{group} with other groups'
).
html_safe
%
{
group:
link_to_group
(
@group
)
}
%p
.js-descr.help-text
=
share_with_group_lock_help_text
(
@group
)
=
f
.
gitlab_ui_checkbox_component
:share_with_group_lock
,
s_
(
'GroupSettings|Prevent sharing a project within %{group} with other groups'
).
html_safe
%
{
group:
link_to_group
(
@group
)
},
checkbox_options:
{
disabled:
!
can_change_share_with_group_lock?
(
@group
)
},
help_text:
share_with_group_lock_help_text
(
@group
)
.form-group.gl-mb-3
.gl-form-checkbox.custom-control.custom-checkbox
=
f
.
check_box
:emails_disabled
,
checked:
@group
.
emails_disabled?
,
disabled:
!
can_disable_group_emails?
(
@group
),
class:
'custom-control-input'
=
f
.
label
:emails_disabled
,
class:
'custom-control-label'
do
%span
=
s_
(
'GroupSettings|Disable email notifications'
)
%p
.help-text
=
s_
(
'GroupSettings|This setting will override user notification preferences for all members of the group, subgroups, and projects.'
)
=
f
.
gitlab_ui_checkbox_component
:emails_disabled
,
s_
(
'GroupSettings|Disable email notifications'
),
checkbox_options:
{
checked:
@group
.
emails_disabled?
,
disabled:
!
can_disable_group_emails?
(
@group
)
},
help_text:
s_
(
'GroupSettings|This setting will override user notification preferences for all members of the group, subgroups, and projects.'
)
.form-group.gl-mb-3
.gl-form-checkbox.custom-control.custom-checkbox
=
f
.
check_box
:mentions_disabled
,
checked:
@group
.
mentions_disabled?
,
class:
'custom-control-input'
=
f
.
label
:mentions_disabled
,
class:
'custom-control-label'
do
%span
=
s_
(
'GroupSettings|Disable group mentions'
)
%p
.help-text
=
s_
(
'GroupSettings|This setting will prevent group members from being notified if the group is mentioned.'
)
=
f
.
gitlab_ui_checkbox_component
:mentions_disabled
,
s_
(
'GroupSettings|Disable group mentions'
),
checkbox_options:
{
checked:
@group
.
mentions_disabled?
},
help_text:
s_
(
'GroupSettings|This setting will prevent group members from being notified if the group is mentioned.'
)
=
render
'groups/settings/project_access_token_creation'
,
f:
f
,
group:
@group
=
render_if_exists
'groups/settings/delayed_project_removal'
,
f:
f
,
group:
@group
...
...
spec/views/groups/edit.html.haml_spec.rb
View file @
7f63cc0d
...
...
@@ -25,7 +25,7 @@ RSpec.describe 'groups/edit.html.haml' do
render
expect
(
rendered
).
to
have_content
(
"Prevent sharing a project within
#{
test_group
.
name
}
with other groups"
)
expect
(
rendered
).
to
have_css
(
'.
js-descr
'
,
text:
'help text here'
)
expect
(
rendered
).
to
have_css
(
'.
help-text
'
,
text:
'help text here'
)
expect
(
rendered
).
to
have_field
(
'group_share_with_group_lock'
,
**
checkbox_options
)
end
end
...
...
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