From 79ce86b99fd052f4b5fcc3cc9ece2cb5f49b6f19 Mon Sep 17 00:00:00 2001
From: Robert Goldmann <deadlocker@gmx.de>
Date: Thu, 8 Nov 2018 18:50:56 +0100
Subject: [PATCH] Fixed #344 - delete repeating transaction doesn't show
 corresponding modal

---
 src/main/resources/languages/_de.properties                | 1 +
 src/main/resources/languages/_en.properties                | 2 ++
 src/main/resources/templates/transactions/transactions.ftl | 6 +++++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/languages/_de.properties b/src/main/resources/languages/_de.properties
index a9b930ab5..8e5953bde 100644
--- a/src/main/resources/languages/_de.properties
+++ b/src/main/resources/languages/_de.properties
@@ -78,6 +78,7 @@ info.text.account.delete=M
 info.button.account.delete=Konto und Buchungen l�schen
 info.title.transaction.delete=Buchung l�schen
 info.text.transaction.delete=M�chtest du die Buchung "{0}" wirklich unwiderruflich l�schen?
+info.text.transaction.repeating.delete=M�chtest du die Buchung "{0}" wirklich unwiderruflich l�schen? <br>Hinweis: Es handelt sich um eine wiederholende Buchung. Beim L�schen dieser Buchung werden alle zugeh�rigen Wiederholungen ebenfalls gel�scht!
 info.title.database.delete=Datenbank l�schen
 info.header.text.database.delete=Soll die Datenbank wirklich unwiderruflich gel�scht werden?
 info.text.database.delete=Zur Best�tigung gib folgenden Code ein:\t{0}
diff --git a/src/main/resources/languages/_en.properties b/src/main/resources/languages/_en.properties
index aa7eb67c5..881b85036 100644
--- a/src/main/resources/languages/_en.properties
+++ b/src/main/resources/languages/_en.properties
@@ -78,6 +78,8 @@ info.text.account.delete=Do you really want to delete the account "{0}"? This ca
 info.button.account.delete=Delete Account and Transactions
 info.title.transaction.delete=Delete Entry
 info.text.transaction.delete=Do you really want to delete the entry "{0}"? This can''t be undone.
+info.text.transaction.repeating.delete=o you really want to delete the entry "{0}"? This can''t be undone.<br>Note: This transaction is a repeating transaction. Deleting this transaction will delete all related occurrences too!
+
 info.title.database.delete=Delete Database
 info.header.text.database.delete=Do you really want to delete the database? This can''t be undone.
 info.text.database.delete=Please enter the following code for verification:\t{0}
diff --git a/src/main/resources/templates/transactions/transactions.ftl b/src/main/resources/templates/transactions/transactions.ftl
index 91d8671e4..32b2aa533 100644
--- a/src/main/resources/templates/transactions/transactions.ftl
+++ b/src/main/resources/templates/transactions/transactions.ftl
@@ -87,7 +87,11 @@
                 <div id="modalConfirmDelete" class="modal background-color">
                     <div class="modal-content">
                         <h4>${locale.getString("info.title.transaction.delete")}</h4>
-                        <p>${locale.getString("info.text.transaction.delete", currentTransaction.name)}</p>
+                        <#if currentTransaction.isRepeating()>
+                            <p>${locale.getString("info.text.transaction.repeating.delete", currentTransaction.name)}</p>
+                        <#else>
+                            <p>${locale.getString("info.text.transaction.delete", currentTransaction.name)}</p>
+                        </#if>
                     </div>
                     <div class="modal-footer background-color">
                         <a href="/transactions" class="modal-action modal-close waves-effect waves-light red btn-flat white-text">${locale.getString("cancel")}</a>
-- 
GitLab