Skip to content

Commit

Permalink
fix: allow password policy feature working on new-password page
Browse files Browse the repository at this point in the history
  • Loading branch information
Oksydan committed Jun 8, 2024
1 parent 6bd72eb commit 0048788
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions templates/customer/password-new.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,36 @@
</div>
{/if}

{$fields = []}

{$fields[] = [
'name' => 'passwd',
'type' => 'password',
'errors' => [],
'required' => true,
'label' => {l s='New password' d='Shop.Forms.Labels'}
]}

{$fields[] = [
'name' => 'confirmation',
'type' => 'password',
'errors' => [],
'required' => true,
'label' => {l s='Confirmation' d='Shop.Forms.Labels'}
]}

<p>
{l
s='Email address: %email%'
d='Shop.Theme.Customeraccount'
sprintf=['%email%' => $customer_email|stripslashes]}
</p>

<div class="mb-3">
<label class="form-control-label">{l s='New password' d='Shop.Forms.Labels'}</label>
<input class="form-control" type="password" data-validate="isPasswd" name="passwd" value="">
</div>

<div class="mb-3">
<label class="form-control-label">{l s='Confirmation' d='Shop.Forms.Labels'}</label>
<input class="form-control" type="password" data-validate="isPasswd" name="confirmation" value="">
</div>
{foreach $fields as $field}
<div class="field-password-policy">
{form_field field=$field}
</div>
{/foreach}

<input type="hidden" name="token" id="token" value="{$customer_token}">
<input type="hidden" name="id_customer" id="id_customer" value="{$id_customer}">
Expand Down

0 comments on commit 0048788

Please sign in to comment.