Skip to content

Commit

Permalink
Also hide confirmation dialog on "Save/Publish"
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbraun committed Aug 29, 2024
1 parent 2a873e4 commit 5b67fbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion media/script/confirm_close.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ $(window).load(function () {
$('#id_attest-public_comment').change(function(){somethingWasChanged=true;});
$('#id_attest-private_comment').change(function(){somethingWasChanged=true;});
$('#id_attest-final_grade').change(function(){somethingWasChanged=true;});
$('#id_save').click(function(){somethingWasChanged=false;});
$('.save_btn').click(function(){somethingWasChanged=false;});
});

4 changes: 2 additions & 2 deletions src/templates/attestation/attestation_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
<form enctype="multipart/form-data" method="post" action="">{% csrf_token %}

<div id="form_actions">
<input type="submit" value="Save/Publish" name="publish">
<input type="submit" value="Save/Preview" name="save" id="id_save">
<input type="submit" value="Save/Publish" name="publish" class="save_btn">
<input type="submit" value="Save/Preview" name="save" class="save_btn">
<input type="button" value="Discard/Back" onClick="parent.location='{% url "attestation_list" solution.task_id %}'">
</div>

Expand Down

0 comments on commit 5b67fbb

Please sign in to comment.