34 lines
1.4 KiB
Text
34 lines
1.4 KiB
Text
- title = local_assigns.fetch(:title, _('Add a %{type}') % { type: type })
|
|
- prefix = local_assigns.fetch(:prefix, :personal_access_token)
|
|
|
|
%h5.prepend-top-0
|
|
= title
|
|
%p.profile-settings-content
|
|
= _("Enter the name of your application, and we'll return a unique %{type}.") % { type: type }
|
|
|
|
= form_for token, as: prefix, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
|
|
|
|
= form_errors(token)
|
|
|
|
.row
|
|
.form-group.col-md-6
|
|
= f.label :name, _('Name'), class: 'label-bold'
|
|
= f.text_field :name, class: 'form-control', required: true, data: { qa_selector: 'access_token_name_field' }
|
|
|
|
.row
|
|
.form-group.col-md-6
|
|
= f.label :expires_at, _('Expires at'), class: 'label-bold'
|
|
.input-icon-wrapper
|
|
|
|
= render_if_exists 'personal_access_tokens/callout_max_personal_access_token_lifetime'
|
|
|
|
.js-access-tokens-expires-at
|
|
%expires-at-field
|
|
= f.text_field :expires_at, class: 'datepicker form-control gl-datepicker-input', placeholder: 'YYYY-MM-DD', autocomplete: 'off', inputmode: 'none', data: { qa_selector: 'expiry_date_field' }
|
|
|
|
.form-group
|
|
= f.label :scopes, _('Scopes'), class: 'label-bold'
|
|
= render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes
|
|
|
|
.prepend-top-default
|
|
= f.submit _('Create %{type}') % { type: type }, class: 'btn btn-success', data: { qa_selector: 'create_token_button' }
|