debian-mirror-gitlab/app/views/shared/_personal_access_tokens_form.html.haml

30 lines
1.1 KiB
Text
Raw Normal View History

2019-09-30 21:07:59 +05:30
- type = impersonation ? s_('Profiles|impersonation') : s_('Profiles|personal access')
2017-08-17 22:00:37 +05:30
%h5.prepend-top-0
2019-09-30 21:07:59 +05:30
= _('Add a %{type} token') % { type: type }
2017-08-17 22:00:37 +05:30
%p.profile-settings-content
2019-09-30 21:07:59 +05:30
= _("Pick a name for the application, and we'll give you a unique %{type} token.") % { type: type }
2017-08-17 22:00:37 +05:30
= form_for token, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
= form_errors(token)
2018-11-08 19:23:39 +05:30
.row
.form-group.col-md-6
2019-09-30 21:07:59 +05:30
= f.label :name, _('Name'), class: 'label-bold'
2019-02-15 15:39:39 +05:30
= f.text_field :name, class: "form-control qa-personal-access-token-name-field", required: true
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
.row
.form-group.col-md-6
2019-09-30 21:07:59 +05:30
= f.label :expires_at, _('Expires at'), class: 'label-bold'
2018-11-08 19:23:39 +05:30
.input-icon-wrapper
= f.text_field :expires_at, class: "datepicker form-control", placeholder: 'YYYY-MM-DD'
= icon('calendar', { class: 'input-icon-right' })
2017-08-17 22:00:37 +05:30
.form-group
2019-09-30 21:07:59 +05:30
= f.label :scopes, _('Scopes'), class: 'label-bold'
2017-08-17 22:00:37 +05:30
= render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes
.prepend-top-default
2019-09-30 21:07:59 +05:30
= f.submit _('Create %{type} token') % { type: type }, class: "btn btn-success qa-create-token-button"