debian-mirror-gitlab/app/views/shared/deploy_tokens/_form.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
3.2 KiB
Text
Raw Normal View History

2018-05-09 12:01:36 +05:30
%p.profile-settings-content
2021-10-27 15:23:28 +05:30
- group_deploy_tokens_help_link_url = help_page_path('user/project/deploy_tokens/index.md')
- 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 }
2018-05-09 12:01:36 +05:30
2022-07-16 23:28:13 +05:30
= 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|
2018-05-09 12:01:36 +05:30
.form-group
2018-11-18 11:00:15 +05:30
= f.label :name, class: 'label-bold'
2021-06-08 01:23:25 +05:30
= f.text_field :name, class: 'form-control gl-form-input', data: { qa_selector: 'deploy_token_name_field' }, required: true
2021-10-27 15:23:28 +05:30
.text-secondary= s_('DeployTokens|Enter a unique name for your deploy token.')
2018-05-09 12:01:36 +05:30
.form-group
2021-10-27 15:23:28 +05:30
= f.label :expires_at, _('Expiration date (optional)'), class: 'label-bold'
2021-06-08 01:23:25 +05:30
= f.text_field :expires_at, class: 'datepicker form-control', data: { qa_selector: 'deploy_token_expires_at_field' }, value: f.object.expires_at
2021-10-27 15:23:28 +05:30
.text-secondary= s_('DeployTokens|Enter an expiration date for your token. Defaults to never expire.')
2018-05-09 12:01:36 +05:30
2019-09-30 21:07:59 +05:30
.form-group
2021-03-11 19:13:27 +05:30
= f.label :username, _('Username (optional)'), class: 'label-bold'
2021-06-08 01:23:25 +05:30
= f.text_field :username, class: 'form-control'
2021-10-27 15:23:28 +05:30
.text-secondary
= html_escape(s_('DeployTokens|Enter a username for your token. Defaults to %{code_start}gitlab+deploy-token-{n}%{code_end}.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }
2019-09-30 21:07:59 +05:30
2018-05-09 12:01:36 +05:30
.form-group
2021-10-27 15:23:28 +05:30
= f.label :scopes, _('Scopes (select at least one)'), class: 'label-bold'
2022-07-16 23:28:13 +05:30
= 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' } }
2018-05-09 12:01:36 +05:30
2020-04-08 14:13:33 +05:30
- if container_registry_enabled?(group_or_project)
2022-07-16 23:28:13 +05:30
= 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' } }
2020-04-22 19:07:51 +05:30
2020-11-24 15:15:51 +05:30
- if packages_registry_enabled?(group_or_project)
2022-07-16 23:28:13 +05:30
= 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' } }
2020-05-24 23:13:21 +05:30
2021-01-03 14:25:43 +05:30
.gl-mt-3
2021-06-08 01:23:25 +05:30
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm', data: { qa_selector: 'create_deploy_token_button' }