From 5494edb33464e87b12e55d582ca6477cbb4e9fd0 Mon Sep 17 00:00:00 2001 From: tetragon Date: Fri, 5 Oct 2007 22:02:51 +0000 Subject: Convert the defaults screen to using a template Make the defaults screen valid XHTML 1.0 Transitional git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1706 4979c152-3d1c-0410-bac9-87ea11338e46 --- UI/am-defaults.html | 152 +++++++++++++++++++++++++++++++++++++++ bin/am.pl | 202 +++++++++------------------------------------------- 2 files changed, 186 insertions(+), 168 deletions(-) create mode 100644 UI/am-defaults.html diff --git a/UI/am-defaults.html b/UI/am-defaults.html new file mode 100644 index 00000000..1800ebe0 --- /dev/null +++ b/UI/am-defaults.html @@ -0,0 +1,152 @@ + + + + <?lsmb form.titlebar ?> + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ + 'hidden', + name => hidden, + value => hiddens.item(hidden) + }; END; +PROCESS button element_data={name => 'action', value => 'save' text => text('Save')} ?> +
+ + + diff --git a/bin/am.pl b/bin/am.pl index e79a9998..800b0dce 100644 --- a/bin/am.pl +++ b/bin/am.pl @@ -1693,182 +1693,48 @@ sub defaults { # get defaults for account numbers and last numbers AM->get_all_defaults( \%$form ); + my %selects = ( + 'FX_loss' => {name => 'FX_loss', options => []}, + 'FX_gain' => {name => 'FX_gain', options => []}, + 'IC_expense' => {name => 'IC_expense', options => []}, + 'IC_income' => {name => 'IC_income', options => []}, + 'IC_inventory' => {name => 'IC_inventory', options => []}, + 'IC' => {name => 'IC', options => []}, + ); foreach $key ( keys %{ $form->{accno} } ) { foreach $accno ( sort keys %{ $form->{accno}{$key} } ) { - $form->{account}{$key} .= - "