mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 22:05:09 +01:00
Prevent duplicate form submission; indentation fixes
This commit is contained in:
@@ -31,14 +31,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if formaction and formaction == 'edit' %}
|
{% if formaction and formaction == 'edit' %}
|
||||||
<form action="{{ url_for('editingbookmark', userkey=userkey, urlhash=bookmark.url_hash) }}" method="POST">
|
<form class="digimark" action="{{ url_for('editingbookmark', userkey=userkey, urlhash=bookmark.url_hash) }}" method="POST">
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action="{{ url_for('addingbookmark', userkey=userkey) }}" method="POST">
|
<form class="digimark" action="{{ url_for('addingbookmark', userkey=userkey) }}" method="POST">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="input-field col s12">
|
<div class="input-field col s12">
|
||||||
<i class="material-icons prefix">description</i>
|
<i class="material-icons prefix">description</i>
|
||||||
<input placeholder="title" type="text" name="title" id="title" value="{{ bookmark.title }}" class="validate" />
|
<input placeholder="title" type="text" name="title" id="title" value="{{ bookmark.title }}" class="validate" />
|
||||||
@@ -119,15 +118,25 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="input-field col l2 m3 s4">
|
<div class="input-field col l2 m3 s4">
|
||||||
<p class="left-align"><button class="btn waves-effect waves-light" type="submit" name="submit">Save <i class="material-icons right">send</i></button></p>
|
<p class="left-align"><button class="btn waves-effect waves-light" type="submit" name="submit" id="submit">Save <i class="material-icons right">send</i></button></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
{% if bookmark.url_hash %}
|
{% if bookmark.url_hash %}
|
||||||
|
</form>
|
||||||
<div class="input-field col l2 m3 s4">
|
<div class="input-field col l2 m3 s4">
|
||||||
<form action="{{ url_for('deletingbookmark', userkey=userkey, urlhash=bookmark.url_hash) }}" method="POST">
|
<form action="{{ url_for('deletingbookmark', userkey=userkey, urlhash=bookmark.url_hash) }}" method="POST">
|
||||||
<p class="left-align"><button class="btn waves-effect waves-light" type="submit" name="delete">Delete <i class="material-icons right">delete</i></button></p>
|
<p class="left-align"><button class="btn waves-effect waves-light" type="submit" name="delete">Delete <i class="material-icons right">delete</i></button></p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
console.log('woei');
|
||||||
|
$('form.digimark').on('submit',function(){$("#submit").prop("disabled", true); return true;})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user