[%# The following variables are passed to this template: session_info => { username, session_id, superuser, fullname, etc } editor => 1 or undef or 0 editor_thislist => 1 or undef or 0 list => { name, listadd, approved, id } fields => [ { name => state, value => WA, type => select, selectoptions => options_state, etc }, { name => "issues", title => "Issues", type => "categorization", dbtable => "Issues", size => 14 }, { name => "approved", title => "Approved List", type => "radio", size => 1, choices => { yes => 1, no => 0 }, editoronly => 1 }, { name => "msgsperweek", title => "Traffic (msgs/wk)", type => "text", size => 10 } ] page => "edit" %] [% username = session_info.username %] [% item = list.id %] [% name = list.listname %] CALF | [% "Submit New item" IF page == 'newlist' %] [% name IF page == 'edit' %] [% INCLUDE groupshead %] [% INCLUDE colorbar color = "ff0000" height = "8" percent = "98%" %] [% INCLUDE editorsmenu IF editor.defined %]

[% IF page == 'edit' %] Editing: [% name %]
[% ELSIF page == 'newlist' %] Submit New Item
[% END %] * Required
[% UNLESS editor.defined %] We will need a valid e-mail address for verification purposes. This should be your email address. If we need additional information, we then will be able to contact you. [% END %] [% PROCESS submit_selectoptions %]
[% FOREACH field = fields %] [% END %]
[% IF field.required.defined %] [% field.title %]: [% ELSE %] [% field.title %]: [% END %] [% IF field.size > 85 %] [% ELSIF field.type == 'select' %] [% key = field.value %] [% options = field.selectoptions %] [% ELSIF field.type == 'categorization' %] You must provide at least one (and no more than seven) field in the "[% field.title %]" area. Consider Other, General or Multi-Issue if you're having difficulty choosing.
[% broken = 0 %] [% FOREACH category = field.checkboxoptions %] [% UNLESS category.checked.defined %][% category.description %] [% ELSE %][% category.description %][% END %]
[% IF loop.count >= (loop.size / 2) %] [% NEXT IF broken == 1 %]
[% broken = 1 %] [% END %] [% END %]

[% ELSIF field.type == 'radio' %] [% FOREACH choice = field.choices.keys %] [% choiceval = field.choices.$choice %] [% choice %] [% END %] [% ELSE %] [% END %]

[% INCLUDE footer %]