diff --git a/static/js/apis/access.js b/static/js/apis/access.js index bbafc7d..f511241 100755 --- a/static/js/apis/access.js +++ b/static/js/apis/access.js @@ -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/', @@ -120,6 +128,7 @@ function registry_go(){ console.log('Возникла ошибка registry_go(): ' + str); } }); + } } function registry_go2(){ diff --git a/static/js/apis/activation.js b/static/js/apis/activation.js index 6edb105..cafe099 100755 --- a/static/js/apis/activation.js +++ b/static/js/apis/activation.js @@ -28,20 +28,27 @@ function sent_step(step){ return result; } function check_step(step){ - // Проверка данных этапа - > Отправка данных - var result = sent_step(step); - if (result[0]){ - if (step==3){ - final_button() - } - close_step(step); - enable_step(step+1); + if ($('#checkBox').prop('checked') != true){ + console.log('NOT PASS') + $('[name="error"]').html('Перед регистрацией ознакомтесь с договором-оферты'); + $('#error_registration').fadeIn('fast'); + } else { - visible_error(step, result[1]['inputs'], result[1]['message']) + // Проверка данных этапа - > Отправка данных + var result = sent_step(step); + if (result[0]){ + if (step==3){ + final_button() + } + close_step(step); + enable_step(step+1); + } else { + visible_error(step, result[1]['inputs'], result[1]['message']) + } + // Если все верно - > Переход на новый уровень + // Если нет - > Подсвечивание полей + //console.log('Получил запрос этапа '+step) } - // Если все верно - > Переход на новый уровень - // Если нет - > Подсвечивание полей - //console.log('Получил запрос этапа '+step) } function enable_step(step){ // Активация этапа diff --git a/templates/activation.html b/templates/activation.html index 0cd3bc5..b29db2d 100755 --- a/templates/activation.html +++ b/templates/activation.html @@ -301,7 +301,10 @@ - Регистрируясь, вы соглашаетесь с договором-оферты +
{% now "Y" %}
{{ NAME }}
diff --git a/templates/no_auth_modals.html b/templates/no_auth_modals.html
index aca2443..d6375b1 100755
--- a/templates/no_auth_modals.html
+++ b/templates/no_auth_modals.html
@@ -18,7 +18,10 @@
- Регистрируясь, вы соглашаетесь с договором-оферты
+