Skip to content

Commit 4344a28

Browse files
committed
Lint: Use underscore syntax for Bootstrap attributes in views
Also, add some missing `bs-` prefix for some elements. Amends 234c81e
1 parent 234c81e commit 4344a28

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

app/views/account_links/_form.html.slim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
= render('shared/form_errors', object: @account_link)
44
.field-element.form-group
55
= f.label :name, AccountLink.human_attribute_name('name'), class: 'form-label'
6-
= f.text_field :name, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.info.name'), class: 'form-control'
6+
= f.text_field :name, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.info.name'), class: 'form-control'
77
.field-element.form-group
88
= f.label :push_url, AccountLink.human_attribute_name('push_url'), class: 'form-label'
9-
= f.text_field :push_url, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.info.push_url'), class: 'form-control'
9+
= f.text_field :push_url, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.info.push_url'), class: 'form-control'
1010
.field-element.form-group
1111
= f.label :check_uuid_url, AccountLink.human_attribute_name('check_uuid_url'), class: 'form-label'
12-
= f.text_field :check_uuid_url, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.info.check_uuid_url'), class: 'form-control'
12+
= f.text_field :check_uuid_url, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.info.check_uuid_url'), class: 'form-control'
1313
.field-element.form-group
1414
= f.label :api_key, AccountLink.human_attribute_name('api_key'), class: 'form-label'
1515
.input-group
16-
= f.text_field :api_key, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.info.token'), class: 'form-control'
16+
= f.text_field :api_key, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.info.token'), class: 'form-control'
1717
= button_tag t('.button.generate'), type: 'button', class: 'generate-api-key-token btn btn-light'
1818
.field-element.form-group
1919
= f.label :proforma_version, AccountLink.human_attribute_name('proforma_version'), class: 'form-label'

app/views/tasks/_export_actions.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
= button_tag type: 'button', class: 'btn btn-light btn-sm float-end export-action import-export-button', data: {'export-type' => 'export'} do
1717
i.fa-solid.fa-check.confirm-icon.export-button-icon
1818
= t('common.button.export')
19-
= button_tag type: 'submit', class: 'btn btn-light btn-sm float-end import-export-button', data: {'bs-dismiss': 'modal'} do
19+
= button_tag type: 'submit', class: 'btn btn-light btn-sm float-end import-export-button', data: {bs_dismiss: 'modal'} do
2020
i.fa-solid.fa-xmark.abort-icon.export-button-icon
2121
= exported ? t('common.button.hide') : t('common.button.abort')

app/views/tasks/_file_config.html.slim

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@
44
= file.label :used_by_grader, TaskFile.human_attribute_name('used_by_grader'), class: 'form-label w-auto me-2'
55
.radio-switch
66
= file.radio_button :used_by_grader, true, value: true, checked: true
7-
= file.label :used_by_grader_true, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('common.button.yes'), class: 'radio-left small-radio radio-half' do
7+
= file.label :used_by_grader_true, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('common.button.yes'), class: 'radio-left small-radio radio-half' do
88
span.fa-stack
99
i.fa-solid.fa-check.fa-stack-1x.fa-2x
1010
= file.radio_button :used_by_grader, false, value: false
11-
= file.label :used_by_grader_false, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('common.button.no'), class: 'radio-right small-radio radio-half' do
11+
= file.label :used_by_grader_false, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('common.button.no'), class: 'radio-right small-radio radio-half' do
1212
span.fa-stack
1313
i.fa-solid.fa-xmark.fa-stack-1x.fa-2x
1414

