2015-04-22 17:56:29 -07:00
|
|
|
|
#modal-ban.modal.fade{"aria-hidden" => "true", "aria-labelledby" => "modal-ban-label", :role => "dialog", :tabindex => "-1"}
|
|
|
|
|
.modal-dialog
|
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header
|
2020-04-19 14:26:29 -07:00
|
|
|
|
%h5#modal-ban-label.modal-title
|
|
|
|
|
= t 'views.modal.bancontrol.title'
|
2015-04-22 17:56:29 -07:00
|
|
|
|
%button.close{"data-dismiss" => "modal", :type => "button"}
|
|
|
|
|
%span{"aria-hidden" => "true"} ×
|
|
|
|
|
%span.sr-only Close
|
|
|
|
|
= bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: "novalidate" }) do |f|
|
|
|
|
|
= f.hidden_field :user, value: @user.screen_name
|
|
|
|
|
#ban-control-super.modal-body
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= f.check_box :ban, label: t('views.modal.bancontrol.ban'), checked: @user.banned?
|
2015-04-22 17:56:29 -07:00
|
|
|
|
#ban-controls{style: "#{"display: none" unless @user.banned?}"}
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= f.check_box :permaban, label: t('views.modal.bancontrol.permanent'), checked: @user.permanently_banned?
|
2015-04-22 17:56:29 -07:00
|
|
|
|
#ban-controls-time{style: "#{"display: none" unless not @user.permanently_banned?}"}
|
2015-04-23 12:21:58 -07:00
|
|
|
|
= f.text_field :until, label: "", required: true, value: (@user.banned_until || DateTime.current).strftime("%m/%d/%Y %I:%M %p")
|
2015-06-07 06:10:17 -07:00
|
|
|
|
= f.text_field :reason, placeholder: t('views.modal.bancontrol.reason'), value: @user.ban_reason
|
2015-04-22 17:56:29 -07:00
|
|
|
|
.modal-footer
|
2015-06-07 06:10:17 -07:00
|
|
|
|
%button.btn.btn-default{name: 'stop-time', type: :button, data: { dismiss: :modal }}= t 'views.actions.close'
|
|
|
|
|
= f.submit t('views.modal.bancontrol.hammertime'), class: "btn btn-primary", name: 'hammer-time'
|