diff options
| author | Mitch Jackson <mitch@freeside.biz> | 2018-01-30 09:27:42 -0600 |
|---|---|---|
| committer | Mitch Jackson <mitch@freeside.biz> | 2018-10-28 15:03:32 -0400 |
| commit | 945bc9a8c3edf867cbaea0aa2af738d73ac180c8 (patch) | |
| tree | 6ca2ce309937fa0b011cbe508a38747f58253909 /httemplate/elements | |
| parent | 9ecbe48e7226f9fe9b8b641d6fe7b3fddcd4bc1e (diff) | |
RT# 73422 Changes to report Customer Contacts
Diffstat (limited to 'httemplate/elements')
| -rw-r--r-- | httemplate/elements/select-multiple-contact_class.html | 21 | ||||
| -rw-r--r-- | httemplate/elements/tr-select-multiple-contact_class.html | 32 |
2 files changed, 53 insertions, 0 deletions
diff --git a/httemplate/elements/select-multiple-contact_class.html b/httemplate/elements/select-multiple-contact_class.html new file mode 100644 index 000000000..81a71cc25 --- /dev/null +++ b/httemplate/elements/select-multiple-contact_class.html @@ -0,0 +1,21 @@ +<%doc> + +Display a multi-select box containing all Email Types listed in +the contact_class table. + +NOTE: + Don't confuse "Contact Type" (contact_email.classnum) with + "Customer Class" (cust_main.classnum) + +</%doc> +<% include( '/elements/select-table.html', + table => 'contact_class', + hashref => { disabled => '' }, + name_col => 'classname', + field => 'classnum', + pre_options => [ 0 => '(No Type)' ], + multiple => 1, + all_selected => 1, + @_, + ) +%> 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> |
