[freeside-commits] freeside/httemplate/elements search-cust_svc.html, NONE, 1.1.2.2
Mark Wells
mark at wavetail.420.am
Thu Jun 23 14:31:31 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv1487/httemplate/elements
Added Files:
Tag: FREESIDE_2_1_BRANCH
search-cust_svc.html
Log Message:
large package display in customer/package search, #13364
--- NEW FILE: search-cust_svc.html ---
<%doc>
Example:
<& /elements/search-cust_svc.html,
'svcpart' => 10,
'pkgnum' => 315,
'svcdb' => 'svc_acct',
&>
</%doc>
% if ( $first ) {
% $first = 0;
<SCRIPT TYPE="text/javascript">
function clearhint_search_cust_svc(obj, str) {
if (obj.value == str) obj.value='';
}
</SCRIPT>
% }
<FORM STYLE="display:inline"
ACTION="<%$p%>search/cust_pkg_svc.html" METHOD="GET">
% foreach ('svcpart', 'pkgnum') {
% if ($opt{$_}) {
<INPUT TYPE="hidden" NAME="<% $_ %>" VALUE="<% $opt{$_} %>">
% }
% }
<INPUT TYPE="text" NAME="search_svc" VALUE="<% $hint %>"
onfocus="clearhint_search_cust_svc(this, '<% $hint %>')">
<INPUT TYPE="submit" VALUE="Search">
</FORM>
<%init>
my %hints = (
svc_acct => '(user or email)',
svc_domain => '(domain)',
svc_broadband => '(ip or mac)',
svc_forward => '(email)',
svc_phone => '(phone)',
svc_pbx => '(phone)',
'' => '',
);
my( %opt ) = @_;
if ( !$opt{'svcdb'} and $opt{'svcpart'} ) {
my $part_svc = qsearchs('part_svc', { 'svcpart' => $opt{'svcpart'} });
$opt{'svcdb'} = $part_svc->svcdb if $part_svc;
}
my $hint = $hints{$opt{'svcdb'} || ''};
</%init>
<%shared>
my $first = 1;
</%shared>
More information about the freeside-commits
mailing list