summaryrefslogtreecommitdiff
path: root/app/views/projects/deploy_tokens/_form.html.haml
blob: 5412fcbc9d8f99baa45ce33feff3b7e66d2e98fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
%p.profile-settings-content
  = s_("DeployTokens|Pick a name for the application, and we'll give you a unique deploy token.")

= form_for token, url: create_deploy_token_namespace_project_settings_repository_path(project.namespace, project, anchor: 'js-deploy-tokens'), method: :post do |f|
  = form_errors(token)

  .form-group
    = f.label :name, class: 'label-bold'
    = f.text_field :name, class: 'form-control qa-deploy-token-name', required: true

  .form-group
    = f.label :expires_at, class: 'label-bold'
    = f.text_field :expires_at, class: 'datepicker form-control qa-deploy-token-expires-at', value: f.object.expires_at

  .form-group
    = f.label :scopes, class: 'label-bold'
    %fieldset.form-group.form-check
      = f.check_box :read_repository, class: 'form-check-input qa-deploy-token-read-repository'
      = label_tag ("deploy_token_read_repository"), 'read_repository', class: 'label-bold form-check-label'
      .text-secondary= s_('DeployTokens|Allows read-only access to the repository')

    - if container_registry_enabled?(project)
      %fieldset.form-group.form-check
        = f.check_box :read_registry, class: 'form-check-input qa-deploy-token-read-registry'
        = label_tag ("deploy_token_read_registry"), 'read_registry', class: 'label-bold form-check-label'
        .text-secondary= s_('DeployTokens|Allows read-only access to the registry images')

  .prepend-top-default
    = f.submit s_('DeployTokens|Create deploy token'), class: 'btn btn-success qa-create-deploy-token'