Skip to content

Commit

Permalink
Fix results.php #31
Browse files Browse the repository at this point in the history
  • Loading branch information
Atlasfreak committed Jan 3, 2023
1 parent 97d331b commit c9fe7fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/js/delete_modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function delete_init(replacement_identifier, endpoint, parameter) {
$("button.delete").click(function () {
function delete_init(replacement_identifier, endpoint, parameter, parent, button = "button.delete") {
$(parent).on("click", button, function () {
let id = $(this).data("id");
let replacement = $(this).data("replacement");
let modal_store = $("div#modalStore");
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class="btn btn-danger btn-sm delete"
<?=$this->start("scripts")?>
<script src="js/delete_modal.js"></script>
<script>
delete_init("title", "delete_event.php", "event_id")
delete_init("title", "delete_event.php", "event_id", "table")
</script>
<script>
let install_button = $("#auto-update button");
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/results.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function create_data_tables() {
},
"initComplete": function(settings, json) {
init_controls();
delete_init("name", "delete_participant.php", "participant_id");
delete_init("name", "delete_participant.php", "participant_id", "table");
},
});
}
Expand Down

0 comments on commit c9fe7fa

Please sign in to comment.