diff options
Diffstat (limited to 'rt/webrt/Elements/SelectMatch')
-rw-r--r-- | rt/webrt/Elements/SelectMatch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/rt/webrt/Elements/SelectMatch b/rt/webrt/Elements/SelectMatch new file mode 100644 index 000000000..7f3a94fae --- /dev/null +++ b/rt/webrt/Elements/SelectMatch @@ -0,0 +1,31 @@ +%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectMatch,v 1.1 2002-08-12 06:17:08 ivan Exp $ +<SELECT NAME ="<%$Name%>"> +<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION> +<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION> +<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION> +<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION> +</SELECT> + +<%ARGS> +$Name => undef +$Like => 'contains' +$NotLike => "doesn't contain" +$True => 'is' +$False => "isn't" +$Default => undef +</%ARGS> +<%INIT> +my ($TrueDefault, $FalseDefault, $LikeDefault, $NotLikeDefault); +if ($Default && $Default !~ /true/i) { + $FalseDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /false/i) { + $TrueDefault = "SELECTED"; +} +elsif ($Default && $Default !~ /notlike/i) { + $NotLikeDefault = "SELECTED"; +} +else { + $LikeDefault = "SELECTED"; +} +</%INIT> |