2017-04-04 18:06:32 +00:00
|
|
|
- type = impersonation ? "impersonation" : "personal access"
|
2016-11-22 08:57:31 +00:00
|
|
|
|
2017-03-01 16:59:03 +00:00
|
|
|
%h5.prepend-top-0
|
|
|
|
Add a #{type} Token
|
|
|
|
%p.profile-settings-content
|
|
|
|
Pick a name for the application, and we'll give you a unique #{type} Token.
|
2016-12-05 04:19:51 +00:00
|
|
|
|
2017-03-01 16:59:03 +00:00
|
|
|
= form_for token, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
|
|
|
|
|
|
|
|
= form_errors(token)
|
2016-11-22 08:57:31 +00:00
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :name, class: 'label-light'
|
|
|
|
= f.text_field :name, class: "form-control", required: true
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :expires_at, class: 'label-light'
|
2016-12-05 04:19:51 +00:00
|
|
|
= f.text_field :expires_at, class: "datepicker form-control"
|
2016-11-22 08:57:31 +00:00
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :scopes, class: 'label-light'
|
2017-03-01 16:59:03 +00:00
|
|
|
= render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes
|
2016-11-22 08:57:31 +00:00
|
|
|
|
|
|
|
.prepend-top-default
|
2017-04-03 23:03:14 +00:00
|
|
|
= f.submit "Create #{type} token", class: "btn btn-create"
|