82 lines
2.1 KiB
PHTML
82 lines
2.1 KiB
PHTML
<?php
|
|
Assets::setSubTitle('registration form');
|
|
?>
|
|
|
|
<?php if (isset($this->context->transport->message) and $this->context->transport->success): ?>
|
|
<?php \Chibi\View::render('message', $this->context) ?>
|
|
<?php else: ?>
|
|
<?php
|
|
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>
|
|
|
|
<div class="form-row">
|
|
<label for="name">User name:</label>
|
|
<div class="input-wrapper">
|
|
<input
|
|
type="text"
|
|
id="name"
|
|
name="name"
|
|
value="<?= htmlspecialchars(InputHelper::get('name')) ?>"
|
|
placeholder="e.g. darth_vader"
|
|
autocomplete="off"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label for="password1">Password:</label>
|
|
<div class="input-wrapper">
|
|
<input
|
|
type="password"
|
|
id="password1"
|
|
name="password1"
|
|
value="<?= htmlspecialchars(InputHelper::get('password1')) ?>"
|
|
placeholder="e.g. <?= str_repeat('●', 8) ?>"
|
|
autocomplete="off"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label for="password2">Password (repeat):</label>
|
|
<div class="input-wrapper">
|
|
<input
|
|
type="password"
|
|
id="password2"
|
|
name="password2"
|
|
value="<?= htmlspecialchars(InputHelper::get('password2')) ?>"
|
|
placeholder="e.g. <?= str_repeat('●', 8) ?>"
|
|
autocomplete="off"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<label for="email">E-mail address:</label>
|
|
<div class="input-wrapper">
|
|
<input
|
|
type="text"
|
|
id="email"
|
|
name="email"
|
|
value="<?= htmlspecialchars(InputHelper::get('email')) ?>"
|
|
placeholder="e.g. vader@empire.gov" autocomplete="off"/>
|
|
</div>
|
|
</div>
|
|
|
|
<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 \Chibi\View::render('message', $this->context) ?>
|
|
|
|
<div class="form-row">
|
|
<label></label>
|
|
<button class="submit" type="submit">Register</button>
|
|
</div>
|
|
</form>
|
|
<?php endif ?>
|