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
de21cfd1
Commit
de21cfd1
authored
Nov 19, 2016
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swapped buttons for checkboxes
parent
9aded5c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+4
-4
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+2
-4
changelogs/unreleased/24161-non-intuitive-buttons-for-import-sources-in-administrator-settings-enable-disable.yml
...port-sources-in-administrator-settings-enable-disable.yml
+4
-0
No files found.
app/helpers/application_settings_helper.rb
View file @
de21cfd1
...
@@ -67,14 +67,14 @@ module ApplicationSettingsHelper
...
@@ -67,14 +67,14 @@ module ApplicationSettingsHelper
def
import_sources_checkboxes
(
help_block_id
)
def
import_sources_checkboxes
(
help_block_id
)
Gitlab
::
ImportSources
.
options
.
map
do
|
name
,
source
|
Gitlab
::
ImportSources
.
options
.
map
do
|
name
,
source
|
checked
=
current_application_settings
.
import_sources
.
include?
(
source
)
checked
=
current_application_settings
.
import_sources
.
include?
(
source
)
css_class
=
'btn'
css_class
=
checked
?
'active'
:
''
css_class
+=
' active'
if
checked
checkbox_name
=
'application_setting[import_sources][]'
checkbox_name
=
'application_setting[import_sources][]'
label_tag
(
checkbox_
name
,
class:
css_class
)
do
label_tag
(
name
,
class:
css_class
)
do
check_box_tag
(
checkbox_name
,
source
,
checked
,
check_box_tag
(
checkbox_name
,
source
,
checked
,
autocomplete:
'off'
,
autocomplete:
'off'
,
'aria-describedby'
=>
help_block_id
)
+
name
'aria-describedby'
=>
help_block_id
,
id:
name
.
tr
(
' '
,
'_'
))
+
name
end
end
end
end
end
end
...
...
app/views/admin/application_settings/_form.html.haml
View file @
de21cfd1
...
@@ -32,10 +32,8 @@
...
@@ -32,10 +32,8 @@
.form-group
.form-group
=
f
.
label
:import_sources
,
class:
'control-label col-sm-2'
=
f
.
label
:import_sources
,
class:
'control-label col-sm-2'
.col-sm-10
.col-sm-10
-
data_attrs
=
{
toggle:
'buttons'
}
-
import_sources_checkboxes
(
'import-sources-help'
).
each
do
|
source
|
.btn-group
{
data:
data_attrs
}
.checkbox
=
source
-
import_sources_checkboxes
(
'import-sources-help'
).
each
do
|
source
|
=
source
%span
.help-block
#import-sources-help
%span
.help-block
#import-sources-help
Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
Enabled sources for code import during project creation. OmniAuth must be configured for GitHub
=
link_to
"(?)"
,
help_page_path
(
"integration/github"
)
=
link_to
"(?)"
,
help_page_path
(
"integration/github"
)
...
...
changelogs/unreleased/24161-non-intuitive-buttons-for-import-sources-in-administrator-settings-enable-disable.yml
0 → 100644
View file @
de21cfd1
---
title
:
Changed import sources buttons to checkboxes
merge_request
:
7598
author
:
Luke "Jared" Bennett
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