forked from rDrama/rDrama
allow jannies customizing chud phrase
parent
36857707a8
commit
f77fbecf49
|
@ -14,7 +14,10 @@ function punishModal(t, kind, link, name, fullname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kind == "ban") {
|
if (kind == "ban") {
|
||||||
values["alts"] = document.getElementById(`${kind}_alts`).value;
|
values["alts"] = document.getElementById('ban_alts').value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
values["chud_phrase"] = document.getElementById('chud_phrase_modal').value;
|
||||||
}
|
}
|
||||||
|
|
||||||
postToast(t, `/${kind}_user/${fullname}`,
|
postToast(t, `/${kind}_user/${fullname}`,
|
||||||
|
|
|
@ -1144,7 +1144,7 @@ def chud(fullname, v):
|
||||||
user.chud = 1
|
user.chud = 1
|
||||||
duration = "permanently"
|
duration = "permanently"
|
||||||
|
|
||||||
user.chud_phrase = "trans lives matter"
|
user.chud_phrase = request.values.get("chud_phrase").strip()
|
||||||
|
|
||||||
text = f"@{v.username} (a site admin) has chudded you **{duration}**"
|
text = f"@{v.username} (a site admin) has chudded you **{duration}**"
|
||||||
if reason: text += f" for the following reason:\n\n> {reason}"
|
if reason: text += f" for the following reason:\n\n> {reason}"
|
||||||
|
|
|
@ -42,7 +42,19 @@
|
||||||
<div class="modal-body pt-0" id="chud-modal-body">
|
<div class="modal-body pt-0" id="chud-modal-body">
|
||||||
<input id="chud_reason" hidden id="chud_reason">
|
<input id="chud_reason" hidden id="chud_reason">
|
||||||
|
|
||||||
<label for="days">Days</label>
|
<label for="note">The phrase they will have to say:</label>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<select id="chud_phrase_modal" autocomplete="off" class="form-control">
|
||||||
|
{% for entry in CHUD_PHRASES %}
|
||||||
|
<option value="{{entry}}">
|
||||||
|
{{entry}}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="mt-3" for="days">Days</label>
|
||||||
<input autocomplete="off" type="number" step="any" max="{{max_days()}}" id="chud_days" class="form-control" placeholder="Leave blank for permanent">
|
<input autocomplete="off" type="number" step="any" max="{{max_days()}}" id="chud_days" class="form-control" placeholder="Leave blank for permanent">
|
||||||
|
|
||||||
<div class="modal-footer pr-0">
|
<div class="modal-footer pr-0">
|
||||||
|
|
Loading…
Reference in New Issue