From b9bfd285a54a5bf00726e2957d79c21c575cd352 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 22 Jul 2010 13:09:33 +0000 Subject: [PATCH] fixed not working checkboxes after r31472 --- etemplate/inc/class.etemplate.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 18291bed0e..9a433c7005 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -2248,12 +2248,12 @@ class etemplate extends boetemplate self::set_array($content,$form_name,$value); break; case 'checkbox': - if (!$value) + if (!$value && $attr['needed']) + { + self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),''); + } + if ($value === false) { - if ($attr['needed']) - { - self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),''); - } self::set_array($content,$form_name,$attr['multiple'] ? array() : $attr['unset_value']); // need to be reported too } else