From: Janusz Dobrowolski Date: Wed, 3 Jun 2009 17:33:05 +0000 (+0000) Subject: Delete fiscal year buttons prepared for final js confirmation dialog. X-Git-Tag: v2.4.2~19^2~1364 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=90c08330ed36df13b13b7bf8577a70699acf85d3;p=fa-stable.git Delete fiscal year buttons prepared for final js confirmation dialog. --- 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(); }