2018-04-12 20:11:22 +00:00
= form_for [:admin, @application], url: @url, html: {role: 'form'} do |f|
2016-04-05 01:25:38 +00:00
= form_errors(application)
2018-05-31 19:07:32 +00:00
= content_tag :div, class: 'form-group row' do
2019-02-03 14:29:34 +00:00
.col-sm-2.col-form-label
= f.label :name
2015-01-17 23:37:27 +00:00
.col-sm-10
2021-02-03 15:09:24 +00:00
= f.text_field :name, class: 'form-control gl-form-input'
2015-01-17 23:37:27 +00:00
= doorkeeper_errors_for application, :name
2017-07-24 20:45:12 +00:00
2018-05-31 19:07:32 +00:00
= content_tag :div, class: 'form-group row' do
2019-02-03 14:29:34 +00:00
.col-sm-2.col-form-label
= f.label :redirect_uri
2015-01-17 23:37:27 +00:00
.col-sm-10
2021-02-03 15:09:24 +00:00
= f.text_area :redirect_uri, class: 'form-control gl-form-input'
2015-01-17 23:37:27 +00:00
= doorkeeper_errors_for application, :redirect_uri
2018-04-11 18:26:37 +00:00
%span.form-text.text-muted
2015-01-17 23:37:27 +00:00
Use one line per URI
2016-11-22 08:57:31 +00:00
2018-05-31 19:07:32 +00:00
= content_tag :div, class: 'form-group row' do
2019-02-03 14:29:34 +00:00
.col-sm-2.col-form-label.pt-0
= f.label :trusted
2017-07-24 20:45:12 +00:00
.col-sm-10
= f.check_box :trusted
2018-04-11 18:26:37 +00:00
%span.form-text.text-muted
2021-01-22 09:08:53 +00:00
Trusted applications are automatically authorized on GitLab OAuth flow. It's highly recommended for the security of users that trusted applications have the confidential setting set to true.
2017-07-24 20:45:12 +00:00
2020-01-22 18:08:47 +00:00
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label.pt-0
= f.label :confidential
.col-sm-10
= f.check_box :confidential
%span.form-text.text-muted
= _('The application will be used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential.')
2021-09-17 15:11:44 +00:00
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label.pt-0
= f.label :expire_access_tokens
.col-sm-10
= f.check_box :expire_access_tokens
%span.form-text.text-muted
= _('Access tokens expire after 2 hours. A refresh token may be used at any time to generate a new access token. Non-expiring access tokens are deprecated. Clear this setting to enable backward compatibility.')
2018-04-12 20:11:22 +00:00
.form-group.row
2019-02-03 14:29:34 +00:00
.col-sm-2.col-form-label.pt-0
= f.label :scopes
2016-11-22 08:57:31 +00:00
.col-sm-10
2016-12-05 04:19:51 +00:00
= render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes
2016-11-22 08:57:31 +00:00
2015-01-17 23:37:27 +00:00
.form-actions
2021-08-13 12:10:58 +00:00
= f.submit _('Save application'), class: "gl-button btn btn-confirm wide"
= link_to _('Cancel'), admin_applications_path, class: "gl-button btn btn-default btn-cancel"