debian-mirror-gitlab/app/views/admin/applications/_form.html.haml
2021-11-11 11:23:49 +05:30

52 lines
2.2 KiB
Text

= form_for [:admin, @application], url: @url, html: {role: 'form'} do |f|
= form_errors(application)
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label
= f.label :name
.col-sm-10
= f.text_field :name, class: 'form-control gl-form-input'
= doorkeeper_errors_for application, :name
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label
= f.label :redirect_uri
.col-sm-10
= f.text_area :redirect_uri, class: 'form-control gl-form-input'
= doorkeeper_errors_for application, :redirect_uri
%span.form-text.text-muted
Use one line per URI
= content_tag :div, class: 'form-group row' do
.col-sm-2.col-form-label.pt-0
= f.label :trusted
.col-sm-10
= f.check_box :trusted
%span.form-text.text-muted
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.
= 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.')
= 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.')
.form-group.row
.col-sm-2.col-form-label.pt-0
= f.label :scopes
.col-sm-10
= render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes
.form-actions
= 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"