1515
.form-control.placeholder
1616
= file.label :used_by_grader, TaskFile.human_attribute_name('visible'), class: 'form-label w-auto me-2'
1717
.radio-switch
1818
= file.radio_button :visible, 'yes', value: 'yes', checked: true
19-
= file.label :visible_yes, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('common.button.yes'), class: 'radio-left small-radio radio-third' do
19+
= file.label :visible_yes, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('common.button.yes'), class: 'radio-left small-radio radio-third' do
2020
span.fa-stack
2121
i.fa-regular.fa-eye.fa-stack-1x.fa-2x
2222
= file.radio_button :visible, 'no', value: 'no'
23-
= file.label :visible_no, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('common.button.no'), class: 'radio-right radio-left small-radio radio-third' do
23+
= file.label :visible_no, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('common.button.no'), class: 'radio-right radio-left small-radio radio-third' do
2424
span.fa-stack
2525
i.fa-regular.fa-eye-slash.fa-stack-1x.fa-2x
2626
= file.radio_button :visible, 'delayed', value: 'delayed'
27-
= file.label :visible_delayed, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.delayed'), class: 'radio-right small-radio radio-third' do
27+
= file.label :visible_delayed, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.delayed'), class: 'radio-right small-radio radio-third' do
2828
span.fa-stack
2929
i.fa-regular.fa-clock.fa-stack-1x.fa-2x
3030

3131
.form-control.placeholder
3232
= file.label :usage_by_lms, TaskFile.human_attribute_name('usage_by_lms'), class: 'form-label w-auto me-2'
3333
.radio-switch
3434
= file.radio_button :usage_by_lms, 'edit', value: 'edit'
35-
= file.label :usage_by_lms_edit, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.edit'), class: 'radio-left small-radio radio-quarter' do
35+
= file.label :usage_by_lms_edit, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.edit'), class: 'radio-left small-radio radio-quarter' do
3636
span.fa-stack
3737
i.fa-solid.fa-pencil.fa-stack-1x.fa-2x
3838
= file.radio_button :usage_by_lms, 'display', value: 'display'
39-
= file.label :usage_by_lms_display, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.display'), class: 'radio-right radio-left small-radio radio-quarter' do
39+
= file.label :usage_by_lms_display, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.display'), class: 'radio-right radio-left small-radio radio-quarter' do
4040
span.fa-stack
4141
i.fa-regular.fa-eye.fa-stack-1x.fa-2x
4242
= file.radio_button :usage_by_lms, 'download', value: 'download'
43-
= file.label :usage_by_lms_download, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.download'), class: 'radio-right radio-left small-radio radio-quarter' do
43+
= file.label :usage_by_lms_download, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.download'), class: 'radio-right radio-left small-radio radio-quarter' do
4444
span.fa-stack
4545
i.fa-solid.fa-download.fa-stack-1x.fa-2x
4646
= file.radio_button :usage_by_lms, ''
47-
= file.label :usage_by_lms_, data: {'bs-toggle': 'tooltip', placement: 'bottom'}, title: t('.no_value'), class: 'radio-right small-radio radio-quarter' do
47+
= file.label :usage_by_lms_, data: {bs_toggle: 'tooltip', bs_placement: 'bottom'}, title: t('.no_value'), class: 'radio-right small-radio radio-quarter' do
4848
span.fa-stack
4949
i.fa-solid.fa-ban.fa-stack-1x.fa-2x

app/views/users/nbp_wallet/connect.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.col-8.col-md-4.col-lg-3
88
= link_to(@relationship_template.url)
99
= image_tag @relationship_template.qr_code_path,
10-
data: {id: 'nbp_wallet_qr_code', 'remaining-validity': @relationship_template.remaining_validity.seconds},
10+
data: {id: 'nbp_wallet_qr_code', remaining_validity: @relationship_template.remaining_validity.seconds},
1111
alt: t('.qr_code_alt_text'),
1212
class: 'img-fluid pixelated'
1313
.btn.btn-primary.w-100.mt-3 data-behavior='reload-on-click'

app/views/users/shared/_notification_modal.html.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ ul
2222
- elsif defined?(confirm_notification_button)
2323
= button_to(confirm_notification_button[:target], method: confirm_notification_button[:method], form_class: 'd-inline margin-right-5px', class: 'btn btn-important green-border') do
2424
= t('common.button.confirm')
25-
= button_tag class: 'btn btn-important red-border', data: {'bs-dismiss': 'modal'} do
25+
= button_tag class: 'btn btn-important red-border', data: {bs_dismiss: 'modal'} do
2626
= t('common.button.cancel')

0 commit comments

Comments
 (0)