* Add enclair_db option to UserDB.pm. Allows logging of enclair password
[interchange.git] / code / Filter / filter_select.filter
1 # Copyright 2005-2007 Interchange Development Group and others
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.  See the LICENSE file for details.
7
8 # $Id: filter_select.filter,v 1.3 2007-03-30 23:40:44 pajamian Exp $
9
10 CodeDef calculated Filter
11 CodeDef calculated Alias filter_select
12 CodeDef filter_select Filter
13 CodeDef filter_select Description Auto-select filter
14 CodeDef filter_select Visibility private
15 CodeDef filter_select Version $Revision: 1.3 $
16 CodeDef filter_select Routine <<EOR
17 sub {
18         ## This replaces the calculated filter for the survey
19         ## Selects an appropriate filter based on the widget type
20         my $wid = $CGI->{type};
21         if($wid =~ /fillin/) {
22                 return 'nullselect';
23         }
24         elsif($wid =~ /select.*multip/) {
25                 return 'null_to_comma';
26         }
27         elsif ($wid =~ /checkbox/) {
28                 return 'checkbox null_to_comma';
29         }
30         return '';
31 }
32 EOR