Added confirmation dialog to avoid accidental delete of invoice entries.
authoranuko <support@anuko.com>
Sun, 7 Jan 2018 19:54:55 +0000 (19:54 +0000)
committeranuko <support@anuko.com>
Sun, 7 Jan 2018 19:54:55 +0000 (19:54 +0000)
18 files changed:
WEB-INF/resources/da.lang.php
WEB-INF/resources/de.lang.php
WEB-INF/resources/en.lang.php
WEB-INF/resources/es.lang.php
WEB-INF/resources/fa.lang.php
WEB-INF/resources/fi.lang.php
WEB-INF/resources/fr.lang.php
WEB-INF/resources/he.lang.php
WEB-INF/resources/nl.lang.php
WEB-INF/resources/pl.lang.php
WEB-INF/resources/pt-br.lang.php
WEB-INF/resources/ru.lang.php
WEB-INF/resources/sk.lang.php
WEB-INF/resources/sr.lang.php
WEB-INF/resources/sv.lang.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/invoice_delete.tpl
invoice_delete.php

index 64ebe86..e25f3f7 100644 (file)
@@ -354,6 +354,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Person',
 'form.invoice.invoice_to_delete' => 'Faktura der skal slettes',
 'form.invoice.invoice_entries' => 'Faktura emner',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Interval',
index c493935..ba1e5f0 100644 (file)
@@ -359,6 +359,8 @@ $i18n_key_words = array(
 // The settings tells whether we are deleting invoiced items when deleting an invoice.
 // If we select "do not delete" then the items stay, and can be included in another invoice.
 'form.invoice.invoice_entries' => 'Rechnungseintrag',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Zeitraum',
index fb80820..4e2ac42 100644 (file)
@@ -356,6 +356,7 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Person',
 'form.invoice.invoice_to_delete' => 'Invoice to delete',
 'form.invoice.invoice_entries' => 'Invoice entries',
+'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Interval',
index b32695f..2798045 100644 (file)
@@ -415,6 +415,7 @@ $i18n_key_words = array(
 // TODO: translate the following stings.
 // 'form.invoice.invoice_to_delete' => 'Invoice to delete',
 // 'form.invoice.invoice_entries' => 'Invoice entries',
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 // TODO: translate form.charts.interval and form.charts.chart.
index 6e8f02b..59109c8 100644 (file)
@@ -382,6 +382,7 @@ $i18n_key_words = array(
 // TODO: translate the following stings.
 // 'form.invoice.invoice_to_delete' => 'Invoice to delete',
 // 'form.invoice.invoice_entries' => 'Invoice entries',
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'بازه',
index 20853bc..f0e3732 100644 (file)
@@ -355,6 +355,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Henkilö',
 'form.invoice.invoice_to_delete' => 'Poistettava lasku',
 'form.invoice.invoice_entries' => 'Laskurivit',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Ajalta',
index 3f76465..309e150 100644 (file)
@@ -346,6 +346,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Personne',
 'form.invoice.invoice_to_delete' => 'Facture à supprimer',
 'form.invoice.invoice_entries' => 'Entrées de facture',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Intervalle',
index aa75ff5..001143b 100644 (file)
@@ -384,6 +384,7 @@ $i18n_key_words = array(
 // TODO: translate the following stings.
 // 'form.invoice.invoice_to_delete' => 'Invoice to delete',
 // 'form.invoice.invoice_entries' => 'Invoice entries',
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'טווח',
index 0ea7673..70331e0 100644 (file)
@@ -353,6 +353,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Medewerker',
 'form.invoice.invoice_to_delete' => 'Te verwijderen factuur',
 'form.invoice.invoice_entries' => 'Factuur gegevens',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Periode',
index 94c3087..a5065e5 100644 (file)
@@ -363,6 +363,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Osoba',
 'form.invoice.invoice_to_delete' => 'Faktura do usunięcia',
 'form.invoice.invoice_entries' => 'Wpisy dot. faktury',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.phpp
 'form.charts.interval' => 'Okres',
index 4617d57..4724706 100644 (file)
@@ -356,6 +356,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Pessoa',
 'form.invoice.invoice_to_delete' => 'Fatura a ser apagada',
 'form.invoice.invoice_entries' => 'Entradas de fatura',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Intervalo',
index d837d0a..bd6b6fd 100644 (file)
@@ -354,6 +354,7 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Работник',
 'form.invoice.invoice_to_delete' => 'Счёт для удаления',
 'form.invoice.invoice_entries' => 'Записи счёта',
+'form.invoice.confirm_deleting_entries' => 'Подтвердите удаление записей из Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Интервал',
index 4ef634a..5d179fc 100644 (file)
@@ -379,9 +379,10 @@ $i18n_key_words = array(
 // (you can get to this form after generating a report).
 'form.invoice.number' => 'Číslo faktúry',
 'form.invoice.person' => 'Osoba',
-// TODO: translate the following stings.
+// TODO: translate the following.
 // 'form.invoice.invoice_to_delete' => 'Invoice to delete',
 // 'form.invoice.invoice_entries' => 'Invoice entries',
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Interval',
index 178e626..1db2ad6 100644 (file)
@@ -360,6 +360,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Osoba',
 'form.invoice.invoice_to_delete' => 'Račun za brisanje',
 'form.invoice.invoice_entries' => 'Unos u račun',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Forma grafikona. Pogledajte primer na https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Intervali',
index 338dde9..a089946 100644 (file)
@@ -358,6 +358,8 @@ $i18n_key_words = array(
 'form.invoice.person' => 'Person',
 'form.invoice.invoice_to_delete' => 'Fakturanummer',
 'form.invoice.invoice_entries' => 'Relaterade tider och kostnader',
+// TODO: translate the following.
+// 'form.invoice.confirm_deleting_entries' => 'Please confirm deleting invoice entries from Time Tracker.',
 
 // Charts form. See example at https://timetracker.anuko.com/charts.php
 'form.charts.interval' => 'Intervall',
index 1772b10..b2bbbf6 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.13.8.3728 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.13.9.3729 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 0f53937..3e0c070 100644 (file)
@@ -1,3 +1,14 @@
+<script>
+  function confirm_deleting_entries() {
+    var dropdown = document.getElementById("delete_invoice_entries");
+    if (1 == dropdown.value) {
+      // User selected deleting values. Ask to confirm.
+      return confirm("{$i18n.form.invoice.confirm_deleting_entries}");
+    }
+    return true;
+  }
+</script>
+
 {$forms.invoiceDeleteForm.open}
 <table cellspacing="4" cellpadding="7" border="0">
   <tr>
index 41f7c19..175889e 100644 (file)
@@ -46,7 +46,7 @@ $form->addInput(array('type'=>'combobox',
     'name'=>'delete_invoice_entries',
     'data'=>array('0'=>$i18n->getKey('dropdown.do_not_delete'),'1'=>$i18n->getKey('dropdown.delete')),
 ));
-$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
+$form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete'),'onclick'=>'return confirm_deleting_entries();'));
 $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
 
 if ($request->isPost()) {