From 90c08330ed36df13b13b7bf8577a70699acf85d3 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 3 Jun 2009 17:33:05 +0000 Subject: [PATCH] Delete fiscal year buttons prepared for final js confirmation dialog. --- CHANGELOG.txt | 4 ++++ admin/fiscalyears.php | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b74d5b49..15f15718 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +03-Jun-2009 Janusz Dobrowolski +! Delete buttons prepared for js confirmation. +$ /admin/fiscalyears.php + 02-Jun-2009 Joe Hunt ! Fiscal Year delete . now removes all transactions and convert into relevant open balances. $ /admin/fiscalyear.php diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index 29d6d306..6ab8da04 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -377,6 +377,9 @@ function display_fiscalyears() $result = get_all_fiscalyears(); start_form(); + display_note(_("Warning: During fiscal year removal all transactions + are removed and converted into relevant balances. This process is irreversible!"), + 0, 0, "class='currentfg'"); start_table($table_style); $th = array(_("Fiscal Year Begin"), _("Fiscal Year End"), _("Closed"), "", ""); @@ -406,9 +409,13 @@ function display_fiscalyears() label_cell($to); label_cell($closed_text); edit_button_cell("Edit".$myrow['id'], _("Edit")); - if ($myrow["id"] != $company_year) + if ($myrow["id"] != $company_year) { delete_button_cell("Delete".$myrow['id'], _("Delete")); - else + submit_js_confirm("Delete".$myrow['id'], + sprintf(_("Are you sure you want to remove fiscal year + '%s'-'%s'? All transactions are removed and converted into relevant + balances. Do you want to continue ?"), $from, $to)); + } else label_cell(''); end_row(); } -- 2.30.2