This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / httemplate / search / svc_acct.cgi
index 09d1177..1407d9e 100755 (executable)
@@ -69,12 +69,12 @@ my $link_cust = sub {
 my %search_hash = ();
 my @extra_sql = ();
 
-my @header = ( '#', 'Service', 'Account' );
-my @fields = ( 'svcnum', 'svc', 'email' );
-my @links = ( $link, $link, $link );
-my $align = 'rll';
-my @color = ( '', '', '' );
-my @style = ( '', '', '' );
+my @header = ( 'Service', 'Account' );
+my @fields = ( 'svc', 'email' );
+my @links = ( $link, $link );
+my $align = 'll';
+my @color = ( '', '' );
+my @style = ( '', '' );
 my @footer = ();
 
 my $conf = new FS::Conf;
@@ -91,13 +91,30 @@ if ( $conf->exists('report-showpasswords') #its a terrible idea
   push @style, '';
 }
 
-#maybe hide the UID if a flag isn't passed... its much less useful these days
-push @header, 'Real Name', 'UID', 'Last Login';
-push @fields, 'finger', 'uid', 'last_login_text';
-push @links, $link, $link, $link;
-$align .= 'llr';
-push @color, '', '', '';
-push @style, '', '', '';
+push @header, 'Real Name';
+push @fields, 'finger';
+push @links, $link;
+$align .= 'l';
+push @color, '';
+push @style, '';
+
+#hide the UID, its much less useful these days
+if ( $cgi->param('show_uid') ) { #XXX add a checkbox
+  push @header, 'UID';
+  push @fields, 'uid';
+  push @links, $link;
+  $align .= 'l';
+  push @color, '';
+  push @style, '';
+}
+
+push @header, 'Last Login';
+push @fields, 'last_login_text';
+push @links, $link;
+$align .= 'r';
+push @color, '';
+push @style, '';
+
 
 for (qw( domain domsvc agentnum custnum popnum svcpart cust_fields )) {
   $search_hash{$_} = $cgi->param($_) if length($cgi->param($_));
@@ -134,7 +151,7 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
     push @color, '';
     push @style, '';
 
-    @footer = ( '', 'Total', '', '', '',
+    @footer = ( 'Total', '', '', '',
                 sub { format_time($tot_time) }, #time
               );
 
@@ -184,6 +201,8 @@ if ( $cgi->param('magic') =~ /^(all|unlinked)$/ ) {
       ;
     }
 
+    push @footer, '', '';
+
   }
 
 } elsif ( $cgi->param('magic') =~ /^nologin$/ ) {