Fix modal/alert dismiss toggles
This commit is contained in:
parent
c878862730
commit
2efaae6987
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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'
|
||||
%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'
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue