Fix LineLength haml-lint in app/views/settings area (#28663)

This commit is contained in:
Matt Jankowski 2024-01-09 10:28:56 -05:00 committed by GitHub
parent 9a73a7dcaf
commit 09ab073f0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 137 additions and 30 deletions

View file

@ -1,11 +1,17 @@
.fields-group
= f.input :name, wrapper: :with_label, label: t('activerecord.attributes.doorkeeper/application.name')
= f.input :name,
label: t('activerecord.attributes.doorkeeper/application.name'),
wrapper: :with_label
.fields-group
= f.input :website, wrapper: :with_label, label: t('activerecord.attributes.doorkeeper/application.website')
= f.input :website,
label: t('activerecord.attributes.doorkeeper/application.website'),
wrapper: :with_label
.fields-group
= f.input :redirect_uri, wrapper: :with_block_label, label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri')
= f.input :redirect_uri,
label: t('activerecord.attributes.doorkeeper/application.redirect_uri'), hint: t('doorkeeper.applications.help.redirect_uri'),
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
@ -15,4 +21,15 @@
%span.hint= t('simple_form.hints.defaults.scopes')
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each_value do |value|
= f.input :scopes, label: false, hint: false, collection: value.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
= 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