Add new page to modify the customer password

This commit is contained in:
touffies
2013-10-22 09:27:33 +02:00
parent bba7b9bb76
commit b64dedefc6

View File

@@ -0,0 +1,98 @@
{extends file="layout.tpl"}
{* Body Class *}
{block name="body-class"}page-account-password{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = [['title' => {intl l="Account"}, 'url'=>{url path="/account"}]]}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Change Password"}, 'url'=>{url path="/account/password"}]
]}
{/block}
{block name="main-content"}
{* Used to display the success icon *}
{assign var="isPost" value="{$smarty.post|count}"}
<div class="main">
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">{intl l="Change Password"}</h1>
{form name="thelia.front.customer.password.update"}
<form id="form-register" class="form-horizontal" action="{url path="/account/password"}" method="post" role="form">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/account"}" />
{/form_field}
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<fieldset id="register-info" class="panel panel">
<div class="panel-heading">
{intl l="Login Information"}
</div>
<div class="panel-body">
{form_field form=$form field="password_old"}
<div class="form-group group-password_old {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="password"}
<div class="form-group group-password {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="password_confirm"}
<div class="form-group group-password_confirm {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
</div>
</fieldset>
<div class="form-group group-btn">
<div class="control-btn">
<button type="submit" class="btn btn-register">{intl l="Change Password"}</button>
</div>
</div><!--/.form-group-->
</form>
{/form}
</article>
</div><!-- /.layout -->
{/block}