summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-05-22 21:15:35 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-05-23 07:46:40 -0400
commit5b9562f8e03ae6efea0c2eaa90341083744fa529 (patch)
treef976d42d3433a329a1246a99c9ef22ad5eb3ff29 /httemplate/search
parenta11b765362c56117c4b944096184e3e3e55bffac (diff)
RT# 77532 - created method to display phone types
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/contact.html2
-rw-r--r--httemplate/search/elements/options_cust_contacts.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/httemplate/search/contact.html b/httemplate/search/contact.html
index 0f2b283b5..5def389cc 100644
--- a/httemplate/search/contact.html
+++ b/httemplate/search/contact.html
@@ -153,7 +153,7 @@ my $get_phone_sub = sub {
};
my @phones;
-foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
+foreach my $phone_type ( FS::phone_type->get_phone_types() ) {
push @phones, { label => $phone_type->typename.' Phone', field => $get_phone_sub->($phone_type->phonetypenum), };
}
diff --git a/httemplate/search/elements/options_cust_contacts.html b/httemplate/search/elements/options_cust_contacts.html
index 8a6b76913..372bc6755 100644
--- a/httemplate/search/elements/options_cust_contacts.html
+++ b/httemplate/search/elements/options_cust_contacts.html
@@ -12,7 +12,7 @@
<TH ALIGN="right" VALIGN="center"><% mt('Email') |h %></TH>
<TD><INPUT TYPE="text" NAME="<%$field_prefix%>email" SIZE=54></TD>
</TR>
-% foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
+% foreach my $phone_type ( FS::phone_type->get_phone_types() ) {
<TR>
<TH ALIGN="right" VALIGN="center"><% $phone_type->typename. ' Phone' |h %></TH>
<TD><INPUT TYPE="text" NAME="<% $field_prefix %>phonetypenum<% $phone_type->phonetypenum %>" SIZE=54></TD>