[Rt-commit] r11910 - rt/branches/3.8-TESTING/html/Elements

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sun Apr 27 11:52:32 EDT 2008


Author: sunnavy
Date: Sun Apr 27 11:52:32 2008
New Revision: 11910

Modified:
   rt/branches/3.8-TESTING/html/Elements/SelectTimezone

Log:
previous SelectTimezone is so buggy

Modified: rt/branches/3.8-TESTING/html/Elements/SelectTimezone
==============================================================================
--- rt/branches/3.8-TESTING/html/Elements/SelectTimezone	(original)
+++ rt/branches/3.8-TESTING/html/Elements/SelectTimezone	Sun Apr 27 11:52:32 2008
@@ -46,13 +46,13 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <%ONCE>
-my $HAS_DATETIME_TZ = do { local $@; eval { require DateTime::TimeZone; }; 1 };
+my $HAS_DATETIME_TZ = eval { require DateTime::TimeZone };
 my @names;
 @names = DateTime::TimeZone->all_names if $HAS_DATETIME_TZ;
 </%ONCE>
 % unless ( $HAS_DATETIME_TZ && @names ) {
-<imput type="text" name="<% $Name %>" value="<% $Default %>" />
-% }
+<input type="text" name="<% $Name %>" value="<% $Default %>" />
+% } else {
 <select name="<% $Name %>">
 % if ( $ShowNullOption ) {
 <option value=""><&|/l&>System Default</&></option>
@@ -61,6 +61,7 @@
 <option value="<% $tz %>" <% ($Default||'') eq $tz? 'selected="selected"' :'' |n %> ><% $tz %></option>
 % }
 </select>
+% }
 <%ARGS>
 $ShowNullOption => 1
 $Name => undef


More information about the Rt-commit mailing list