diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-15 04:38:10 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-15 04:38:10 +0000 |
commit | 75fff7adce8eb95f35c2d44c6dd5aad986f2ae10 (patch) | |
tree | 585dfd42db412e61169ba52f04952cd85a11eccb /UI/elements.html | |
parent | 2e635d24bbfad9615e2e533a323ed3e73e6f9131 (diff) |
Applying changes to elements.html
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1608 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'UI/elements.html')
-rw-r--r-- | UI/elements.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/UI/elements.html b/UI/elements.html index bdf63d25..e27c3ec0 100644 --- a/UI/elements.html +++ b/UI/elements.html @@ -127,8 +127,8 @@ <?lsmb # OPTION ELEMENT ?> <?lsmb BLOCK option ?> - <?lsmb # Selected is a special case -- no attribute key, so it's handled here. - IF option_data.defined('selected'); + <?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; option_data.selected = " selected"; ELSE; option_data.selected = ""; @@ -222,9 +222,9 @@ element_id = element_data.name; END; ?> - <?lsmb # Add the id if it's been generated. Replace underscores with dashes -- nicer CSS. + <?lsmb # Add the id if it's been generated. Replace all non alphanumeric characters with dashes -- nicer CSS. IF element_id; - element_data.id = element_id.replace('[_]', '-'); + element_data.id = element_id.replace('[^\p{IsAlnum}]', '-'); END; ?> <?lsmb END ?> @@ -250,4 +250,4 @@ ?> <label<?lsmb label_id ?><?lsmb label_for ?><?lsmb label_class ?>><?lsmb text(element_data.label) ?></label> <?lsmb END ?> -<?lsmb END ?>
\ No newline at end of file +<?lsmb END ?> |