43 lines
2.9 KiB
PHP
43 lines
2.9 KiB
PHP
<div class="modal fade" id="registerModal" tabindex="-1" role="dialog" aria-hidden="true" style="display: none;">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title">Регистрация</h4>
|
|
</div>
|
|
<form method="post" action="/index/register/">
|
|
<div class="modal-body" style="padding-bottom: 0;">
|
|
<?php if (isset($_SESSION['register_error']) && $_SESSION['register_error']): ?>
|
|
<div class="alert alert-danger"><?= htmlspecialchars($_SESSION['register_error']) ?></div>
|
|
<?php unset($_SESSION['register_error']); ?>
|
|
<?php endif; ?>
|
|
<?php if (isset($_SESSION['register_success']) && $_SESSION['register_success']): ?>
|
|
<div class="alert alert-success"><?= htmlspecialchars($_SESSION['register_success']) ?></div>
|
|
<?php unset($_SESSION['register_success']); ?>
|
|
<?php endif; ?>
|
|
<div class="form-group">
|
|
<label for="regEmail">Email</label>
|
|
<input type="email" class="form-control" id="regEmail" name="email" placeholder="email@example.com" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="regNick">Имя (ник)</label>
|
|
<input type="text" class="form-control" id="regNick" name="nick" placeholder="Ваше имя" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="regPassword">Пароль</label>
|
|
<input type="password" class="form-control" id="regPassword" name="password" placeholder="Минимум 6 символов" minlength="6" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="regPassword2">Повторите пароль</label>
|
|
<input type="password" class="form-control" id="regPassword2" name="password2" placeholder="Повторите пароль" minlength="6" required>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-success">Зарегистрироваться</button>
|
|
<button type="button" class="btn btn-link" onclick="$('#registerModal').modal('hide');$('#loginModal').modal('show');">Уже есть аккаунт? Войти</button>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Отмена</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|