Delete fiscal year buttons prepared for final js confirmation dialog.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 3 Jun 2009 17:33:05 +0000 (17:33 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 3 Jun 2009 17:33:05 +0000 (17:33 +0000)
CHANGELOG.txt
admin/fiscalyears.php

index b74d5b4991f8753f6f5f6115172d73bb6150b422..15f157180498cd469a3a6cfdd3e8c576bbecfd89 100644 (file)
@@ -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
index 29d6d306d131c5b7c9e599705aef899220dff7bc..6ab8da04957f0eaf493b22b0c3a3e53d2e9b1a5b 100644 (file)
@@ -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();
        }