{extends file="simple-layout.tpl"}

{* -- We do not check admin login on this page *}
{block name="check-auth"}{/block}

{block name="page-title"}{intl l='Request a new password'}{/block}

{block name="main-title"}{intl l='Request a new password'}{/block}

{block name="main-content"}

    <div class="col-md-offset-3 col-md-6">
        {form name="thelia.admin.createpassword"}
        <form action="{url path='/admin/password-created'}" method="post" {form_enctype}>

            <p>Please enter the new password below.</p>

            {if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}

            <fieldset>
                {form_hidden_fields}

                {form_field field='success_url'}
                    <input type="hidden" name="{$name}" value="{url path='/admin/password-create-success'}" />
                {/form_field}

                {form_field field='password'}
                    <div class="form-group {if $error}has-error{/if}">
                        <label for="{$label_attr.for}" class="control-label hidden">{$label} : </label>
                        <div class="input-group">
                            <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                            <input required type="password" id="{$label_attr.for}" name="{$name}" class="form-control input-lg" title="{$label}" {$attr nofilter}>
                        </div>
                    </div>
                {/form_field}

                {form_field field='password_confirm'}
                    <div class="form-group {if $error}has-error{/if}">
                        <label for="{$label_attr.for}" class="control-label hidden">{$label} : </label>
                        <div class="input-group">
                            <span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
                            <input required type="password" id="{$label_attr.for}" name="{$name}" class="form-control input-lg" title="{$label}" {$attr nofilter}>
                        </div>
                    </div>
                {/form_field}

                <div class="btn-group btn-group-justified">
                    <div class="btn-group">
                        <a href="{url path='/admin/login'}" class="btn btn-link"><span class="hidden-xs glyphicon glyphicon-arrow-left"></span> {intl l='Back'}</a>
                    </div>

                    <div class="btn-group">
                        <button type="submit" class="btn btn-primary btn-lg"><span class="hidden-xs glyphicon glyphicon-cog"></span> {intl l='Update password'}</button>
                    </div>
                </div>
            </fieldset>
        </form>
        {/form}
    </div>
{/block}