[Rt-commit] r19214 - rt/3.999/trunk/lib/RT
sartak at bestpractical.com
sartak at bestpractical.com
Wed Apr 15 22:50:53 EDT 2009
Author: sartak
Date: Wed Apr 15 22:50:53 2009
New Revision: 19214
Modified:
rt/3.999/trunk/lib/RT/Config.pm
Log:
Change DateTimeFormat picker to be a dropdown instead of a textbox
Modified: rt/3.999/trunk/lib/RT/Config.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Config.pm (original)
+++ rt/3.999/trunk/lib/RT/Config.pm Wed Apr 15 22:50:53 2009
@@ -276,13 +276,20 @@
},
},
DateTimeFormat => {
- section => 'Locale', #loc
+ section => 'Locale', #loc
overridable => 1,
- widget => '/Widgets/Form/String',
+ widget => '/Widgets/Form/Select',
widget_arguments => {
- description => 'Date format', #loc
- hints =>
-"Use a strftime format string" #loc
+ description => 'Date format', #loc
+ Callback => sub {
+ my $ret = { values => [], values_label => {} };
+ my $now = RT::DateTime->now;
+ for my $name (qw/rfc2822 rfc2616 iso iCal /) {
+ push @{ $ret->{values} }, $name;
+ $ret->{values_label}{$name} = "$name (" . $now->$name . ")";
+ }
+ return $ret;
+ },
},
},
EmailFrequency => {
More information about the Rt-commit
mailing list