Fix ban dialog functionality
This commit is contained in:
parent
322cfceeab
commit
936969d72a
|
@ -2,4 +2,4 @@
|
|||
#= require tempusdominus-bootstrap-4
|
||||
#= require_tree ./moderation
|
||||
|
||||
$('.datetimepicker-input').datetimepicker();
|
||||
$('.datetimepicker-input').datetimepicker({});
|
|
@ -19,21 +19,6 @@ load = ->
|
|||
else
|
||||
$("#ban-controls-time").show()
|
||||
|
||||
untilInput = $ modalForm.elements["until"]
|
||||
untilInput.datetimepicker
|
||||
defaultDate: untilInput.val()
|
||||
sideBySide: true
|
||||
icons:
|
||||
time: "fa fa-clock-o"
|
||||
date: "fa fa-calendar"
|
||||
up: "fa fa-chevron-up"
|
||||
down: "fa fa-chevron-down"
|
||||
previous: "fa fa-chevron-left"
|
||||
next: "fa fa-chevron-right"
|
||||
today: "fa fa-home"
|
||||
clear: "fa fa-trash-o"
|
||||
close: "fa fa-times"
|
||||
|
||||
modalForm.addEventListener "submit", (event) ->
|
||||
event.preventDefault();
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#ban-controls{style: "#{"display: none" unless @user.banned?}"}
|
||||
= f.check_box :permaban, label: t('views.modal.bancontrol.permanent'), checked: @user.permanently_banned?
|
||||
#ban-controls-time{style: "#{"display: none" unless not @user.permanently_banned?}"}
|
||||
= f.text_field :until, label: "", required: true, value: (@user.banned_until || DateTime.current).strftime("%m/%d/%Y %I:%M %p")
|
||||
= f.text_field :until, label: "", required: true, value: (@user.banned_until || DateTime.current).strftime("%m/%d/%Y %I:%M %p"), class: "datetimepicker-input", data: { toggle: "datetimepicker", target: "#until" }
|
||||
= f.text_field :reason, placeholder: t('views.modal.bancontrol.reason'), value: @user.ban_reason
|
||||
.modal-footer
|
||||
%button.btn.btn-default{name: 'stop-time', type: :button, data: { dismiss: :modal }}= t 'views.actions.close'
|
||||
|
|
Loading…
Reference in New Issue