drew-dev #21
|
@ -0,0 +1,21 @@
|
|||
function confirmAction (intent, sender) {
|
||||
if (['propicReminder'].includes (intent) == false) return
|
||||
let href = sender.getAttribute('action')
|
||||
let intentTitle = document.querySelector("#intentText")
|
||||
let intentDescription = document.querySelector("#intentDescription")
|
||||
let intentEditPanel = document.querySelector("#intentEditPanel")
|
||||
let intentFormAction = document.querySelector("#intentFormAction")
|
||||
let intentSend = document.querySelector("#intentSend")
|
||||
// Resetting ui
|
||||
intentFormAction.setAttribute('method', 'GET')
|
||||
intentEditPanel.style.display = 'none';
|
||||
intentDescription.innerText = sender.title;
|
||||
intentFormAction.setAttribute('action', href)
|
||||
switch (intent){
|
||||
case 'propicReminder':
|
||||
intentTitle.innerText = "Send missing badge reminders";
|
||||
intentSend.innerText = sender.innerText;
|
||||
break;
|
||||
}
|
||||
document.getElementById('modalRoomconfirm').setAttribute('open', 'true');
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
{% block title %}Admin panel{% endblock %}
|
||||
{% block main %}
|
||||
<main class="container">
|
||||
<script src="/res/scripts/adminManager.js"></script>
|
||||
<header>
|
||||
<picture>
|
||||
<source srcset="/res/furizon.png" media="(prefers-color-scheme:dark)">
|
||||
|
@ -13,8 +14,9 @@
|
|||
<a href="/manage/admin/cache/clear" role="button" title="Reload the orders' data and the re-sync items' indexes from pretix">Clear cache</a>
|
||||
<a href="/manage/nosecount" role="button" title="Shortcut to the nosecount's admin data">Manage rooms</a>
|
||||
<a href="/manage/admin/room/verify" role="button" title="Will unconfirm rooms that fail the default check. Useful when editing answers from Pretix">Verify Rooms</a>
|
||||
<a href="/manage/admin/propic/remind" role="button" title="Will remind via mail all people who event uploaded a badge to do it">Remind badge upload</a>
|
||||
<a href="#" onclick="confirmAction('propicReminder', this)" role="button" title="Will remind via mail all people who event uploaded a badge to do it" action="/manage/admin/propic/remind">Remind badge upload</a>
|
||||
<hr>
|
||||
{% include 'components/confirm_action_modal.html' %}
|
||||
</main>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<form id="intentFormAction" method="GET" action="">
|
||||
<dialog id="modalRoomconfirm">
|
||||
<article>
|
||||
<a href="#close" aria-label="Close" class="close" onClick="javascript:this.parentElement.parentElement.removeAttribute('open')"></a>
|
||||
<h3 id="intentText">Confirm action</h3>
|
||||
<p id="intentDescription"></p>
|
||||
<div id="intentEditPanel"></div>
|
||||
<footer>
|
||||
<input id="intentSend" type="submit" value="Confirm" />
|
||||
</footer>
|
||||
</article>
|
||||
</dialog>
|
||||
</form>
|
Loading…
Reference in New Issue