[rt-users] RT Time fields in days?

Kenneth Crocker KFCrocker at lbl.gov
Thu Feb 5 15:45:32 EST 2009


Kristian,

	Thanks. I'll give it a try.

Kenn
LBNL

On 2/4/2009 2:46 AM, Kristian Davies wrote:
> Not my code, but in the interest of sharing:
> 
> local/html/Elements/SelectTimeUnits
> 
> %# END BPS TAGGED BLOCK }}}
> % my $selected = 'minutes';
> % $selected = 'hours' if $minutes > 60;
> % $selected = 'days'  if $minutes > 480;
> <select class="TimeUnits" id="<% $Name %>" name="<% $Name %>">
> <option value="minutes" <% (($selected eq
> 'minutes')?'selected="selected"':'') %>><% loc('Minutes') %></option>
> <option value="hours" <% (($selected eq
> 'hours')?'selected="selected"':'') %>><% loc('Hours') %></option>
> <option value="days" <% (($selected eq
> 'days')?'selected="selected"':'') %>><% loc('Days') %></option>
> </select>
> <%INIT>
> $Name .= '-TimeUnits' unless $Name =~ /-TimeUnits$/io;
> </%INIT>
> <%ARGS>
> $Name => ''
> $minutes => ''
> </%ARGS>
> 
> Kristian
> 




More information about the rt-users mailing list