2017-08-23 08:59:35 +10:00
|
|
|
.fields-group
|
2024-01-10 02:28:56 +11:00
|
|
|
= f.input :name,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.name'),
|
|
|
|
wrapper: :with_label
|
2018-09-19 00:45:58 +10:00
|
|
|
|
|
|
|
.fields-group
|
2024-01-10 02:28:56 +11:00
|
|
|
= f.input :website,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.website'),
|
|
|
|
wrapper: :with_label
|
2017-08-23 08:59:35 +10:00
|
|
|
|
|
|
|
.fields-group
|
2024-01-10 02:28:56 +11:00
|
|
|
= f.input :redirect_uri,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri'),
|
2024-05-16 17:59:46 +10:00
|
|
|
required: true,
|
2024-01-10 02:28:56 +11:00
|
|
|
wrapper: :with_block_label
|
2017-08-23 08:59:35 +10:00
|
|
|
|
2019-12-09 14:30:58 +11:00
|
|
|
%p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, Doorkeeper.configuration.native_redirect_uri)).html_safe
|
2017-08-23 08:59:35 +10:00
|
|
|
|
2017-08-23 23:16:20 +10:00
|
|
|
.field-group
|
2018-07-06 02:31:35 +10:00
|
|
|
.input.with_block_label
|
|
|
|
%label= t('activerecord.attributes.doorkeeper/application.scopes')
|
|
|
|
%span.hint= t('simple_form.hints.defaults.scopes')
|
|
|
|
|
2023-12-04 20:09:43 +11:00
|
|
|
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value|
|
2024-01-10 02:28:56 +11:00
|
|
|
= f.input :scopes,
|
|
|
|
as: :check_boxes,
|
|
|
|
collection_wrapper_tag: 'ul',
|
|
|
|
collection: value.sort,
|
|
|
|
hint: false,
|
|
|
|
include_blank: false,
|
|
|
|
item_wrapper_tag: 'li',
|
|
|
|
label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) },
|
|
|
|
label: false,
|
|
|
|
required: false,
|
|
|
|
selected: f.object.scopes.all,
|
|
|
|
wrapper: :with_block_label
|