From 1def73b90a502c30023abaf9a9a3d2e11660449d Mon Sep 17 00:00:00 2001 From: Geoffrey POUZET Date: Sat, 24 Oct 2020 14:39:14 +0200 Subject: [PATCH] Add confirmation popup on delete care or behavior. --- src/main/resources/messages.properties | 6 +- src/main/resources/messages_en.properties | 6 +- src/main/resources/messages_fr.properties | 6 +- .../webapp/vue/animal_cares_and_behaviors.jsp | 57 +++++++++++++++++-- src/main/webapp/vue/animal_list.jsp | 4 +- 5 files changed, 66 insertions(+), 13 deletions(-) diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 9c8c872..4719dd8 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -31,5 +31,7 @@ authentication.label.password=Password: authentication.placeholder.password=Password authentication.button.submit=Login animal_list.delete.modal_body=Do you want to delete this animal? -animal_list.delete.modal_button_yes=Yes -animal_list.delete.modal_button_no=No +modal_button.delete=Delete +modal_button.cancel=Cancel +animal_cares_and_behaviors.delete.modal_body.behavior=Do you want to delete this behavior? +animal_cares_and_behaviors.delete.modal_body.care=Do you want to delete this care? diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index 46350fc..e59be89 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -31,5 +31,7 @@ authentication.label.password=Password: authentication.placeholder.password=Password authentication.button.submit=Login animal_list.delete.modal_body=Do you want to delete this animal? -animal_list.delete.modal_button_yes=Yes -animal_list.delete.modal_button_no=No +modal_button.delete=Delete +modal_button.cancel=Cancel +animal_cares_and_behaviors.delete.modal_body.behavior=Do you want to delete this behavior? +animal_cares_and_behaviors.delete.modal_body.care=Do you want to delete this care? diff --git a/src/main/resources/messages_fr.properties b/src/main/resources/messages_fr.properties index 4636052..7080044 100644 --- a/src/main/resources/messages_fr.properties +++ b/src/main/resources/messages_fr.properties @@ -31,5 +31,7 @@ authentication.label.password=Mot de passe : authentication.placeholder.password=Mot de passe authentication.button.submit=Connexion animal_list.delete.modal_body=Voulez-vous vraiment supprimer cet animal ? -animal_list.delete.modal_button_yes=Oui -animal_list.delete.modal_button_no=Non +modal_button.delete=Supprimer +modal_button.cancel=Annuler +animal_cares_and_behaviors.delete.modal_body.behavior=Voulez-vous vraiment supprimer ce comportement ? +animal_cares_and_behaviors.delete.modal_body.care=Voulez-vous vraiment supprimer ce soin ? diff --git a/src/main/webapp/vue/animal_cares_and_behaviors.jsp b/src/main/webapp/vue/animal_cares_and_behaviors.jsp index a6b4c24..48cf5e0 100644 --- a/src/main/webapp/vue/animal_cares_and_behaviors.jsp +++ b/src/main/webapp/vue/animal_cares_and_behaviors.jsp @@ -49,6 +49,7 @@
${care.getName()}
+
@@ -81,6 +82,7 @@
${consentBehavior.getName()}
+
@@ -104,11 +106,56 @@ <%@ include file="base/footer.jsp" %> - - diff --git a/src/main/webapp/vue/animal_list.jsp b/src/main/webapp/vue/animal_list.jsp index eac05e7..5c79f27 100644 --- a/src/main/webapp/vue/animal_list.jsp +++ b/src/main/webapp/vue/animal_list.jsp @@ -111,9 +111,9 @@