[freeside-commits] freeside/httemplate/elements select-user.html, NONE, 1.1 tr-select-user.html, NONE, 1.1

Mark Wells mark at wavetail.420.am
Mon Mar 29 02:18:24 PDT 2010


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv3249/httemplate/elements

Added Files:
	select-user.html tr-select-user.html 
Log Message:
RT#884: search customers by signup time of day

--- NEW FILE: select-user.html ---
<SELECT NAME="usernum">

% unless ( $opt{'multiple'} || $opt{'disable_empty'} ) {
  <OPTION VALUE="">all</OPTION>
% }

% foreach my $otaker ( @{ $opt{'otakers'} } ) { 
    <OPTION VALUE="<% shift(@{$opt{'usernums'}}) %>"><% $otaker %></OPTION>
% } 

</SELECT>

<%init>

my %opt = @_;

unless ( $opt{'otakers'} ) {

  my $sth = dbh->prepare("SELECT username,usernum FROM access_user".
                       " WHERE disabled = '' or disabled IS NULL")
    or die dbh->errstr;
  $sth->execute or die $sth->errstr;
  for($sth->fetchall_arrayref) {
    $opt{'otakers'} = [ map { $_->[0] } @$_ ];
    $opt{'usernums'} = [ map { $_->[1] } @$_ ];
  }

}

</%init>

--- NEW FILE: tr-select-user.html ---
<TR>
  <TD ALIGN="right"><% $opt{'label'} || 'Employee: ' %></TD>
  <TD><% include('select-user.html', %opt) %></TD>
</TR>

<%init>

my %opt = @_;

</%init>



More information about the freeside-commits mailing list