Skip to content

Commit

Permalink
Trying to put the save button at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
reactorcoremeltdown committed Mar 27, 2023
1 parent 4c21990 commit 30f9966
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion templates/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

{% block toolbar %}
<li class="nav-item">
<button type="submit" form="form" class="btn btn-success mb-2">Save</button>
<button id="save-button" class="btn btn-success mb-2">Save</button>
</li>
{% endblock %}

Expand Down Expand Up @@ -93,4 +93,13 @@
});

</script>
<script>
window.addEventListener("DOMContentLoaded", function () {
var form = document.getElementById("form");

document.getElementById("save-button").addEventListener("click", function () {
form.submit();
});
});
</script>
{% endblock %}

0 comments on commit 30f9966

Please sign in to comment.