From 8e8f2ab037d7d336aa68ffa1cc64aeae8e3e2a1e Mon Sep 17 00:00:00 2001 From: Thomas Randolph Date: Fri, 20 May 2022 21:07:27 -0600 Subject: [PATCH 1/2] Convert git strategy radio buttons in Project CI/CD settings --- .../projects/settings/ci_cd/_form.html.haml | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 508e63f77d83fe..ece26184141f3a 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -44,20 +44,14 @@ %p = _("Choose which Git strategy to use when fetching the project.") = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'choose-the-default-git-strategy'), target: '_blank', rel: 'noopener noreferrer' - .form-check - = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' } - = f.label :build_allow_git_fetch_false, class: 'form-check-label' do - %strong git clone - %br - %span - = _("For each job, clone the repository.") - .form-check - = f.radio_button :build_allow_git_fetch, 'true', { class: 'form-check-input' } - = f.label :build_allow_git_fetch_true, class: 'form-check-label' do - %strong git fetch - %br - %span - = html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: ''.html_safe, code_close: ''.html_safe } + = f.gitlab_ui_radio_component :build_allow_git_fetch, + false, + "git clone", + help_text: _("For each job, clone the repository.") + = f.gitlab_ui_radio_component :build_allow_git_fetch, + true, + "git fetch", + help_text: html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: ''.html_safe, code_close: ''.html_safe } .form-group = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| -- GitLab From 9c4b823f59546481bab1def684c913762a4c97a6 Mon Sep 17 00:00:00 2001 From: Thomas Randolph Date: Tue, 24 May 2022 13:33:07 -0600 Subject: [PATCH 2/2] Adjust spacing in form group --- app/views/projects/settings/ci_cd/_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index ece26184141f3a..9419dacc16f4ab 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -39,9 +39,9 @@ %hr .form-group - %h5.gl-mt-0 + %h5.gl-mt-0.gl-mb-3 = _("Git strategy") - %p + .gl-mb-3 = _("Choose which Git strategy to use when fetching the project.") = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'choose-the-default-git-strategy'), target: '_blank', rel: 'noopener noreferrer' = f.gitlab_ui_radio_component :build_allow_git_fetch, -- GitLab