diff options
| author | stilbruch <stilbruch@protonmail.com> | 2022-04-06 15:54:13 -0500 |
|---|---|---|
| committer | stilbruch <stilbruch@protonmail.com> | 2022-04-06 15:54:13 -0500 |
| commit | 73b96155fcd54b958fe8c676db028fd4fc4fabe4 (patch) | |
| tree | 463889ee607c060c36404df88a6eca88146c3204 /app/templates/home.html | |
| parent | a15316714eed4c8051bd84917a126f104e3ed293 (diff) | |
| download | Strengthy-73b96155fcd54b958fe8c676db028fd4fc4fabe4.tar.xz Strengthy-73b96155fcd54b958fe8c676db028fd4fc4fabe4.zip | |
Add confirmation modal for deleting a workout
Diffstat (limited to 'app/templates/home.html')
| -rw-r--r-- | app/templates/home.html | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/templates/home.html b/app/templates/home.html index 4d5cb8a..a8cf949 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -63,10 +63,27 @@ <td class="level-right"> <p class="buttons"> <a class="button is-small is-primary" href="/workout/edit?id={{ workout.id }}">Edit</a> - <a class="button is-small is-danger" href="#">Delete</a> + <a class="button is-small is-danger js-modal-trigger" data-target="modal-{{ workout.id }}" href="#">Delete</a> </p> </td> </tr> + <!-- Confirmation Modal --> + <div class="modal" id="modal-{{ workout.id }}"> + <div class="modal-background"></div> + <div class="modal-card"> + <section class="modal-card-body"> + <h1 class="title has-text-black">Are you sure?</h1> + <p> + Are you sure you want to delete this workout? + You will not be able to restore it once you do. + </p> + </section> + <footer class="modal-card-foot"> + <button class="button is-danger">Confirm</button> + <button class="button">Cancel</button> + </footer> + </div> + </div> {% endfor %} </tbody> </table> |
