Remove method renderFormFieldCheckBox
This commit is contained in:
@@ -117,11 +117,7 @@ class Form extends AbstractSmartyPlugin
|
|||||||
$template->assign("name", $fieldName);
|
$template->assign("name", $fieldName);
|
||||||
|
|
||||||
$template->assign("value", $fieldValue);
|
$template->assign("value", $fieldValue);
|
||||||
|
$template->assign("checked", isset($fieldVars['checked']) ? $fieldVars['checked'] : false);
|
||||||
// If Checkbox input type
|
|
||||||
if ($fieldVars['checked'] !== null) {
|
|
||||||
$this->renderFormFieldCheckBox($template, $formFieldView['checked']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$template->assign("label", $fieldVars["label"]);
|
$template->assign("label", $fieldVars["label"]);
|
||||||
$template->assign("label_attr", $fieldVars["label_attr"]);
|
$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")
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user