% # vim:set sw=4 ts=4 sts=4 ft=html.epl expandtab:
% my @delays = split(',', $self->config('proposed_delays'));
% for my $delay (@delays) {
%   my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d->{'delay_'.$delay};
%   if (config('max_delay')) {
%       if ($delay) {
%           if ($delay < config('max_delay')) {
                <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%           } elsif ($delay == config('max_delay')) {
                <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%               last;
%           } else {
%               my $text = ($delay == 1) ? l('24 hours') : l('%1 days', $delay);
                <option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>
%               last;
%           }
%       }
%   } else {
        <option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>
%   }
% }
