Fix haml-lint LineLength cops in app/views/admin (#28680)

This commit is contained in:
Matt Jankowski 2024-03-15 07:19:00 -04:00 committed by GitHub
commit f445d33fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 576 additions and 146 deletions

View file

@ -5,19 +5,25 @@
= t('admin.roles.everyone_full_description_html')
- else
.fields-group
= form.input :name, wrapper: :with_label
= form.input :name,
wrapper: :with_label
- unless current_user.role == form.object
.fields-group
= form.input :position, wrapper: :with_label, input_html: { max: current_user.role.position - 1 }
= form.input :position,
input_html: { max: current_user.role.position - 1 },
wrapper: :with_label
.fields-group
= form.input :color, wrapper: :with_label, input_html: { placeholder: '#000000', type: 'color' }
= form.input :color,
input_html: { placeholder: '#000000', type: 'color' },
wrapper: :with_label
%hr.spacer/
.fields-group
= form.input :highlighted, wrapper: :with_label
= form.input :highlighted,
wrapper: :with_label
%hr.spacer/
@ -31,6 +37,17 @@
- (form.object.everyone? ? UserRole::Flags::CATEGORIES.slice(:invites) : UserRole::Flags::CATEGORIES).each do |category, permissions|
%h4= t(category, scope: 'admin.roles.categories')
= form.input :permissions_as_keys, collection: permissions, wrapper: :with_block_label, include_blank: false, label_method: ->(privilege) { privilege_label(privilege) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label: false, hint: false, disabled: disable_permissions?(permissions)
= form.input :permissions_as_keys,
as: :check_boxes,
collection_wrapper_tag: 'ul',
collection: permissions,
disabled: disable_permissions?(permissions),
hint: false,
include_blank: false,
item_wrapper_tag: 'li',
label_method: ->(privilege) { privilege_label(privilege) },
label: false,
required: false,
wrapper: :with_block_label
%hr.spacer/