From 2c47e8cf720b9c05912dbbb171c7f1cc3a4c762f Mon Sep 17 00:00:00 2001 From: touffies Date: Wed, 16 Oct 2013 10:36:04 +0200 Subject: [PATCH] Allow smarty to pass the required value --- core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php index 6eb1cf7bc..1166b2033 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php @@ -126,6 +126,8 @@ class Form extends AbstractSmartyPlugin $template->assign("label", $fieldVars["label"]); $template->assign("label_attr", $fieldVars["label_attr"]); + $template->assign('required', isset($fieldVars['required']) ? $fieldVars['required'] : false); + $errors = $fieldVars["errors"]; $template->assign("error", empty($errors) ? false : true);