Commit 763e14c3 authored by Clement Ho's avatar Clement Ho

[skip ci] Replace .radio with .form-check

parent df8aa61a
...@@ -7,7 +7,7 @@ function setVisibilityOptions(namespaceSelector) { ...@@ -7,7 +7,7 @@ function setVisibilityOptions(namespaceSelector) {
const selectedNamespace = namespaceSelector.options[namespaceSelector.selectedIndex]; const selectedNamespace = namespaceSelector.options[namespaceSelector.selectedIndex];
const { name, visibility, visibilityLevel, showPath, editPath } = selectedNamespace.dataset; const { name, visibility, visibilityLevel, showPath, editPath } = selectedNamespace.dataset;
document.querySelectorAll('.visibility-level-setting .radio').forEach((option) => { document.querySelectorAll('.visibility-level-setting .form-check').forEach((option) => {
const optionInput = option.querySelector('input[type=radio]'); const optionInput = option.querySelector('input[type=radio]');
const optionValue = optionInput ? optionInput.value : 0; const optionValue = optionInput ? optionInput.value : 0;
const optionTitle = option.querySelector('.option-title'); const optionTitle = option.querySelector('.option-title');
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
Enable domain blacklist for sign ups Enable domain blacklist for sign ups
.form-group .form-group
.col-sm-offset-2.col-sm-10 .col-sm-offset-2.col-sm-10
.radio .form-check
= label_tag :blacklist_type_file do = label_tag :blacklist_type_file do
= radio_button_tag :blacklist_type, :file = radio_button_tag :blacklist_type, :file
.option-title .option-title
Upload blacklist file Upload blacklist file
.radio .form-check
= label_tag :blacklist_type_raw do = label_tag :blacklist_type_raw do
= radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank? = radio_button_tag :blacklist_type, :raw, @application_setting.domain_blacklist.present? || @application_setting.domain_blacklist.blank?
.option-title .option-title
......
- form = local_assigns.fetch(:form) - form = local_assigns.fetch(:form)
- project = local_assigns.fetch(:project) - project = local_assigns.fetch(:project)
.radio .form-check
= label_tag :project_merge_method_ff do = label_tag :project_merge_method_ff do
= form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff" = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff"
%strong Fast-forward merge %strong Fast-forward merge
......
- form = local_assigns.fetch(:form) - form = local_assigns.fetch(:form)
.radio .form-check
= label_tag :project_merge_method_rebase_merge do = label_tag :project_merge_method_rebase_merge do
= form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio" = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio"
%strong Merge commit with semi-linear history %strong Merge commit with semi-linear history
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.form-group .form-group
= label_tag :merge_method_merge, class: 'label-light' do = label_tag :merge_method_merge, class: 'label-light' do
Merge method Merge method
.radio .form-check
= label_tag :project_merge_method_merge do = label_tag :project_merge_method_merge do
= form.radio_button :merge_method, :merge, class: "js-merge-method-radio" = form.radio_button :merge_method, :merge, class: "js-merge-method-radio"
%strong Merge commit %strong Merge commit
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
%p.settings-message.text-center %p.settings-message.text-center
= message.html_safe = message.html_safe
= f.fields_for :auto_devops_attributes, @auto_devops do |form| = f.fields_for :auto_devops_attributes, @auto_devops do |form|
.radio .form-check
= form.label :enabled_true do = form.label :enabled_true do
= form.radio_button :enabled, 'true' = form.radio_button :enabled, 'true'
%strong Enable Auto DevOps %strong Enable Auto DevOps
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
%span.descr %span.descr
The Auto DevOps pipeline configuration will be used when there is no <code>.gitlab-ci.yml</code> in the project. The Auto DevOps pipeline configuration will be used when there is no <code>.gitlab-ci.yml</code> in the project.
.radio .form-check
= form.label :enabled_false do = form.label :enabled_false do
= form.radio_button :enabled, 'false' = form.radio_button :enabled, 'false'
%strong Disable Auto DevOps %strong Disable Auto DevOps
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
%span.descr %span.descr
An explicit <code>.gitlab-ci.yml</code> needs to be specified before you can begin using Continuous Integration and Delivery. An explicit <code>.gitlab-ci.yml</code> needs to be specified before you can begin using Continuous Integration and Delivery.
.radio .form-check
= form.label :enabled_ do = form.label :enabled_ do
= form.radio_button :enabled, '' = form.radio_button :enabled, ''
%strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'}) %strong Instance default (#{Gitlab::CurrentSettings.auto_devops_enabled? ? 'enabled' : 'disabled'})
...@@ -57,14 +57,14 @@ ...@@ -57,14 +57,14 @@
%p %p
Choose between <code>clone</code> or <code>fetch</code> to get the recent application code Choose between <code>clone</code> or <code>fetch</code> to get the recent application code
= link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank' = link_to icon('question-circle'), help_page_path('user/project/pipelines/settings', anchor: 'git-strategy'), target: '_blank'
.radio .form-check
= f.label :build_allow_git_fetch_false do = f.label :build_allow_git_fetch_false do
= f.radio_button :build_allow_git_fetch, 'false' = f.radio_button :build_allow_git_fetch, 'false'
%strong git clone %strong git clone
%br %br
%span.descr %span.descr
Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job Slower but makes sure the project workspace is pristine as it clones the repository from scratch for every job
.radio .form-check
= f.label :build_allow_git_fetch_true do = f.label :build_allow_git_fetch_true do
= f.radio_button :build_allow_git_fetch, 'true' = f.radio_button :build_allow_git_fetch, 'true'
%strong git fetch %strong git fetch
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- disallowed = disallowed_visibility_level?(form_model, level) - disallowed = disallowed_visibility_level?(form_model, level)
- restricted = restricted_visibility_levels.include?(level) - restricted = restricted_visibility_levels.include?(level)
- disabled = disallowed || restricted - disabled = disallowed || restricted
.radio{ class: [('disabled' if disabled), ('restricted' if restricted)] } .form-check{ class: [('disabled' if disabled), ('restricted' if restricted)] }
= form.label "#{model_method}_#{level}" do = form.label "#{model_method}_#{level}" do
= form.radio_button model_method, level, checked: (selected_level == level), disabled: disabled = form.radio_button model_method, level, checked: (selected_level == level), disabled: disabled
= visibility_level_icon(level) = visibility_level_icon(level)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment