Skip to content

Commit

Permalink
Merge pull request #69 from DPIclimate/issue_67
Browse files Browse the repository at this point in the history
Changed handleSubmit to check if event parameter was supplied.
  • Loading branch information
dajtxx authored May 6, 2024
2 parents 4798da8 + 03cadcc commit 85d8907
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/www/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
});

function handleSubmit(form_id, warning_message, event) {
event.preventDefault()
if ( ! event === undefined) {
event.preventDefault()
}

if (confirm(warning_message)) {
const formElement = document.getElementById(form_id);
const formData = new FormData(formElement);
Expand Down Expand Up @@ -256,4 +259,4 @@ <h3 id="mapping-dialog-heading">Edit Note</h3>
<input type="button" class="form-btn" value="Close" onClick="closeEditNote()">
</div>
</dialog>
</html>
</html>

0 comments on commit 85d8907

Please sign in to comment.