summaryrefslogtreecommitdiff
path: root/httemplate/elements/select-months.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-10-23 16:17:51 -0700
committerIvan Kohler <ivan@freeside.biz>2015-10-23 16:17:51 -0700
commit80c2d997c5c983344c530ecbb46f94f1c299b35f (patch)
tree28bafc1d55836acb5455e6554941c06f0912ef98 /httemplate/elements/select-months.html
parent3b1a5e8789d76f0581079d07190664f57bd773a3 (diff)
parent0806f9fdbf2086671c151b3bcb078dc008e96f6c (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements/select-months.html')
-rw-r--r--httemplate/elements/select-months.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/httemplate/elements/select-months.html b/httemplate/elements/select-months.html
new file mode 100644
index 000000000..1cd72fcba
--- /dev/null
+++ b/httemplate/elements/select-months.html
@@ -0,0 +1,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 &>