summaryrefslogtreecommitdiff
path: root/app/views/shared/doorkeeper/applications/_form.html.haml
blob: c1650405776d1dfed4aab918f069db4f42c62af3 (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
= gitlab_ui_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
    = f.gitlab_ui_checkbox_component :confidential, _('Confidential'),
      help_text: _('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
    - help_text = _('Enable access tokens to expire after 2 hours. If disabled, tokens do not expire.')
    - help_link = link_to _('Learn more.'), help_page_path('integration/oauth_provider.md', anchor: 'expiring-access-tokens'), target: '_blank', rel: 'noopener noreferrer'
    = f.gitlab_ui_checkbox_component :expire_access_tokens, _('Expire access tokens'),
      help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }

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

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