mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-15 18:39:58 +01:00
Fix ban checkbox being passed into ban payload
This commit is contained in:
parent
b196cbdd1c
commit
b249e40273
1 changed files with 2 additions and 7 deletions
|
@ -23,18 +23,13 @@ load = ->
|
|||
modalForm.addEventListener "submit", (event) ->
|
||||
event.preventDefault();
|
||||
|
||||
checktostr = (el) ->
|
||||
if el.checked
|
||||
"1"
|
||||
else
|
||||
"0"
|
||||
|
||||
data = {
|
||||
ban: banCheckbox ? checktostr banCheckbox : false
|
||||
ban: "0"
|
||||
user: modalForm.elements["user"].value
|
||||
}
|
||||
|
||||
if banCheckbox && banCheckbox.checked
|
||||
data.ban = "1"
|
||||
data.reason = modalForm.elements["reason"].value.trim()
|
||||
unless permabanCheckbox.checked
|
||||
data.duration = modalForm.elements["duration"].value.trim()
|
||||
|
|
Loading…
Reference in a new issue