aboutsummaryrefslogtreecommitdiffstats
path: root/share/skin/default/layout/field/choose_one.tt
blob: 2fd39d6897f5358f26bee097447afbd95b059e7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
=for layout widget

[% label %] [% field %] [% message %]

=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>

=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 %]

=cut