<?php
$this->jquery();
$this->js($this->assetModule('front/pwstrength-bootstrap.min.js', 'user'), array('defer' => 'defer'));
$this->js($this->assetModule('front/pwstrength-boostrap.init.js', 'user'), array('defer' => 'defer'));
?>
<?php $this->headMeta('noindex', 'robots'); ?>
    <h1 class="page-header"><?php _e('Reset Password'); ?></h1>
<?php if (empty($result['status'])) {
    if (!empty($form)) {
        echo $this->form($form);
    } else { ?>
        <p><?php echo _escape($result['message']); ?></p>
        <p><?php echo sprintf('<a href="%s">' . __('Try to find password again') . '</a>.',
                $this->url('', ['controller' => 'password', 'action' => 'find'])
            ); ?></p>
    <?php }
} else { ?>
    <p><?php _e('Congratulations!'); ?></p>
    <p><?php _e('your password has been reset successfully. You can now login to your account.'); ?></p>
    <p><?php
        echo sprintf('<a class="btn btn-primary" href="%s">' . __('Login') . '</a>.',
            Pi::service('authentication')->getUrl('login', ['redirect' => $result['redirect']])
        ); ?></p>
<?php } ?>
