Registration popup

parent 4845311e
...@@ -23,16 +23,26 @@ if ($popup) { ...@@ -23,16 +23,26 @@ if ($popup) {
?> ?>
<div class="eauth" id="<?php echo $id; ?>"> <div class="eauth" id="<?php echo $id; ?>">
<p>Войти, используя соцсети:</p> <!--<p>Войти, используя соцсети:</p>-->
<ul class="eauth-list"> <ul class="eauth-list">
<?php <?php foreach ($services as $name => $service) {
foreach ($services as $name => $service) { if($service->id == 'google'){
echo '<li class="eauth-service eauth-service-id-' . $service->id . '">'; $image = '<img src="images/button_g.jpg" height="39" width="186" alt="">';
echo Html::a($service->title, [$action, 'service_eauth' => $name], [ }
'class' => 'eauth-service-link', elseif($service->id == 'vk'){
$image = '<img src="images/button_vk.jpg" height="39" width="186" alt="">';
}
elseif($service->id == 'facebook'){
$image = '<img src="images/button_f.jpg" height="39" width="186" alt="">';
}
//echo '<li class="eauth-service eauth-service-id-' . $service->id . '"><p>';
echo '<li class="eauth-service-id-' . $service->id . '"><p>';
echo Html::a($image, [$action, 'service_eauth' => $name], [
//'class' => 'eauth-service-link',
'data-eauth-service' => $service->id, 'data-eauth-service' => $service->id,
]); ]);
echo '</li>';
echo '</p></li>';
} }
?> ?>
</ul> </ul>
......
...@@ -61,3 +61,6 @@ a.login_form_link, a.login_form_popup_link, a.reg_popup_link, a.reg_form_link { ...@@ -61,3 +61,6 @@ a.login_form_link, a.login_form_popup_link, a.reg_popup_link, a.reg_form_link {
.input_st { .input_st {
margin-bottom: 12px !important; margin-bottom: 12px !important;
} }
.button_social{
margin-top: -10px;
}
\ No newline at end of file
...@@ -100,6 +100,30 @@ $(document).ready(function() { ...@@ -100,6 +100,30 @@ $(document).ready(function() {
$('#sh_reg_form').show(); $('#sh_reg_form').show();
$('#login_form').hide(); $('#login_form').hide();
}); });
$('body').on('click', '.call_form_reg', function(){
link = $(this);
title = 'Регистрация на курс <br>'+link.data('title');
spec_propotion = link.data('spec');
$('.popup__title2').html(title);
if(spec_propotion){
$('.spec_propotition').show();
}
else {
$('.spec_propotition').hide();
}
/*jQuery.ajax({
type: 'POST',
url: "/school/lessons-admin/update-form-document",
data: {'docId': doc},
success: function(data){
jQuery('#doc-upd').append(
data
);
}
});*/
});
}); });
// pre-submit callback // pre-submit callback
......
...@@ -17,8 +17,11 @@ ...@@ -17,8 +17,11 @@
<div class="blip_kurs">За просмотр этих курсов<br> мы заплатим 15 000 руб.</div> <div class="blip_kurs">За просмотр этих курсов<br> мы заплатим 15 000 руб.</div>
<?php endif;?> <?php endif;?>
<div class="kurs_foot clearfix"> <div class="kurs_foot clearfix">
<?php if($model->type == Courses::TYPE_DV && Yii::$app->user->isGuest):?> <?php if($model->type == Courses::TYPE_DV):?>
<a href="#registration_form" class="kurs_bt popup-form">Предварительная регистрация</a> <a href="#registration_form" class="kurs_bt popup-form call_form_reg" data-title="<?php echo $model->title;?>"
data-spec ="<?php echo $model->spec_proposition;?>">
Предварительная регистрация
</a>
<?php else:?> <?php else:?>
<a href="<?php echo Url::toRoute(['/school/course/view', 'id' => $model->id]);?>" class="kurs_bt">Подробнее</a> <a href="<?php echo Url::toRoute(['/school/course/view', 'id' => $model->id]);?>" class="kurs_bt">Подробнее</a>
<?php endif;?> <?php endif;?>
......
<?php <?php
$socButtons = \common\modules\eauth\widgets\SocialWidget::widget(['action' => '/site/login']);
$elements = [ $elements = [
'open_form_login' => '<div class="registration_form_left form_resp">', 'open_form_login' => '<div class="registration_form_left form_resp">',
'errors_login' => '<div class="errors_login_popup"></div>', 'errors_login' => '<div class="errors_login_popup"></div>',
...@@ -12,25 +14,15 @@ $elements = [ ...@@ -12,25 +14,15 @@ $elements = [
</div> </div>
</a>', </a>',
'close_form_login' => '</div>', 'close_form_login' => '</div>',
'soc_buttons' =>'<div class="registration_form_right50 form_resp"> 'soc_block_open' =>'<div class="registration_form_right50 form_resp">
<p>Войти через</p> <p>Войти через</p>
<br> <br>
<div class="button_social"> <div class="button_social">',
<p> 'soc_buttons' => $socButtons,
<a href=""><img src="images/button_g.jpg" height="39" width="186" alt=""></a> 'soc_block_close' =>'</div>
</p>
<p>
<a href=""><img src="images/button_vk.jpg" height="39" width="186" alt=""></a>
</p>
<p>
<a href=""><img src="images/button_f.jpg" height="39" width="186" alt=""></a>
</p>
</div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
<br> <br>
<p>Если у Вас еще нет аккаунта <a href="#registration_form" class="popup-form">Зарегистрируйтесь.</a></p>' <p>Если у Вас еще нет аккаунта <a href="#registration_form" class="popup-form">Зарегистрируйтесь.</a></p>'
]; ];
......
...@@ -38,7 +38,9 @@ $elements = [ ...@@ -38,7 +38,9 @@ $elements = [
<br> <br>
<br> <br>
</div> </div>
<p><strong>Более того, самому активному пользвотелю мы предусмотрели <span class="red_text">приз в размере 15 000 руб</span>. Все что надо, чтобы получить награду, это смотреть ролики и проявлять активность.</strong></p> <div class="spec_propotition">
<p><strong>Более того, самому активному пользователю мы предусмотрели <span class="red_text">приз в размере 15 000 руб</span>. Все что надо, чтобы получить награду, это смотреть ролики и проявлять активность.</strong></p>
</div>
<br> <br>
<br> <br>
<p>Если у Вас уже есть аккаунт <a href="#registration_form2" class="popup-form">Войти</a></p> <p>Если у Вас уже есть аккаунт <a href="#registration_form2" class="popup-form">Войти</a></p>
......
...@@ -162,7 +162,7 @@ return [ ...@@ -162,7 +162,7 @@ return [
'school' => 'school/course/index', 'school' => 'school/course/index',
'school/course/<id>' => 'school/course/view', 'school/course/<id>' => 'school/course/view',
'school/lesson/<id>' => 'school/lesson/view', 'school/lesson/<id>' => 'school/lesson/view',
'login/eauth/<service_eauth:google|facebook|vk|twitter>' => 'site/login', 'login/eauth/<service_eauth:google|vk|facebook>' => 'site/login',
'login' => 'site/login', 'login' => 'site/login',
'logout' => 'site/logout', 'logout' => 'site/logout',
'activate/<code>'=>'users/user/activate', 'activate/<code>'=>'users/user/activate',
...@@ -229,24 +229,24 @@ return [ ...@@ -229,24 +229,24 @@ return [
'clientSecret' => '...', 'clientSecret' => '...',
'title' => 'Google', 'title' => 'Google',
], ],
'facebook' => [
// register your app here: https://developers.facebook.com/apps/
'class' => 'common\modules\eauth\components\FacebookOAuth2Service',
'clientId' => '...',
'clientSecret' => '...',
],
'vk' => [ 'vk' => [
// register your app here: https://vk.com/editapp?act=create&site=1 // register your app here: https://vk.com/editapp?act=create&site=1
'class' => 'common\modules\eauth\components\VkOAuth2Service', 'class' => 'common\modules\eauth\components\VkOAuth2Service',
'clientId' => '...', 'clientId' => '...',
'clientSecret' => '...', 'clientSecret' => '...',
], ],
'twitter' => [ 'facebook' => [
// register your app here: https://developers.facebook.com/apps/
'class' => 'common\modules\eauth\components\FacebookOAuth2Service',
'clientId' => '...',
'clientSecret' => '...',
],
/*'twitter' => [
// register your app here: https://dev.twitter.com/apps/new // register your app here: https://dev.twitter.com/apps/new
'class' => 'common\modules\eauth\components\TwitterOAuth1Service', 'class' => 'common\modules\eauth\components\TwitterOAuth1Service',
'key' => '...', 'key' => '...',
'secret' => '...', 'secret' => '...',
], ],*/
], ],
], ],
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment