diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php index 1166b2033..7b45bed3e 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php @@ -117,11 +117,7 @@ class Form extends AbstractSmartyPlugin $template->assign("name", $fieldName); $template->assign("value", $fieldValue); - - // If Checkbox input type - if ($fieldVars['checked'] !== null) { - $this->renderFormFieldCheckBox($template, $formFieldView['checked']); - } + $template->assign("checked", isset($fieldVars['checked']) ? $fieldVars['checked'] : false); $template->assign("label", $fieldVars["label"]); $template->assign("label_attr", $fieldVars["label_attr"]); @@ -311,17 +307,4 @@ $this->assignFieldValues($template, $formFieldView->vars["full_name"], $fieldVar new SmartyPluginDescriptor("block", "form_error", $this, "formError") ); } - - /** - * @param \Smarty_Internal_Template $template - * @param $formFieldView - */ - public function renderFormFieldCheckBox(\Smarty_Internal_Template $template, $isChecked) - { - $template->assign("value", 0); - if ($isChecked) { - $template->assign("value", 1); - } - $template->assign("value", $isChecked); - } }