Subversion Repositories VORC

Rev

Rev 121 | Rev 138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 121 Rev 134
Line 27... Line 27...
27
my $pageTitle = "User Report";
27
my $pageTitle = "User Report";
28
my $prefscookie = "userreport";
28
my $prefscookie = "userreport";
29
our $DBTABLE = 'v_official';
29
our $DBTABLE = 'v_official';
30
my %COLUMNS = (
30
my %COLUMNS = (
31
# colname   =>  [qw(DisplayName       N    type     status)],   status ->  static | default | <blank>
31
# colname   =>  [qw(DisplayName       N    type     status)],   status ->  static | default | <blank>
32
	RCid       => [qw(ID           5    number       )],
32
	RCid         => [qw(ID           5    number       )],
33
	derby_name => [qw(DerbyName   10    text        default )],
33
	derby_name   => [qw(DerbyName   10    text        default )],
34
	email      => [qw(Email       15    text        default )],
34
	email        => [qw(Email       15    text        default )],
35
	real_name  => [qw(FullName    20    text        default )],
35
	real_name    => [qw(FullName    20    text        default )],
36
	pronouns   => [qw(Pronouns    25    text        default )],
36
	pronouns     => [qw(Pronouns    25    text        default )],
37
	tshirt     => [qw(TShirtSize  30    select        default )],
37
	tshirt       => [qw(TShirtSize  30    select        default )],
38
  phone      => [qw(Phone       35    text                )],
38
  phone        => [qw(Phone       35    text                )],
39
	access     => [qw(vOrcAccess  40    select              )],
39
	access       => [qw(vOrcAccess  40    select              )],
40
	MVPid      => [qw(MVPPass     42    select              )],
40
	MVPid        => [qw(MVPPass     42    select              )],
41
	department => [qw(Department  45    select      default )],
41
	department   => [qw(Department  45    select      default )],
-
 
42
	emt_verified => [qw(EMTVerified 46    select       )],
42
	added      => [qw(Added       50    date         )],
43
	added        => [qw(Added       50    date         )],
43
	last_login => [qw(LastLogin   55    date         )]	
44
	last_login   => [qw(LastLogin   55    date         )]	
44
);
45
);
Line 45... Line 46...
45
 
46
 
46
my $ROLE = getAccessLevels;
47
my $ROLE = getAccessLevels;
Line 80... Line 81...
80
  }
81
  }
Line 81... Line 82...
81
  
82
  
82
  return $ROLE->{ max @levels };
83
  return $ROLE->{ max @levels };
Line -... Line 84...
-
 
84
}
-
 
85
 
-
 
86
sub modify_emt_verified {
-
 
87
  my $li = shift // "";
-
 
88
  
-
 
89
  return "" unless exists convertDepartments($li->{"department"})->{EMT};
-
 
90
  
-
 
91
  return $li->{"emt_verified"} ? "True" : "False";
83
}
92
}
84
 
93
 
85
sub filter_department {
94
sub filter_department {
Line 86... Line 95...
86
  my $colName = shift;
95
  my $colName = shift;
Line 145... Line 154...
145
    
154
    
146
    return $FORM{autoload} ? $h->select ({ name=>"filter-MVPid", onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-MVPid" }, [$h->option (), @options]);
155
    return $FORM{autoload} ? $h->select ({ name=>"filter-MVPid", onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-MVPid" }, [$h->option (), @options]);
147
  }
156
  }
Line -... Line 157...
-
 
157
}
-
 
158
 
-
 
159
sub filter_emt_verified {
-
 
160
  my $colName = shift;
-
 
161
  my $filter = shift // "";
-
 
162
  
-
 
163
	if ($filter ne "")	{
-
 
164
		return join " and ", "department like '%EMT%'", $filter eq "True" ? "$colName = 1" : "$colName = 0";
-
 
165
	} else {
-
 
166
    my @options = ("", "True", "False");
-
 
167
    
-
 
168
    @options = map { $FORM{"filter-".$colName} eq $_ ?
-
 
169
                       ( $h->option ({ selected=>[] }, $_) ) :
-
 
170
                       ( $h->option (                  $_) )  } @options;
-
 
171
    
-
 
172
    return $FORM{autoload} ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
-
 
173
  }
-
 
174
}
148
}
175
 
149
 
176
 
Line 150... Line 177...
150
# Ideally, nothing below this comment needs to change
177
# Ideally, nothing below this comment needs to change