1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Submit without asking

This commit is contained in:
Steffo 2018-09-15 00:49:47 +02:00
parent 00578f530d
commit 652db5895c

View file

@ -12,6 +12,10 @@
edits = true;
}
function onSubmit() {
edits = false;
}
window.onbeforeunload = function() {
return edits ? "Modifiche non salvate" : null;
}
@ -41,7 +45,7 @@
<form action="{{ url_for('page_wiki', key=key) }}" method="POST">
<textarea oninput="newEdit()" class="content" name="content" placeholder="Inserisci il Markdown per la pagina qui.">{% if wiki_page %}{{ wiki_page.content }}{% endif %}</textarea><br>
<input class="reason" name="reason" type="text" placeholder="Motivo per la modifica"><br>
<input class="submit" type="submit" value="Invia">
<input class="submit" type="submit" onsubmit="onSubmit()" value="Invia">
</form>
</div>
{% endif %}