X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fgeneric%2Fmultibox.html;fp=templates%2Fwebpages%2Fgeneric%2Fmultibox.html;h=b26f86f0dd138c1724ef6fc2fe882040079a1465;hb=198f860c0c828939ef6f8f698fcfb5d7b9796999;hp=ccb87cb154e41c4b1330049ab83559f2b9a31990;hpb=ee1d7e16868223bdeb2be45555b4d15545b53c7c;p=kivitendo-erp.git diff --git a/templates/webpages/generic/multibox.html b/templates/webpages/generic/multibox.html index ccb87cb15..b26f86f0d 100644 --- a/templates/webpages/generic/multibox.html +++ b/templates/webpages/generic/multibox.html @@ -23,13 +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) @@ -39,7 +44,7 @@ row.selected = default == row.id -%] [%- END -%] -[%- IF allow_textbox and DATA.size and limit < DATA.size %] +[%- IF show_text %]