62 lines
1.9 KiB
PHTML
62 lines
1.9 KiB
PHTML
<?php
|
|
$this->assets->setSubTitle('registration form');
|
|
?>
|
|
|
|
<?php if (isset($this->context->transport->message) and $this->context->transport->success): ?>
|
|
<?php $this->renderExternal('message') ?>
|
|
<?php else: ?>
|
|
<?php
|
|
$this->assets->addStylesheet('auth.css');
|
|
?>
|
|
|
|
<form
|
|
action="<?= \Chibi\Router::linkTo(['UserController', 'registrationAction']) ?>"
|
|
class="auth register"
|
|
method="post">
|
|
|
|
<p>Registered users can view more content,<br/>upload files and add posts to favorites.</p>
|
|
|
|
<?php
|
|
$context = new StdClass;
|
|
$context->name = 'name';
|
|
$context->label = 'User name';
|
|
$context->value = htmlspecialchars(InputHelper::get('name'));
|
|
$context->placeholder = 'e.g. darth_vader';
|
|
$context->noAutocomplete = true;
|
|
$this->renderExternal('input-text', $context);
|
|
|
|
$context = new StdClass;
|
|
$context->name = 'password1';
|
|
$context->label = 'Password';
|
|
$context->value = htmlspecialchars(InputHelper::get('password1'));
|
|
$context->placeholder = 'e.g. ' . str_repeat('●', 8);
|
|
$context->noAutocomplete = true;
|
|
$this->renderExternal('input-password', $context);
|
|
|
|
$context->name = 'password2';
|
|
$context->label = 'Password (repeat)';
|
|
$context->value = htmlspecialchars(InputHelper::get('password2'));
|
|
$this->renderExternal('input-password', $context);
|
|
|
|
$context = new StdClass;
|
|
$context->name = 'email';
|
|
$context->label = 'E-mail address';
|
|
$context->value = htmlspecialchars(InputHelper::get('email'));
|
|
$context->placeholder = 'e.g. vader@empire.gov';
|
|
$context->noAutocomplete = true;
|
|
$this->renderExternal('input-text', $context);
|
|
?>
|
|
|
|
<p id="email-info">
|
|
Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/>
|
|
Leave blank for random Gravatar.
|
|
</p>
|
|
|
|
<?php $this->renderExternal('message') ?>
|
|
|
|
<div class="form-row">
|
|
<label></label>
|
|
<button class="submit" type="submit">Register</button>
|
|
</div>
|
|
</form>
|
|
<?php endif ?>
|