mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Submit without asking
This commit is contained in:
parent
00578f530d
commit
652db5895c
1 changed files with 5 additions and 1 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue