summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/checkbox-foot.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-11-17 17:00:06 -0800
committerIvan Kohler <ivan@freeside.biz>2015-11-17 17:00:06 -0800
commitf32ac83068c6211f829f1688a1a9cdec71bc6ec7 (patch)
treea6b6866f50a90fc7716861b4884ec4ffeb5ce535 /httemplate/search/elements/checkbox-foot.html
parent2c112f32561f23f9c538ace00db46659ce16da32 (diff)
parentc0886229d19cfa798580fbeb342826fd11ceeeb0 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/search/elements/checkbox-foot.html')
-rw-r--r--httemplate/search/elements/checkbox-foot.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/httemplate/search/elements/checkbox-foot.html b/httemplate/search/elements/checkbox-foot.html
index c47009425..ae8b79470 100644
--- a/httemplate/search/elements/checkbox-foot.html
+++ b/httemplate/search/elements/checkbox-foot.html
@@ -11,6 +11,7 @@
},
],
filter => '.name = "pkgpart"', # see below
+ minboxes => 2, #will remove checkboxes if there aren't at least this many
),
&>
@@ -67,6 +68,14 @@ for (var i = 0; i < inputs.length; i++) {
}
}
%# avoid the need for "$areboxes" late-evaluation hackery
+% if ($opt{'minboxes'}) {
+if ( checkboxes.length < <% $opt{'minboxes'} %> ) {
+ for (i = 0; i < checkboxes.length; i++) {
+ checkboxes[i].parentNode.removeChild(checkboxes[i]);
+ }
+ checkboxes = [];
+}
+% }
if ( checkboxes.length == 0 ) {
document.getElementById('checkbox_footer').style.display = 'none';
}