mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 14:02:24 +01:00
Add disable all button to email notification settings
This commit is contained in:
parent
76638ad878
commit
a94c398633
10
app/public/static/js/email_disable_all.js
Normal file
10
app/public/static/js/email_disable_all.js
Normal file
@ -0,0 +1,10 @@
|
||||
// @author rubenwardy
|
||||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
|
||||
|
||||
"use strict";
|
||||
|
||||
const disableAll = document.getElementById("disable-all");
|
||||
disableAll.classList.remove("d-none");
|
||||
disableAll.addEventListener("click", () => {
|
||||
document.querySelectorAll("input[type='checkbox']").forEach(x => { x.checked = false; });
|
||||
});
|
@ -4,6 +4,10 @@
|
||||
{{ _("Email and Notifications - %(username)s", username=user.username) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block scriptextra %}
|
||||
<script src="/static/js/email_disable_all.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block pane %}
|
||||
<h2 class="mt-0">{{ _("Email and Notifications") }}</h2>
|
||||
|
||||
@ -36,6 +40,7 @@
|
||||
|
||||
<p>
|
||||
{{ _("Configure whether certain types of notifications are sent immediately, or as part of a daily digest.") }}
|
||||
<button type="button" id="disable-all" class="btn btn-sm btn-secondary d-none ms-5">{{ _("Disable all") }}</button>
|
||||
</p>
|
||||
|
||||
<table class="table">
|
||||
@ -60,7 +65,7 @@
|
||||
</table>
|
||||
|
||||
<p class="mt-5">
|
||||
{{ render_submit_field(form.submit, tabindex=280) }}
|
||||
{{ render_submit_field(form.submit, tabindex=280, class_="btn btn-lg btn-primary") }}
|
||||
</p>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user