Skip to content

Commit

Permalink
Fix structures cancel button (erdbeere)
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed May 15, 2024
1 parent 132d128 commit 635c93d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/lectures.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ function loadExampleStructures() {
$.ajax(Routes.edit_structures_path(lectureId), {
type: "GET",
dataType: "script",
complete: () => {
$("#erdbeere-structures-cancel").on("click", () => {
loadExampleStructures();
});
},
});
};

Expand Down
6 changes: 2 additions & 4 deletions app/views/lectures/edit/_structures.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@
<div class="col-12 text-center">
<%= f.submit t('buttons.save'),
class: 'btn btn-sm btn-primary' %>
<a class="btn btn-sm btn-secondary"
data-bs-toggle="collapse"
href="#erdbeere_structures_collapse"
id="erdbeere_structures_collapse_button">
<a class="btn btn-sm btn-secondary" role="button"
id="erdbeere-structures-cancel">
<%= t('buttons.cancel') %>
</a>
</div>
Expand Down

0 comments on commit 635c93d

Please sign in to comment.