summaryrefslogtreecommitdiff
path: root/app/views/shared/_personal_access_tokens_form.html.haml
blob: e415ec64c3813ff738747bb06692c0c370d800b4 (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
- type = impersonation ? "impersonation" : "personal access"

%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.

= form_for token, url: path, method: :post, html: { class: 'js-requires-input' } do |f|

  = form_errors(token)

  .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'
    = f.text_field :expires_at, class: "datepicker form-control"

  .form-group
    = f.label :scopes, class: 'label-light'
    = render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes

  .prepend-top-default
    = f.submit "Create #{type} token", class: "btn btn-create"