2018-03-19 16:11:12 +00:00
|
|
|
%p.profile-settings-content
|
2018-04-02 15:57:44 +00:00
|
|
|
= s_("DeployTokens|Pick a name for the application, and we'll give you a unique deploy token.")
|
2018-03-19 16:11:12 +00:00
|
|
|
|
2020-04-01 12:08:00 +00:00
|
|
|
= 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-03-19 16:11:12 +00:00
|
|
|
= form_errors(token)
|
|
|
|
|
|
|
|
.form-group
|
2018-07-19 22:11:31 +00:00
|
|
|
= f.label :name, class: 'label-bold'
|
2018-10-08 22:31:57 +00:00
|
|
|
= f.text_field :name, class: 'form-control qa-deploy-token-name', required: true
|
2018-03-19 16:11:12 +00:00
|
|
|
|
|
|
|
.form-group
|
2018-07-19 22:11:31 +00:00
|
|
|
= f.label :expires_at, class: 'label-bold'
|
2018-10-08 22:31:57 +00:00
|
|
|
= f.text_field :expires_at, class: 'datepicker form-control qa-deploy-token-expires-at', value: f.object.expires_at
|
2018-03-19 16:11:12 +00:00
|
|
|
|
2019-07-02 18:56:48 +00:00
|
|
|
.form-group
|
|
|
|
= f.label :username, class: 'label-bold'
|
|
|
|
= f.text_field :username, class: 'form-control qa-deploy-token-username'
|
|
|
|
.text-secondary= s_('DeployTokens|Default format is "gitlab+deploy-token-{n}". Enter custom username if you want to change it.')
|
|
|
|
|
2018-03-19 16:11:12 +00:00
|
|
|
.form-group
|
2018-07-19 22:11:31 +00:00
|
|
|
= f.label :scopes, class: 'label-bold'
|
2018-07-18 13:05:30 +00:00
|
|
|
%fieldset.form-group.form-check
|
2018-10-08 22:31:57 +00:00
|
|
|
= f.check_box :read_repository, class: 'form-check-input qa-deploy-token-read-repository'
|
2018-07-19 22:11:31 +00:00
|
|
|
= label_tag ("deploy_token_read_repository"), 'read_repository', class: 'label-bold form-check-label'
|
2018-07-18 13:05:30 +00:00
|
|
|
.text-secondary= s_('DeployTokens|Allows read-only access to the repository')
|
2018-04-06 14:30:21 +00:00
|
|
|
|
2020-02-28 18:09:07 +00:00
|
|
|
- if container_registry_enabled?(group_or_project)
|
2018-07-18 13:05:30 +00:00
|
|
|
%fieldset.form-group.form-check
|
2018-10-08 22:31:57 +00:00
|
|
|
= f.check_box :read_registry, class: 'form-check-input qa-deploy-token-read-registry'
|
2018-07-19 22:11:31 +00:00
|
|
|
= label_tag ("deploy_token_read_registry"), 'read_registry', class: 'label-bold form-check-label'
|
2018-07-18 13:05:30 +00:00
|
|
|
.text-secondary= s_('DeployTokens|Allows read-only access to the registry images')
|
2018-03-19 16:11:12 +00:00
|
|
|
|
|
|
|
.prepend-top-default
|
2018-10-08 22:31:57 +00:00
|
|
|
= f.submit s_('DeployTokens|Create deploy token'), class: 'btn btn-success qa-create-deploy-token'
|