diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-25 00:36:53 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-25 00:36:53 +0000 |
commit | b76b9b5f62567fc10377ef2be47972f79f1a2147 (patch) | |
tree | 8d0b58478e8b2a00d2ce2526e4d7cc49c8b35f5e /UI | |
parent | e7e1dafee2629dcbd57e7ac3d50ad84bce03e694 (diff) |
Convert old template editor to templates
Remove now-unused form_footer
bin/am.pl now has all functions using templates or form functions for output
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1819 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'UI')
-rw-r--r-- | UI/am-display-template.html | 20 | ||||
-rw-r--r-- | UI/am-edit-template.html | 22 |
2 files changed, 42 insertions, 0 deletions
diff --git a/UI/am-display-template.html b/UI/am-display-template.html new file mode 100644 index 00000000..62a6a871 --- /dev/null +++ b/UI/am-display-template.html @@ -0,0 +1,20 @@ +<?lsmb INCLUDE 'ui-header.html' ?> +<?lsmb PROCESS elements.html ?> +<body> +<?lsmb IF !form.file.match('\.html$'); #Pre-enclose non-HTML templates ?> +<pre><?lsmb form.body ?></pre><?lsmb +ELSE; + form.body; +END ?> +<form method="post" action="<?lsmb form.script ?>"> +<?lsmb FOREACH hidden IN hiddens.keys; + PROCESS input element_data={ + type => 'hidden', + name => hidden, + value => hiddens.item(hidden) + }; END ?> +<?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?> +</form> +</body> +</html> + diff --git a/UI/am-edit-template.html b/UI/am-edit-template.html new file mode 100644 index 00000000..8d596098 --- /dev/null +++ b/UI/am-edit-template.html @@ -0,0 +1,22 @@ +<?lsmb INCLUDE 'ui-header.html' ?> +<?lsmb PROCESS elements.html ?> +<body> +<form method="post" action="<?lsmb form.script ?>"> + <?lsmb PROCESS textarea element_data={ + name => 'body', + rows => 25, + cols => 70, + text => form.body, + } ?> +<br /> +<?lsmb FOREACH hidden IN hiddens.keys; + PROCESS input element_data={ + type => 'hidden', + name => hidden, + value => hiddens.item(hidden) + }; END ?> +<?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?> +</form> +</body> +</html> + |