<?php $this->headMeta('noindex', 'robots'); ?>
<div class="clearfix user-template">
<div class="page-header page-header-activate">
    <h1><?php _e('Congratulations, and welcome !'); ?></h1>
</div>
<?php if (!empty($result['status'])) { ?>
    <p><strong><?php _e('Welcome in our community !'); ?></strong></p>
    <p><?php _e('Your account has been confirmed and is now active : you can log in... and contribute !'); ?></p>
    <p><a class="btn btn-primary" href="<?php echo Pi::service('authentication')->getUrl('login', $redirect); ?>">
            <?php _e('Login right now.'); ?>
        </a>
    </p>
    <?php
    if ($redirect) {
        echo '<p>' . sprintf(
                __('Or go back to <a href="%s">the requested page</a> directly.'),
                $redirect
            ) . '</p>';
    }
    ?>
<?php } else { ?>
    <p><?php _e('Sorry, account activation is failed.'); ?></p>
    <p>
        <a href="<?php echo $this->url('', ['controller' => 'register', 'action' => 'resend.activation']); ?>"><?php _e('Resend activation email.'); ?></a>
    </p>
<?php } ?>
</div>
