1 2 3 4 5 6 7 8 9 10 11
<%init> my %opt = @_; $opt{id} ||= $opt{field}; # should be the default everywhere my $max = $opt{max} || 36; $opt{options} = [ '', 1 .. $max ]; $opt{labels} = { '' => '', map { $_ => emt('[quant,_1,month]', $_) } 1 .. $max }; </%init> <& select.html, %opt &>