Hello!
Give me advice, please. If I want to change auth form, can I do like that:
{{=form.custom.begin}}
<div id="fLogin" class="container" style="padding:0;">
<div class="form-group row">
<div class="col-lg-4">
<label for="auth_user_email">E-mail</label>
{{=form.custom.widget.email}}
</div>
<div class="col-lg-4">
<label for="auth_user_password">Пароль</label>
{{=form.custom.widget.password}}
</div>
<div class="col-lg-4">
<div class="d-inline-flex remember-padding custom-chb">
{{=form.custom.widget.remember_me}}
<label style="margin-left:20px;">Запомнить меня (на 30
дней)</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4">
<input class="good-btn col-sm-12" type="submit" value="Войти"/>
</div>
<div class="col-lg-4">
<button class="good-btn col-sm-12"
onclick="window.location='/stud/user/register?_next=%2Fstud';return
false">Регистрация</button>
</div>
<div class="col-lg-4">
<button class="good-btn col-sm-12"
onclick="window.location='/stud/user/request_reset_password';return
false">Забыли пароль?</button>
</div>
</div>
</div>
{{=form.custom.end}}
{{=form.custom.begin}}
<div id="fRegister" class="container" style="padding:0;display:none;">
<div class="form-group row">
<div class="col-lg-4">
<label>Имя (только кириллица)</label>
{{=form.custom.widget.first_name}}
</div>
<div class="col-lg-4">
<label>Фамилия (только кириллица)</label>
{{=form.custom.widget.last_name}}
</div>
<div class="col-lg-4">
<label>E-mail</label>
{{=form.custom.widget.email}}
</div>
</div>
<div class="form-group row">
<div class="col-lg-4">
<label>Пароль</label>
{{=form.custom.widget.password}}
</div>
<div class="col-lg-4">
<label>Подтвердите пароль</label>
{{=form.custom.widget.password_two}}
</div>
<div class="col-lg-4">
<label> </label>
<input class="good-btn col-sm-12" type="submit"
value="Регистрация"/>
</div>
</div>
</div>
{{=form.custom.end}}
{{=form.custom.begin}}
...
{{=form.custom.end}}
{{=form.custom.begin}}
...
{{=form.custom.end}}
{{block page_js}}
<script>
{{if request.args(0)=='register':}}
$('#fLogin').hide();
$('#fLostPassword').hide();
$('#fResetPassword').hide();
$('#fRegister').show();
{{elif request.args(0)=='reset_password':}}
$('#fLogin').hide();
$('#fLostPassword').hide();
$('#fRegister').hide();
$('#fResetPassword').show();
{{elif request.args(0)=='request_reset_password':}}
$('#fLogin').hide();
$('#fRegister').hide();
$('#fResetPassword').hide();
$('#fLostPassword').show();
{{else:}}
$('#fLostPassword').hide();
$('#fRegister').hide();
$('#fResetPassword').hide();
$('#fLogin').show();
{{pass}}
</script>
{{end page_js}}
Thanks!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.