From 1960447a45471ffe1886b2c0783acfee0bab9bbb Mon Sep 17 00:00:00 2001 From: touffies Date: Wed, 16 Oct 2013 12:47:02 +0200 Subject: [PATCH] Remove method renderFormFieldCheckBox --- .../Core/Template/Smarty/Plugins/Form.php | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) 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); - } }