diff --git a/frontend/views/event/_objects.php b/frontend/views/event/_objects.php index 3ebbc54..20ae70b 100644 --- a/frontend/views/event/_objects.php +++ b/frontend/views/event/_objects.php @@ -29,7 +29,7 @@ use yii\helpers\Url; - Заказать консультацию + Заказать консультацию diff --git a/frontend/views/layouts/main.php b/frontend/views/layouts/main.php index 619470d..27fe267 100755 --- a/frontend/views/layouts/main.php +++ b/frontend/views/layouts/main.php @@ -151,7 +151,8 @@ AppAsset::register($this); render('/modal/forgot_password_form_model_window') ?> - + +render('/modal/consultation_modal') ?>
diff --git a/frontend/views/modal/call_me.php b/frontend/views/modal/call_me.php deleted file mode 100755 index 2f98940..0000000 --- a/frontend/views/modal/call_me.php +++ /dev/null @@ -1,12 +0,0 @@ -
- - - -
\ No newline at end of file diff --git a/frontend/views/modal/consultation_modal.php b/frontend/views/modal/consultation_modal.php new file mode 100755 index 0000000..85b8633 --- /dev/null +++ b/frontend/views/modal/consultation_modal.php @@ -0,0 +1,19 @@ + +
+ +
\ No newline at end of file diff --git a/frontend/views/service/_objects.php b/frontend/views/service/_objects.php index 282e3ee..d9a48cb 100644 --- a/frontend/views/service/_objects.php +++ b/frontend/views/service/_objects.php @@ -26,7 +26,7 @@ use yii\helpers\Url; - Заказать консультацию + Заказать консультацию diff --git a/frontend/web/css/concat_all.css b/frontend/web/css/concat_all.css index 132890b..77e84a6 100755 --- a/frontend/web/css/concat_all.css +++ b/frontend/web/css/concat_all.css @@ -1945,6 +1945,122 @@ span.red { padding: 8px 38px; } +/* consultation window */ + +.consultation_modal { + color: #333333; + width: 100%; + background: rgba(0, 0, 0, 0.4); + position: absolute; + z-index: 4; + top: 0; + left: 0; + display: none; +} + +.consultation_modal .modal_window { + text-align: right; + height: 247px; + width: 459px; + background-color: #fff; + padding: 20px; + position: relative; + margin-left:auto; + margin-right:auto; + margin-top: 35px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: hidden; + z-index:999; +} + +.consultation_modal .modal_window .title { + font-size: 18px; + font-weight: bold; + padding-top: 29px; + padding-bottom: 27px; + text-transform: uppercase; + text-align: center; +} + +.consultation_modal .modal_window input { + padding: 8px; + width: 251px; + margin-right: 56px; + margin-left: 11px; + border: 1px solid #C6C7C9; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.consultation_modal .modal_window .my_cust_btn { + font-size: 13px; + padding: 8px 31px; + color: white; + border: none; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: #6aa034; + -webkit-box-shadow: 0 2px #517a27; + box-shadow: 0 2px #517a27; +} + +.consultation_modal .modal_window .my_cust_btn:hover { + background-color: #5d8d2e; +} + +.consultation_modal .modal_window .my_cust_btn:active { + position: relative; + -webkit-box-shadow: none; + box-shadow: none; + top: 2px; +} + +.consultation_modal .modal_window .title { + padding-right: 8px; +} + +.consultation_modal .modal_window label { + display: block; + font-size: 13px; + width: 459px; + margin: auto; + margin-bottom: 8px; +} + +.consultation_modal .modal_window label input { + margin-right: 68px; +} + +.consultation_modal .modal_window .pass_links { + text-align: center; + padding-left: 55px; + font-size: 13px; + margin-top: 11px; +} + +.consultation_modal .modal_window .pass_links a { + padding-left: 47px; +} + +.consultation_modal .modal_window .pass_links label { + display: inline; +} + +.consultation_modal .modal_window .pass_links .remember_pas { + color: #6aa034; + text-decoration: underline; +} + +.consultation_modal .modal_window .for_btn_position { + text-align: center; + margin-top: 23px; +} + +.consultation_modal .modal_window .for_btn_position .my_cust_btn { + padding: 8px 38px; +} + /* forgot password window */ .forgot_pass_modal_wrapper { @@ -3161,6 +3277,14 @@ span.red { color: #D75C5C; } +.consultation_modal .modal_window label.error { + margin-left: 127px; + width: 265px; + text-align: left; + color: #D75C5C; +} + + .forgot_password_form label.error { margin-left: 141px; width: 265px; diff --git a/frontend/web/css/concat_all_back.css b/frontend/web/css/concat_all_back.css index b359e28..17ec0a1 100755 --- a/frontend/web/css/concat_all_back.css +++ b/frontend/web/css/concat_all_back.css @@ -1934,6 +1934,122 @@ span.red { padding: 8px 38px; } +/* login window */ + +.consultation_modal { + color: #333333; + width: 100%; + background: rgba(0, 0, 0, 0.4); + position: absolute; + z-index: 4; + top: 0; + left: 0; + display: none; +} + +.consultation_modal .modal_window { + text-align: right; + height: 247px; + width: 459px; + background-color: #fff; + padding: 20px; + position: relative; + margin-left:auto; + margin-right:auto; + margin-top: 35px; + -webkit-border-radius: 2px; + border-radius: 2px; + overflow: hidden; + z-index:999; +} + +.consultation_modal .modal_window .title { + font-size: 18px; + font-weight: bold; + padding-top: 29px; + padding-bottom: 27px; + text-transform: uppercase; + text-align: center; +} + +.consultation_modal .modal_window input { + padding: 8px; + width: 251px; + margin-right: 56px; + margin-left: 11px; + border: 1px solid #C6C7C9; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +.consultation_modal .modal_window .my_cust_btn { + font-size: 13px; + padding: 8px 31px; + color: white; + border: none; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: #6aa034; + -webkit-box-shadow: 0 2px #517a27; + box-shadow: 0 2px #517a27; +} + +.consultation_modal .modal_window .my_cust_btn:hover { + background-color: #5d8d2e; +} + +.consultation_modal .modal_window .my_cust_btn:active { + position: relative; + -webkit-box-shadow: none; + box-shadow: none; + top: 2px; +} + +.consultation_modal .modal_window .title { + padding-right: 8px; +} + +.consultation_modal .modal_window label { + display: block; + font-size: 13px; + width: 459px; + margin: auto; + margin-bottom: 8px; +} + +.consultation_modal .modal_window label input { + margin-right: 68px; +} + +.consultation_modal .modal_window .pass_links { + text-align: center; + padding-left: 55px; + font-size: 13px; + margin-top: 11px; +} + +.consultation_modal .modal_window .pass_links a { + padding-left: 47px; +} + +.consultation_modal .modal_window .pass_links label { + display: inline; +} + +.consultation_modal .modal_window .pass_links .remember_pas { + color: #6aa034; + text-decoration: underline; +} + +.consultation_modal .modal_window .for_btn_position { + text-align: center; + margin-top: 23px; +} + +.consultation_modal .modal_window .for_btn_position .my_cust_btn { + padding: 8px 38px; +} + /* forgot password window */ .forgot_pass_modal_wrapper { @@ -2965,6 +3081,13 @@ span.red { color: #D75C5C; } +.consultation_modal .modal_window label.error { + margin-left: 127px; + width: 265px; + text-align: left; + color: #D75C5C; +} + .forgot_password_form label.error { margin-left: 141px; width: 265px; diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index e8c38bd..d90f3c4 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -1054,6 +1054,14 @@ input.error_pass{ width: 100%!important; height: 100%!important; } + +.modal_registration_form, .modal_wrapper_login, .forgot_pass_modal_wrapper, .forgot_pass_success_wrapper, .callback_wrapper, .consultation_modal{ + display: block; + position: fixed!important; + width: 100%!important; + height: 100%!important; +} + .please_phone{ position: absolute; border: 1px solid grey; diff --git a/frontend/web/js/my_scripts.js b/frontend/web/js/my_scripts.js index a739365..e75e793 100755 --- a/frontend/web/js/my_scripts.js +++ b/frontend/web/js/my_scripts.js @@ -139,6 +139,9 @@ $(document).ready(function(){ forget_pass_again_btn = $('.forgot_pass_success_wrapper').find('.my_cust_btn'), log_open_btn = $('.login_button_lu'), // окно логина reg_open_btn = $('.reg_button_lu'), // кнопка открыть + consultation_open_btn = $('.consultation_btn'), // кнопка консультации + consultation_btn = $('.consultation_btn'), + consultation_modal = $('.consultation_modal'), modal_busket_open = $('.basket_add_but, .cart_btn'), // открыть модалку корзины modal_busket_header_open = $('i.head-down.bh_cell'), // открыть корзину в хедере modal_busket_header = $('.busket_modal_header'), // модальная корзина хедер @@ -182,14 +185,44 @@ $(document).ready(function(){ } else{ var num = $(".phone_me_head").find("input").val(); + var type = 'call_me'; - send_call_me_back( num,type, function(data){ + var data = {"num":num,"type":type}; + send_call_me_back( data, function(data){ callback_wrap.fadeIn(200); $(".phone_me_head").find("input").val(''); }); } }); + + + consultation_btn.click(function(){ // открываем окно регистрации + $(".error").removeClass("error"); + $(".error_pass").removeClass("error_pass"); + if($(".consultation_phone").val().length == 0){ + $(".consultation_phone").addClass("error"); + } + else{ + var num = $(".consultation_phone").val(); + var name = $(".consultation_name").val(); + var type = 'consultation'; + var data = {"num":num,"name":name,"type":type}; + send_call_me_back( data, function(data){ + consultation_modal.fadeIn(200); + $(".consultation_phone").find("input").val(''); + $(".consultation_name").find("input").val(''); + }); + + } + }); + + + consultation_open_btn.click(function(event){ + event.preventDefault(); + consultation_modal.toggle(); + + }); modal_busket_header_cont.click(function(){ // скрываем модальную корзину в хедере по ссылке modal_busket_header.toggle(); modal_busket_header_open.toggleClass('bh_cell_2'); // меняем класс у кнопочки вызова корзины хедера @@ -270,6 +303,7 @@ $(document).ready(function(){ forgot_pass_success_wrap.fadeOut(200); busket_modal_wrapper.fadeOut(200); callback_wrap.fadeOut(200); + consultation_modal.fadeOut(200); }); $(".close_modal").click(function(){ reg_wrap.fadeOut(200); @@ -467,15 +501,11 @@ $(document).ready(function(){ //=============================================== BUSKET MODAL WINDOW FUNCTIONS - function send_call_me_back( num, type,callback ) + function send_call_me_back( data,callback ) { $.ajax({ url: '/site/mail', - data : - { - 'num' : num, - 'type' : type - }, + data : data, type : 'POST', dataType: 'json', success: function (data) -- libgit2 0.21.4