2024-09-23 13:37:32 +00:00
|
|
|
.fields-group
|
|
|
|
= form.input :name,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.name'),
|
|
|
|
wrapper: :with_label
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= form.input :website,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.website'),
|
|
|
|
wrapper: :with_label
|
|
|
|
|
|
|
|
.fields-group
|
|
|
|
= form.input :redirect_uri,
|
|
|
|
label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri'),
|
|
|
|
required: true,
|
|
|
|
wrapper: :with_block_label
|
|
|
|
|
|
|
|
%p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, Doorkeeper.configuration.native_redirect_uri)).html_safe
|
|
|
|
|
|
|
|
.field-group
|
|
|
|
.input.with_block_label
|
2024-10-02 14:45:12 +00:00
|
|
|
= form.label t('activerecord.attributes.doorkeeper/application.scopes'), required: true
|
2024-09-23 13:37:32 +00:00
|
|
|
%span.hint= t('simple_form.hints.defaults.scopes')
|
|
|
|
|
|
|
|
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value|
|
|
|
|
= form.input :scopes,
|
|
|
|
as: :check_boxes,
|
|
|
|
collection_wrapper_tag: 'ul',
|
|
|
|
collection: value.sort,
|
|
|
|
hint: false,
|
|
|
|
include_blank: false,
|
|
|
|
item_wrapper_tag: 'li',
|
2024-10-02 14:45:12 +00:00
|
|
|
label_method: ->(scope) { label_for_scope(scope) },
|
2024-09-23 13:37:32 +00:00
|
|
|
label: false,
|
|
|
|
required: false,
|
|
|
|
selected: form.object.scopes.all,
|
|
|
|
wrapper: :with_block_label
|