X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/018e340ac9f0fc9c4b0bd180bd195e7c0fbd3c0e..72ad92fd:/templates/webpages/generic/multibox.html diff --git a/templates/webpages/generic/multibox.html b/templates/webpages/generic/multibox.html index b1c615ecd..b26f86f0d 100644 --- a/templates/webpages/generic/multibox.html +++ b/templates/webpages/generic/multibox.html @@ -23,12 +23,18 @@ select : java function call for a selection popup or other magic allow_textbox : allow to display a textbox instead of a drop down box if there are more entries than 'limit' entries. limit : defines the limit of entries, after which a textbox is generated. defaults to vclimit, or, failing to find that, 200. + select_name : if a select is displayed, use a different name. ex.: department for textinput, but department_id for selects + readonly : softly prevents modification -%] [%- DEFAULT limit = limit != '' ? limit : vclimit != '' ? vclimit : 200 + show_text = allow_textbox and DATA.size and limit < DATA.size ? 1 : 0 id = id != '' ? id : name default = default != '' ? default : $name -%] +[%- + name = (select_name != '' and ! show_text) ? select_name : name +-%] [%- FOREACH row = DATA %] [%- row.id = row.$id_key != '' ? row.$id_key : $id_sub(row) @@ -38,28 +44,30 @@ row.selected = default == row.id -%] [%- END -%] -[%- IF allow_textbox and DATA.size and limit < DATA.size %] +[%- IF show_text %] -[%- IF select %] + [%- IF name %] name="[% HTML.escape(name) %]"[% END -%] + [%- IF id %] id="[% HTML.escape(id) %]"[% END -%] + [%- IF default %] value="[% HTML.escape(default) %]"[% END -%] + [%- IF style %] style="[% HTML.escape(style) %]"[% END -%] + [%- IF readonly %] readonly[% END -%] +[%- -%]> +[%- IF select -%] -[% END %] +[%- END -%] [%- ELSE %] [%- END %]