Логика работы галочки

remotes/origin/pm_task_31703
Mikhail Bortnikov 9 years ago
parent 24721e78d2
commit 9e68f87240
  1. 9
      static/js/apis/access.js
  2. 7
      static/js/apis/activation.js
  3. 3
      templates/activation.html
  4. 3
      templates/no_auth_modals.html

@ -95,9 +95,17 @@ function forgot(){
})
}
function registry_go(){
if ($('#checkBox').prop('checked') != true){
console.log('NOT PASS')
$('#error_registration').html('Перед регистрацией ознакомтесь с договором-оферты');
$('#error_registration').fadeIn('fast');
} else {
console.log('PASS')
$('#error_registration').html('');
$('#error_registration').fadeIn('fast');
var theForm = $(document.forms['registration_form']).serialize();
console.log(theForm)
$.ajax({
type: 'POST',
url: '/access/registration/',
@ -121,6 +129,7 @@ function registry_go(){
}
});
}
}
function registry_go2(){
$('#error_registration2').html('');

@ -28,6 +28,12 @@ function sent_step(step){
return result;
}
function check_step(step){
if ($('#checkBox').prop('checked') != true){
console.log('NOT PASS')
$('[name="error"]').html('Перед регистрацией ознакомтесь с договором-оферты');
$('#error_registration').fadeIn('fast');
} else {
// Проверка данных этапа - > Отправка данных
var result = sent_step(step);
if (result[0]){
@ -43,6 +49,7 @@ function check_step(step){
// Если нет - > Подсвечивание полей
//console.log('Получил запрос этапа '+step)
}
}
function enable_step(step){
// Активация этапа
$('li[step_number='+step+']').css('display', 'block');

@ -301,7 +301,10 @@
</li>
</ul>
<div style="width: 570px; margin: auto;">
<input id="checkBox" type="checkbox" style="width: 20px; height: 20px; margin-top: 0px;">
<span>Регистрируясь, вы соглашаетесь с <a href="/oferta">договором-оферты</a></span>
</div>
<p style="text-align: left;margin: 20px auto;width: 530px;">
<i class="glyphicon glyphicon-copyright-mark"></i> {% now "Y" %}
<span style="float: right;">{{ NAME }}</span>

@ -18,7 +18,10 @@
<input class="padd_bottom" type="password" placeholder="Введите пароль" name="password1" style="box-sizing: border-box;"><br>
<input class="padd_bottom" type="password" placeholder="Подтвердите пароль" name="password2" style="box-sizing: border-box;"><br>
<button class="btn btn-warning btn-lg" onclick="registry_go()" style="box-sizing: border-box;">Зарегистрироваться</button>
<div>
<input id="checkBox" type="checkbox" style="float: left; width: 20px; height: 20px; margin-right: 10px; margin-top: 0px;">
<span>Регистрируясь, вы соглашаетесь с <a href="/oferta">договором-оферты</a></span>
</div>
</form>
<a href="#" data-toggle="modal" data-target="#myModal1" data-dismiss="modal" aria-label="Close" class="wht js-open-modal">Я уже зарегистрирован</a>

Loading…
Cancel
Save