diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-02-09 19:10:00 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-02-09 19:10:00 -0800 |
commit | d45dd4a826f314fb5459747590d3e11cd80c211f (patch) | |
tree | c1dd2edd4bc42b12cc9a995e95dd7fb630da925e /httemplate/elements/tr-select-multiple-contact_class.html | |
parent | 4b67c9f8cfc9f944b7758e7e69ac1f9f188ffa47 (diff) | |
parent | 15d596e3090f3bde642917b56563736cd1ee2e90 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/tr-select-multiple-contact_class.html')
-rw-r--r-- | httemplate/elements/tr-select-multiple-contact_class.html | 32 |
1 files changed, 32 insertions, 0 deletions
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. + +</%doc> + +% if ($has_types) { +<TR> + <TD ALIGN="right"><% $opt{'label'} || emt('Contact Type') %></TD> + <TD> + <% include( '/elements/select-multiple-contact_class.html', %opt ) %> + </TD> +</TR> +% } else { +<INPUT TYPE="hidden" NAME="<% $opt{field} %>" VALUE=""> +% } + +<%init> + +my %opt = @_; +$opt{field} ||= $opt{element_name} ||= 'classnum'; + +my $has_types =()= qsearch({ + table => 'contact_class', + hashref => { disabled => '' }, + extra_sql => ' LIMIT 1 ', +}); + +</%init> |