- type = impersonation ? s_('Profiles|impersonation') : s_('Profiles|personal access') %h5.prepend-top-0 = _('Add a %{type} token') % { type: type } %p.profile-settings-content = _("Pick a name for the application, and we'll give you a unique %{type} token.") % { type: type } = form_for token, 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 qa-personal-access-token-name-field", required: true .row .form-group.col-md-6 = f.label :expires_at, _('Expires at'), class: 'label-bold' .input-icon-wrapper = f.text_field :expires_at, class: "datepicker form-control", placeholder: 'YYYY-MM-DD' = icon('calendar', { class: 'input-icon-right' }) .form-group = f.label :scopes, _('Scopes'), class: 'label-bold' = render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes .prepend-top-default = f.submit _('Create %{type} token') % { type: type }, class: "btn btn-success qa-create-token-button"