From 6f6cd6b1ede633a7db06b5e40919eb1cc4279713 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 6 Sep 2011 23:44:39 -0400 Subject: Differentiate between when we want checkboxes to be booleans, or bit arrays. For the booleans, we use a hidden input to send false back if they aren't selected. * Template.class.php: rename inputBool() to inputBoolArray(), create new inputBool() * index.html.php: use a hidden input to send false when an checkbox isn't selected. * individual.html.php: add inputBool() function, use $t->inputBoolArray() in inputArray() --- src/views/pages/users/index.html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/views/pages/users/index.html.php') diff --git a/src/views/pages/users/index.html.php b/src/views/pages/users/index.html.php index c268c87..ade4dea 100644 --- a/src/views/pages/users/index.html.php +++ b/src/views/pages/users/index.html.php @@ -23,6 +23,8 @@ foreach ($users as $user) { $t->openTag('tr'); foreach ($attribs as $attrib) { + $t->openTag('td'); + $props = $user[$attrib['key']]; $value = $props['value']; @@ -36,6 +38,7 @@ foreach ($users as $user) { if ($bool) $arr['disabled'] = $disabled; } if ($bool) { + $t->tag('input', array('type'=>'hidden', 'name'=>$post_key, 'value'=>'false')); if ($value==true) { $arr['checked'] = 'checked'; } @@ -46,7 +49,6 @@ foreach ($users as $user) { $arr['type'] = 'text'; } - $t->openTag('td'); $t->tag('input', $arr); $t->closeTag('td'); } -- cgit v1.2.3-2-g168b