diff options
author | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-12-14 21:10:01 +0000 |
---|---|---|
committer | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-12-14 21:10:01 +0000 |
commit | 664d660c64b882714d87f3a8dc7491723042ae0c (patch) | |
tree | eb70016566ed692ef60e63c65f9ecced4311c96f /share/skin/default/layout/field/choose_one.tt | |
parent | aa8c0c904641fa20c5f50882d09c1502aae19b3a (diff) | |
download | reaction-664d660c64b882714d87f3a8dc7491723042ae0c.tar.gz reaction-664d660c64b882714d87f3a8dc7491723042ae0c.zip |
port actionform, field widgets to declarative system
Diffstat (limited to 'share/skin/default/layout/field/choose_one.tt')
-rw-r--r-- | share/skin/default/layout/field/choose_one.tt | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/share/skin/default/layout/field/choose_one.tt b/share/skin/default/layout/field/choose_one.tt index 2fd39d6..ec1814a 100644 --- a/share/skin/default/layout/field/choose_one.tt +++ b/share/skin/default/layout/field/choose_one.tt @@ -1,42 +1,28 @@ -=for layout widget - -[% label %] [% field %] [% message %] +=extends field =for layout field <!-- We need a replacement for process_attrs --> -<select name="[% name | html %]" id="[% id | html %]"> - [% IF is_required %] - <option value="">--</option> - [% END %] - [% content %] +<select name="[% field_name %]" id="[% field_id %]"> + [% option_is_required %] + [% option_list %] </select> +=for layout option_is_required_yes + +=for layout option_is_required_no + +<option value="">--</option> + =for layout option - [% IF is_selected; - selected = ' selected="selected"'; - ELSE; - selected = ''; - END; - %] - <!-- I should convert this stuff to process_attrs to keep it cleaner --> - <option value="[% v_value | html%]" [% selected %]> [% v_name | html %]</option> - -=for layout label - -<!-- This conditional goes away when mst comes up with something better --> -[% content_str = GET content; %] -[% IF content_str.length; %] - <label> [% content_str | html %]: </label> -[% END; %] - -=for layout message - -<!-- This conditional goes away when mst comes up with something better --> -[% content_str = GET content; %] -[% IF content_str.length; %] - <span> [% content_str | html %] </span> <br /> -[% END %] + <option value="[% option_value %]" [% option_is_selected %] + > [% option_name %]</option> + +=for options_is_selected_yes + +selected="selected" + +=for option_is_selected_no =cut |