diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index fa7e72ab..cdbb11f9 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -4,6 +4,6 @@ - flash.each do |key, value| .alert.alert-dismissible{ class: "alert-#{bootstrap_color key}", role: :alert } - %button.btn-close{ type: :button, data: { dismiss: :alert } } + %button.btn-close{ type: :button, data: { bs_dismiss: :alert } } %span.visually-hidden= t("voc.close") = value diff --git a/app/views/modal/_ask.html.haml b/app/views/modal/_ask.html.haml index 0fe61305..740a684a 100644 --- a/app/views/modal/_ask.html.haml +++ b/app/views/modal/_ask.html.haml @@ -3,12 +3,12 @@ .modal-content{ data: { controller: "character-count", "character-count-max-value": 512 }} .modal-header %h5.modal-title#modal-ask-followers-label= t(".title") - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden= t("voc.close") .modal-body .form-group.has-feedback %textarea.form-control{ name: "qb-all-question", placeholder: t(".placeholder"), data: { "character-count-target": "input" } } %p.text-end.text-muted.form-control-feedback{ data: { "character-count-target": "counter" } } 512 .modal-footer - %button.btn.btn-default{ type: :button, data: { dismiss: :modal } }= t("voc.cancel") + %button.btn.btn-default{ type: :button, data: { bs_dismiss: :modal } }= t("voc.cancel") %button.btn.btn-primary{ name: "qb-all-ask", type: :button, data: { "character-count-target": "action", loading_text: t(".loading") } }= t(".action") diff --git a/app/views/modal/_ban.html.haml b/app/views/modal/_ban.html.haml index 39145b1d..78d9e4ed 100644 --- a/app/views/modal/_ban.html.haml +++ b/app/views/modal/_ban.html.haml @@ -5,7 +5,7 @@ .modal-header %h5.modal-title#modal-ban-label = t '.title' - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden= t("voc.close") = bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: :novalidate }) do |f| = f.hidden_field :user, value: user.screen_name diff --git a/app/views/modal/_comment_smiles.html.haml b/app/views/modal/_comment_smiles.html.haml index 69b14037..70cf7772 100644 --- a/app/views/modal/_comment_smiles.html.haml +++ b/app/views/modal/_comment_smiles.html.haml @@ -3,7 +3,7 @@ .modal-content .modal-header %h5.modal-title#modal-commentsmile-label= t(".title") - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden Close .modal-body - if comment.smiles.all.count.zero? diff --git a/app/views/modal/_list.html.haml b/app/views/modal/_list.html.haml index 05ae2499..0d63b7ea 100644 --- a/app/views/modal/_list.html.haml +++ b/app/views/modal/_list.html.haml @@ -3,7 +3,7 @@ .modal-content .modal-header %h5.modal-title#modal-list-memberships-label= t(".title") - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden= t("voc.close") %div{ role: :tabpanel } %ul.nav.nav-tabs.mt-1{ role: :tablist } @@ -24,4 +24,4 @@ %input.form-control#new-list-name{ type: :text, placeholder: t(".tab.create.placeholder") } %button.btn.btn-primary#create-list{ type: :button, data: { user: user.screen_name } }= t(".tab.create.action") .modal-footer - %button.btn.btn-primary{ name: "gm-save", type: :button, data: { dismiss: :modal } }= t("voc.close") + %button.btn.btn-primary{ name: "gm-save", type: :button, data: { bs_dismiss: :modal } }= t("voc.close") diff --git a/app/views/modal/_password.html.haml b/app/views/modal/_password.html.haml index 0b107e1d..170d5516 100644 --- a/app/views/modal/_password.html.haml +++ b/app/views/modal/_password.html.haml @@ -3,10 +3,10 @@ .modal-content .modal-header %h5.modal-title#modal-passwd-label= t(".title") - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden= t("voc.close") .modal-body = f.password_field :current_password, autocomplete: "current-password" .modal-footer - %button.btn.btn-default{ data: { dismiss: :modal }, type: :button }= t("voc.cancel") + %button.btn.btn-default{ data: { bs_dismiss: :modal }, type: :button }= t("voc.cancel") = f.primary class: 'btn btn-primary', data: { disable_with: false } diff --git a/app/views/modal/_privileges.html.haml b/app/views/modal/_privileges.html.haml index 32a952f5..7444e664 100644 --- a/app/views/modal/_privileges.html.haml +++ b/app/views/modal/_privileges.html.haml @@ -4,11 +4,11 @@ .modal-header %h5.modal-title#modal-privileges-label = t(".title", user: user.screen_name) - %button.btn-close{ data: { dismiss: :modal }, type: :button } + %button.btn-close{ data: { bs_dismiss: :modal }, type: :button } %span.visually-hidden= t("voc.close") %ul.list-group - if current_user.has_cached_role?(:administrator) = render "modal/privileges/item", privilege: "moderator", description: t(".role.moderator"), user: user = render "modal/privileges/item", privilege: "admin", description: t(".role.admin"), user: user .modal-footer - %button.btn.btn-primary{ name: "checked-privileges", type: :button, data: { dismiss: :modal } }= t("voc.close") + %button.btn.btn-primary{ name: "checked-privileges", type: :button, data: { bs_dismiss: :modal } }= t("voc.close") diff --git a/app/views/modal/ban/_controls.html.haml b/app/views/modal/ban/_controls.html.haml index 8cfaee97..1ee87401 100644 --- a/app/views/modal/ban/_controls.html.haml +++ b/app/views/modal/ban/_controls.html.haml @@ -10,5 +10,5 @@ = f.radio_button :duration_unit, unit, label: unit, checked: true = f.text_field :reason, placeholder: t('.reason') .modal-footer - %button.btn.btn-default{ name: 'stop-time', type: :button, data: { dismiss: :modal } }= t("voc.close") - = f.submit t('.hammertime'), class: 'btn btn-primary', name: 'hammer-time' \ No newline at end of file + %button.btn.btn-default{ name: 'stop-time', type: :button, data: { bs_dismiss: :modal } }= t("voc.close") + = f.submit t('.hammertime'), class: 'btn btn-primary', name: 'hammer-time' diff --git a/app/views/shared/_announcements.html.haml b/app/views/shared/_announcements.html.haml index 90415a6f..053dc6fb 100644 --- a/app/views/shared/_announcements.html.haml +++ b/app/views/shared/_announcements.html.haml @@ -2,7 +2,7 @@ - @active_announcements.each do |announcement| .alert.announcement.alert-info.alert-dismissable.d-none{ data: { controller: 'announcement', "announcement-id-value": announcement.id } } .container - %button.btn-close{ type: :button, data: { dismiss: :alert, action: "click->announcement#close" } } + %button.btn-close{ type: :button, data: { bs_dismiss: :alert, action: "click->announcement#close" } } %p = announcement.content - if announcement.link_present?