From 83318ccd2fb6bfa39477454f5f29b85e6898ccb2 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 26 Jun 2013 09:19:32 +0200 Subject: [PATCH] add error variable in form_field block --- core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php index 3c90ec4d8..d1ef26244 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Form.php @@ -91,6 +91,7 @@ class Form implements SmartyPluginInterface $template->assign("name", $form->vars["full_name"]); $template->assign("value", $form->vars["value"]); $template->assign("label", $form->vars["label"]); + $template->assign("error", empty($form->vars["errors"]) ? false : true); $attr = array(); foreach ($form->vars["attr"] as $key => $value) { $attr[] = sprintf('%s="%s"', $key, $value);