An errorred form is now passed to the Form smarty plugin through the parser context instead of the

session
This commit is contained in:
franck
2013-07-24 17:31:20 +02:00
parent 7498c97f49
commit fabeab1822
13 changed files with 160 additions and 94 deletions

View File

@@ -16,7 +16,7 @@
{form name="thelia.admin.login" success_url="home" error_url="login"}
<form action="{url path='/admin/checklogin'}" method="post" class="well form-inline" {form_enctype form=$form}>
{if isset($message)}<div class="alert alert-error">{$message}</div>{/if}
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
{form_hidden_fields form=$form}

View File

@@ -21,11 +21,12 @@
{/form_field}
{*
customer_creation_error_message is defined in Customer action processor class,
and passed the parser through the ParserContext service.
The form error status and the form error messages are defined in Customer action,
and passed back to the form plugin through the ParserContext.
*}
{if isset($customer_creation_error_message)}<div class="alert alert-error">{$customer_creation_error_message}</div>{/if}
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
{form_hidden_fields form=$form}

View File

@@ -24,11 +24,11 @@
{/form_field}
{*
customer_login_error_message is defined in Customer action processor class,
and passed the parser through the ParserContext service.
The form error status and the form error messages are defined in Customer action,
and passed back to the form plugin through the ParserContext.
*}
{if isset($customer_login_error_message)}<div class="alert alert-error">{$customer_login_error_message}</div>{/if}
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
{form_hidden_fields form=$form}