Lines 38-72
Link Here
|
38 |
<li> |
38 |
<li> |
39 |
<label>Subscription length:</label> |
39 |
<label>Subscription length:</label> |
40 |
<select name="subtype" id="subtype"> |
40 |
<select name="subtype" id="subtype"> |
41 |
[% FOREACH st IN subtypes %] |
41 |
[% FOREACH st IN [['numberlength', 'issues'], ['weeklength', 'weeks'], ['monthlength', 'months']] %] |
42 |
[% SWITCH st %] |
42 |
[% SET subtype = st.0 %] |
43 |
[% CASE 'numberlength'%] |
43 |
[% SET value = st.1 %] |
44 |
[% IF st == subtype %] |
44 |
[% IF subscription.$subtype %] |
45 |
<option value="issues" selected="selected"> |
45 |
<option value="[% value %]" selected="selected"> |
46 |
[% ELSE %] |
46 |
[% ELSE %] |
47 |
<option value="issues"> |
47 |
<option value="[% value %]"> |
48 |
[% END %] |
48 |
[% END %] |
49 |
issues |
49 |
[% SWITCH subtype %] |
50 |
[% CASE 'weeklength' %] |
50 |
[% CASE 'numberlength'%]issues |
51 |
[% IF st == subtype %] |
51 |
[% CASE 'weeklength' %]weeks |
52 |
<option value="weeks" selected="selected"> |
52 |
[% CASE 'monthlength' %]months |
53 |
[% ELSE %] |
|
|
54 |
<option value="weeks"> |
55 |
[% END %] |
56 |
weeks |
57 |
[% CASE 'monthlength' %] |
58 |
[% IF st == subtype %] |
59 |
<option value="months" selected="selected"> |
60 |
[% ELSE %] |
61 |
<option value="months"> |
62 |
[% END %] |
63 |
months |
64 |
[% CASE %][% st | html %] |
65 |
[% END %] |
53 |
[% END %] |
66 |
</option> |
54 |
</option> |
67 |
[% END %] |
55 |
[% END %] |
68 |
</select> |
56 |
</select> |
69 |
<input type="text" name="sublength" id="sublength" size="3" />(enter amount in numerals) |
57 |
<input type="text" name="sublength" id="sublength" size="3" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength %]" />(enter amount in numerals) |
70 |
<input type="hidden" name="issuelengthcount"> |
58 |
<input type="hidden" name="issuelengthcount"> |
71 |
</li> |
59 |
</li> |
72 |
|
60 |
|