summaryrefslogtreecommitdiff
path: root/app/views/shared/doorkeeper/applications/_form.html.haml
blob: adfd7ea98b76bf2c43c898a2d62a47761792e7c0 (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
26
27
28
29
30
31
32
33
= form_for @application, url: url, html: { role: 'form', class: 'doorkeeper-app-form' } do |f|
  = form_errors(@application)

  .form-group
    = f.label :name, class: 'label-bold'
    = f.text_field :name, class: 'form-control gl-form-input', required: true

  .form-group
    = f.label :redirect_uri, class: 'label-bold'
    = f.text_area :redirect_uri, class: 'form-control gl-form-input gl-form-textarea', required: true

    %span.form-text.text-muted
      = _('Use one line per URI')

  .form-group.form-check
    = f.check_box :confidential, class: 'form-check-input'
    = f.label :confidential, class: 'label-bold form-check-label'
    %span.form-text.text-muted
      = _('Enable only for confidential applications exclusively used by a trusted backend server that can securely store the client secret. Do not enable for native-mobile, single-page, or other JavaScript applications because they cannot keep the client secret confidential.')

  .form-group.form-check
    = f.check_box :expire_access_tokens, class: 'form-check-input'
    = f.label :expire_access_tokens, class: 'label-bold form-check-label'
    %span.form-text.text-muted
      = _('Enable access tokens to expire after 2 hours. If disabled, tokens do not expire.')
      = link_to _('Learn more.'), help_page_path('integration/oauth_provider.md', anchor: 'expiring-access-tokens'), target: '_blank', rel: 'noopener noreferrer'

  .form-group
    = f.label :scopes, class: 'label-bold'
    = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: @application, scopes: @scopes

  .gl-mt-3
    = f.submit _('Save application'), class: "gl-button btn btn-confirm"