X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-multiple-contact_class.html;fp=httemplate%2Felements%2Ftr-select-multiple-contact_class.html;h=5de12932487c11fce6e588da5dfebddc17fe08e4;hb=e803d5f00368e951f7a4b82d5d390b53c4a6c827;hp=0000000000000000000000000000000000000000;hpb=280c44682a79e586af941e869e7a78ca8f367cf2;p=freeside.git diff --git a/httemplate/elements/tr-select-multiple-contact_class.html b/httemplate/elements/tr-select-multiple-contact_class.html new file mode 100644 index 000000000..5de129324 --- /dev/null +++ b/httemplate/elements/tr-select-multiple-contact_class.html @@ -0,0 +1,32 @@ +<%doc> + + Displays Contact Types as a multi-select box. + + If no non-disabled Contact Types have been defined in contact_class table, + renders a hidden input field with a blank value. + + + +% if ($has_types) { + + <% $opt{'label'} || emt('Contact Type') %> + + <% include( '/elements/select-multiple-contact_class.html', %opt ) %> + + +% } else { + +% } + +<%init> + +my %opt = @_; +$opt{field} ||= $opt{element_name} ||= 'classnum'; + +my $has_types =()= qsearch({ + table => 'contact_class', + hashref => { disabled => '' }, + extra_sql => ' LIMIT 1 ', +}); + +