[%# The following variables are passed to this template: session_info => { username, session_id, superuser, fullname, etc } req_error => undef or 1, 2, 3 errors => undef, 2, 3, 4, etc 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 } ] list_old => { name, listadd, approved, id } descriptions => { Issues => { A1 => blah, A2 => ... }, Constit => { A2 => blah } } page => "change" %] [% username = session_info.username %] [% item = list_old.id %] [% name = list_old.listname %] [% undefined = 'undefined' %] CALF | [% "Double-Check Editors' Change" IF page == 'change' or page == 'edit'; "Double-Check New Submit Values" IF page == 'newlist' or page == 'commitnew'; %] [% INCLUDE groupshead %] [% INCLUDE colorbar color = "ff0000" height = "8" percent = "98%" %] [% INCLUDE editorsmenu IF editor.defined %]

[%# THIS NEEDS WORK %] [% UNLESS page == 'commitnew' %] Old Item Values For: [% list_old.name %]

[% INCLUDE displaylistinfo list = list_old descriptions = descriptions %] [% END %] [% IF req_error.defined %] At least one required field (*) is missing or incomplete. You will not be able Submit this item until this problem is fixed.

[% END %] [% IF errors.defined %] Errors were detected in the [% errors %] fields marked in red. [%#If the marked fields are required (*), you will need to fill them in before confirming this entry. %] Even if the errors are in non-required fields, it is still a good idea to check them before clicking on Confirm.

[% END %]

[% IF page == 'commitnew'%] Please look over your values again to insure accuracy. [% ELSE %] Editing: [% list_old.name %] Double-Check [% END %]
* Required

[% PROCESS submit_selectoptions %]

[% FOREACH field = fields %] [% name = field.name %] [%# END THE LOOPING FOR EACH FIELD %] [% END %]
[% "* " IF field.required.defined; "" IF field.valid == 0; %] [% field.title %]: [% "" IF field.valid == 0; %] [%# I NEED TO RENDER DIFFERENTLY DEPENDING ON THE TYPE OF FIELD INPUT %] [% IF field.size > 85 %] [% ELSIF field.type == 'select' %] [% key = field.value %] [% options = field.selectoptions %] [% ELSIF field.type == 'categorization' %] [% '' UNLESS field.value.defined %] 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 chosing. [% '' UNLESS field.value.defined %]
[% 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 OF THE IF STATMENT RENDERING DIFERENT TYPES %] [% END %]
[% IF page == 'commitnew' %] [% ELSE %] [% END %]

[% INCLUDE footer %]