[% form_name = 'add_tool' %]

Tool Submission Form

[% IF message; INCLUDE message_block.tmpl; END %] [% IF verbose; # dumper_message = 'validator results: '; # dump_me = validator_results; PROCESS dumper.tmpl; FOREACH param = spec_list; '

' _ param.name _ ': param is '; IF param.error; param.error _ '

'; ELSE; 'OK

'; END; END; END; %]
[% FOREACH param = spec_list; NEXT IF param.name == 'rm'; param_class = 'pname'; IF param.error; '
'; ELSE; '
'; END; ## set up the parameter name param_name_text = ''; IF param.list_values; param_name_text = ''_ param.human_name _''; ELSE; param_name_text = ''; END; IF param.required; param_name_text = param_name_text _ ' [required]'; END; IF param.subtext; param_name_text = param_name_text _ '
' _ param.subtext; END; IF param.list_values && param.allow_multiple; param_name_text = param_name_text _ '
Please select all that are applicable.'; END; IF param.error && param.error == 'invalid' && param.error_text; param_name_text = param_name_text _ '
' _ param.error_text _ ''; END; IF param.list_values; # this param has multiple values... duh! '

' _ param_name_text _ '

'; IF param.allow_multiple; # use a checkbox if multiple params are allowed; '
    '; FOREACH lv = param.options %]
  • [% END; '
'; ELSE; option = param.options; opt_name = param.name; '

'; PROCESS options_radio.tmpl; '

'; END; ELSE; # single value params IF param.allow_multiple || (param.data_type && param.data_type == 'longtext'); # multiple values allowed; use a textarea %]

[% param_name_text %]

[% ELSIF param.options; # we have some options... %]

[% param_name_text %]

[% ELSE %]

[% param_name_text %]

[% END; END; # IF verbose; # dump_me = param; PROCESS dumper.tmpl; # END; '
'; END %]

[% #IF verbose; IF url_for_query; '

URL for this form

'; END; #END; %]