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
396ef600
Commit
396ef600
authored
Mar 12, 2021
by
Peter Hegman
Committed by
Robert Speicher
Mar 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix styling of "Enabled OAuth sign-in sources" checkboxes
Convert to normal checkboxes
parent
2f62d2af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
+25
-13
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+13
-8
app/views/admin/application_settings/_signin.html.haml
app/views/admin/application_settings/_signin.html.haml
+4
-5
changelogs/unreleased/29126-enabled-oauth-sign-in-sources-has-confusing-ui-for-disabling-enabli.yml
...sign-in-sources-has-confusing-ui-for-disabling-enabli.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/helpers/application_settings_helper.rb
View file @
396ef600
...
@@ -102,15 +102,20 @@ module ApplicationSettingsHelper
...
@@ -102,15 +102,20 @@ module ApplicationSettingsHelper
def
oauth_providers_checkboxes
def
oauth_providers_checkboxes
button_based_providers
.
map
do
|
source
|
button_based_providers
.
map
do
|
source
|
disabled
=
@application_setting
.
disabled_oauth_sign_in_sources
.
include?
(
source
.
to_s
)
disabled
=
@application_setting
.
disabled_oauth_sign_in_sources
.
include?
(
source
.
to_s
)
css_class
=
[
'btn'
]
css_class
<<
'active'
unless
disabled
checkbox_name
=
'application_setting[enabled_oauth_sign_in_sources][]'
name
=
Gitlab
::
Auth
::
OAuth
::
Provider
.
label_for
(
source
)
name
=
Gitlab
::
Auth
::
OAuth
::
Provider
.
label_for
(
source
)
checkbox_name
=
'application_setting[enabled_oauth_sign_in_sources][]'
label_tag
(
checkbox_name
,
class:
css_class
.
join
(
' '
))
do
checkbox_id
=
"application_setting_enabled_oauth_sign_in_sources_
#{
name
.
parameterize
(
separator:
'_'
)
}
"
check_box_tag
(
checkbox_name
,
source
,
!
disabled
,
autocomplete:
'off'
,
content_tag
:div
,
class:
'form-check'
do
id:
name
.
tr
(
' '
,
'_'
))
+
name
check_box_tag
(
checkbox_name
,
source
,
!
disabled
,
autocomplete:
'off'
,
id:
checkbox_id
,
class:
'form-check-input'
)
+
label_tag
(
checkbox_id
,
name
,
class:
'form-check-label'
)
end
end
end
end
end
end
...
...
app/views/admin/application_settings/_signin.html.haml
View file @
396ef600
...
@@ -20,12 +20,11 @@
...
@@ -20,12 +20,11 @@
or LDAP password
or LDAP password
must be used to authenticate.
must be used to authenticate.
-
if
omniauth_enabled?
&&
button_based_providers
.
any?
-
if
omniauth_enabled?
&&
button_based_providers
.
any?
.form-group
%fieldset
.form-group
=
f
.
label
:enabled_oauth_sign_in_sources
,
'Enabled OAuth sign-in sources'
,
class:
'label-bold'
%legend
.gl-font-base.gl-mb-3.gl-border-none.gl-font-weight-bold
=
_
(
'Enabled OAuth sign-in sources'
)
=
hidden_field_tag
'application_setting[enabled_oauth_sign_in_sources][]'
=
hidden_field_tag
'application_setting[enabled_oauth_sign_in_sources][]'
.btn-group
{
data:
{
toggle:
'buttons'
}
}
-
oauth_providers_checkboxes
.
each
do
|
source
|
-
oauth_providers_checkboxes
.
each
do
|
source
|
=
source
=
source
.form-group
.form-group
=
f
.
label
:two_factor_authentication
,
'Two-factor authentication'
,
class:
'label-bold'
=
f
.
label
:two_factor_authentication
,
'Two-factor authentication'
,
class:
'label-bold'
.form-check
.form-check
...
...
changelogs/unreleased/29126-enabled-oauth-sign-in-sources-has-confusing-ui-for-disabling-enabli.yml
0 → 100644
View file @
396ef600
---
title
:
Fix styling of "Enabled OAuth sign-in sources" checkboxes
merge_request
:
56254
author
:
type
:
fixed
locale/gitlab.pot
View file @
396ef600
...
@@ -11512,6 +11512,9 @@ msgstr ""
...
@@ -11512,6 +11512,9 @@ msgstr ""
msgid "Enabled Git access protocols"
msgid "Enabled Git access protocols"
msgstr ""
msgstr ""
msgid "Enabled OAuth sign-in sources"
msgstr ""
msgid "Enabled sources for code import during project creation. OmniAuth must be configured for GitHub"
msgid "Enabled sources for code import during project creation. OmniAuth must be configured for GitHub"
msgstr ""
msgstr ""
...
...
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