<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>.',
                Pi::service('user')->getUrl('password')
            ); ?></p>
    <?php }
} else { ?>
    <p><?php _e('Congratulations!'); ?></p>
    <p><?php _e('Your new password has worked'); ?></p>
    <p><?php echo sprintf(
            '<a href="%s">' . __('Please login') . '</a>.',
            Pi::service('authentication')->getUrl('login', '')
        ); ?></p>
<?php } ?>