summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-15 16:04:59 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-15 16:04:59 +0000
commit57dfea7df5e73799e43da21263887ac57aa6383e (patch)
treeb96658533dc1863f79f4a75b429ac672ba6da8d3
parentaa07064fcb14056a9e46b4d41e4106d7b152377a (diff)
Enabling trim on HTML, fixing elements.html to work with TT 2.15
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1611 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/Template/HTML.pm1
-rw-r--r--UI/elements.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/LedgerSMB/Template/HTML.pm b/LedgerSMB/Template/HTML.pm
index ae518e18..3eb442c8 100755
--- a/LedgerSMB/Template/HTML.pm
+++ b/LedgerSMB/Template/HTML.pm
@@ -81,6 +81,7 @@ sub process {
START_TAG => quotemeta('<?lsmb'),
END_TAG => quotemeta('?>'),
DELIMITER => ';',
+ TRIM => 1,
DEBUG => ($parent->{debug})? 'dirs': undef,
DEBUG_FORMAT => '',
}) || throw Error::Simple Template->error();
diff --git a/UI/elements.html b/UI/elements.html
index e27c3ec0..7369a52e 100644
--- a/UI/elements.html
+++ b/UI/elements.html
@@ -128,7 +128,7 @@
<?lsmb # OPTION ELEMENT ?>
<?lsmb BLOCK option ?>
<?lsmb # Selected is a special case -- no attribute key, so it's handled here by looking for the option value in the default_values key.
- IF element_data.defined('default_values') AND element_data.default_values.grep('^' _ option_data.value _ '$').size;
+ IF element_data.defined('default_values') AND element_data.default_values.grep("^${option_data.value}$").size;
option_data.selected = " selected";
ELSE;
option_data.selected = "";