diff options
Diffstat (limited to 'app/views/shared/deploy_tokens/_form.html.haml')
-rw-r--r-- | app/views/shared/deploy_tokens/_form.html.haml | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 7289121d9eb..2e04bbf3605 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -3,7 +3,7 @@ - group_deploy_tokens_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_deploy_tokens_help_link_url } = s_('DeployTokens|Create a new deploy token for all projects in this group. %{link_start}What are deploy tokens?%{link_end}').html_safe % { link_start: group_deploy_tokens_help_link_start, link_end: '</a>'.html_safe } -= form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f| += gitlab_ui_form_for token, url: create_deploy_token_path(group_or_project, anchor: 'js-deploy-tokens'), method: :post, remote: Feature.enabled?(:ajax_new_deploy_token, group_or_project) do |f| .form-group = f.label :name, class: 'label-bold' @@ -23,33 +23,15 @@ .form-group = f.label :scopes, _('Scopes (select at least one)'), class: 'label-bold' - %fieldset.form-group.form-check - = f.check_box :read_repository, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_repository_checkbox' } - = f.label :read_repository, 'read_repository', class: 'label-bold form-check-label' - .text-secondary - = s_('DeployTokens|Allows read-only access to the repository.') + = f.gitlab_ui_checkbox_component :read_repository, 'read_repository', help_text: s_('DeployTokens|Allows read-only access to the repository.'), checkbox_options: { data: { qa_selector: 'deploy_token_read_repository_checkbox' } } - if container_registry_enabled?(group_or_project) - %fieldset.form-group.form-check - = f.check_box :read_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_registry_checkbox' } - = f.label :read_registry, 'read_registry', class: 'label-bold form-check-label' - .text-secondary= s_('DeployTokens|Allows read-only access to registry images.') - - %fieldset.form-group.form-check - = f.check_box :write_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_write_registry_checkbox' } - = f.label :write_registry, 'write_registry', class: 'label-bold form-check-label' - .text-secondary= s_('DeployTokens|Allows write access to registry images.') + = f.gitlab_ui_checkbox_component :read_registry, 'read_registry', help_text: s_('DeployTokens|Allows read-only access to registry images.'), checkbox_options: { data: { qa_selector: 'deploy_token_read_registry_checkbox' } } + = f.gitlab_ui_checkbox_component :write_registry, 'write_registry', help_text: s_('DeployTokens|Allows write access to registry images.'), checkbox_options: { data: { qa_selector: 'deploy_token_write_registry_checkbox' } } - if packages_registry_enabled?(group_or_project) - %fieldset.form-group.form-check - = f.check_box :read_package_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_read_package_registry_checkbox' } - = f.label :read_package_registry, 'read_package_registry', class: 'label-bold form-check-label' - .text-secondary= s_('DeployTokens|Allows read-only access to the package registry.') - - %fieldset.form-group.form-check - = f.check_box :write_package_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_write_package_registry_checkbox' } - = f.label :write_package_registry, 'write_package_registry', class: 'label-bold form-check-label' - .text-secondary= s_('DeployTokens|Allows read and write access to the package registry.') + = f.gitlab_ui_checkbox_component :read_package_registry, 'read_package_registry', help_text: s_('DeployTokens|Allows read-only access to the package registry.'), checkbox_options: { data: { qa_selector: 'deploy_token_read_package_registry_checkbox' } } + = f.gitlab_ui_checkbox_component :write_package_registry, 'write_package_registry', help_text: s_('DeployTokens|Allows read and write access to the package registry.'), checkbox_options: { data: { qa_selector: 'deploy_token_write_package_registry_checkbox' } } .gl-mt-3 = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm', data: { qa_selector: 'create_deploy_token_button' } |