From 7e31ec9db2a079cb231416b8243a8efc52a92ad9 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 7 Jan 2018 19:54:55 +0000 Subject: [PATCH] Added confirmation dialog to avoid accidental delete of invoice entries. --- WEB-INF/resources/da.lang.php | 2 ++ WEB-INF/resources/de.lang.php | 2 ++ WEB-INF/resources/en.lang.php | 1 + WEB-INF/resources/es.lang.php | 1 + WEB-INF/resources/fa.lang.php | 1 + WEB-INF/resources/fi.lang.php | 2 ++ WEB-INF/resources/fr.lang.php | 2 ++ WEB-INF/resources/he.lang.php | 1 + WEB-INF/resources/nl.lang.php | 2 ++ WEB-INF/resources/pl.lang.php | 2 ++ WEB-INF/resources/pt-br.lang.php | 2 ++ WEB-INF/resources/ru.lang.php | 1 + WEB-INF/resources/sk.lang.php | 3 ++- WEB-INF/resources/sr.lang.php | 2 ++ WEB-INF/resources/sv.lang.php | 2 ++ WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/invoice_delete.tpl | 11 +++++++++++ invoice_delete.php | 2 +- 18 files changed, 38 insertions(+), 3 deletions(-) diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index 64ebe865..e25f3f7d 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -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', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index c4939356..ba1e5f0d 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -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', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index fb808202..4e2ac42a 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -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', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index b32695f4..27980450 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -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. diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 6e8f02b3..59109c8e 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -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' => 'بازه', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 20853bcf..f0e37320 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -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', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index 3f764656..309e150b 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -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', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index aa75ff57..001143bf 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -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' => 'טווח', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 0ea7673c..70331e07 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -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', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index 94c30874..a5065e5b 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -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', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 4617d570..47247060 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -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', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index d837d0a1..bd6b6fdb 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -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' => 'Интервал', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 4ef634a9..5d179fc2 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -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', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index 178e626f..1db2ad6f 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -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', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index 338dde99..a0899465 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -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', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1772b100..b2bbbf6d 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.8.3728 | Copyright © Anuko | +  Anuko Time Tracker 1.13.9.3729 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/invoice_delete.tpl b/WEB-INF/templates/invoice_delete.tpl index 0f539377..3e0c0700 100644 --- a/WEB-INF/templates/invoice_delete.tpl +++ b/WEB-INF/templates/invoice_delete.tpl @@ -1,3 +1,14 @@ + + {$forms.invoiceDeleteForm.open} diff --git a/invoice_delete.php b/invoice_delete.php index 41f7c190..175889e2 100644 --- a/invoice_delete.php +++ b/invoice_delete.php @@ -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()) { -- 2.20.1