diff --git a/resources/views/js/modals.blade.php b/resources/views/js/modals.blade.php index e592ce2..6a16ad0 100644 --- a/resources/views/js/modals.blade.php +++ b/resources/views/js/modals.blade.php @@ -177,10 +177,30 @@ success: function (data) { console.log('Вход в систему'); let d = JSON.parse(data); - if(typeof d['REDIRECT'] !== "undefined") { - console.log(d['REDIRECT']); - location.href = d['REDIRECT']; + if (typeof d['REDIRECT'] !== "undefined") { + $.fancybox.close(); + + $('#email_worker').val(''); + $('#password_worker').val(''); + $('#password_confirmation_worker').val(''); + $('#politik').prop('checked', false); + $('#telephone_worker').val(''); + $('#job_titles_worker').val('').trigger('change'); + $('#surname_worker').val(''); + $('#name_man_worker').val(''); + $('#surname2_worker').val(''); + $('#cpatchaTextBox1').val(''); + + $('#block-info').hide(); + $('#messages_error_reg').html(''); + + $.fancybox.open({ + src: '#successful-registration', + type: 'inline', + opts: {touch: false} + }); } + if (typeof d['ERROR'] !== "undefined") { console.log(d['ERROR']); $('#block-info').css({'display': 'block'}); @@ -201,6 +221,16 @@ return false; }); + $(document).on('click', '.open-login-modal', function(e) { + e.preventDefault(); + $.fancybox.close(); + $.fancybox.open({ + src: '#sign', + type: 'inline', + opts: {touch: false} + }); + }); + $(document).on('click', '#button_reg_employer', function() { $('#messages_error_reg').html(''); diff --git a/resources/views/modals/register.blade.php b/resources/views/modals/register.blade.php index 4f3239c..9bfd540 100644 --- a/resources/views/modals/register.blade.php +++ b/resources/views/modals/register.blade.php @@ -7,6 +7,9 @@ background-color: #d0d0d0; } + +@include('modals.successful_registration') + diff --git a/resources/views/modals/successful_registration.blade.php b/resources/views/modals/successful_registration.blade.php new file mode 100644 index 0000000..35ce9cb --- /dev/null +++ b/resources/views/modals/successful_registration.blade.php @@ -0,0 +1,7 @@ +