Skip to content

Commit

Permalink
Merge pull request #187 from mageplaza/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
haitv282 authored May 4, 2020
2 parents e23d01d + aabbd07 commit 5c14670
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 135 deletions.
39 changes: 35 additions & 4 deletions Setup/InstallSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
Table::TYPE_INTEGER,
11,
[
'identity' => true,
'nullable' => false,
'primary' => true,
'unsigned' => true,
'identity' => true,
'nullable' => false,
'primary' => true,
'unsigned' => true,
],
'Social Customer ID'
)
Expand All @@ -75,13 +75,44 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
'Is Send Password Email'
)
->addColumn('type', Table::TYPE_TEXT, 255, ['default' => ''], 'Type')
->addColumn(
'social_created_at',
Table::TYPE_TIMESTAMP,
'Social Created At'
)
->addColumn(
'user_id',
Table::TYPE_INTEGER,
10,
[
'nullable' => true,
'unsigned' => true,
],
'User Id'
)
->addColumn(
'status',
Table::TYPE_TEXT,
255,
[
'nullable' => true,
],
'Status'
)
->addForeignKey(
$installer->getFkName('mageplaza_social_customer', 'customer_id', 'customer_entity', 'entity_id'),
'customer_id',
$installer->getTable('customer_entity'),
'entity_id',
Table::ACTION_CASCADE
)
->addForeignKey(
$installer->getFkName('mageplaza_social_customer', 'user_id', 'admin_user', 'user_id'),
'user_id',
$installer->getTable('admin_user'),
'user_id',
Table::ACTION_CASCADE
)
->setComment('Social Customer Table');

$installer->getConnection()->createTable($table);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"roave/security-advisories": "dev-master"
},
"type": "magento2-module",
"version": "2.8.1",
"version": "2.8.2",
"license": "proprietary",
"authors": [
{
Expand Down
11 changes: 11 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@
</field>
<field id="custom_css" translate="label" type="textarea" sortOrder="55" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Custom CSS</label>
<comment><![CDATA[
If you use <b> Quick Login </b> or <b> Popup Slide </b>, you should fill this field with those class: <br>
#bnt-social-login-fake-email { <br>
background-color: <b> Your Color in Style Management field </b> !important; <br>
border: <b> Your Color in Style Management field </b> !important; <br>
} <br>
#request-popup .social-login-title { <br>
background-color: <b> Your Color in Style Management field </b> !important; <br>
} <br>
]]></comment>
</field>
</group>
<group id="facebook" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
Expand Down
160 changes: 85 additions & 75 deletions etc/config.xml
Original file line number Diff line number Diff line change
@@ -1,76 +1,86 @@
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialLogin
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<sociallogin>
<module>
<type>1</type>
</module>
<general>
<enabled>0</enabled>
<link_trigger>.header.links, .section-item-content .header.links</link_trigger>
<send_password>1</send_password>
<social_display>1,2,3,4</social_display>
<popup_login>popup_slide</popup_login>
<authentication_popup>1</authentication_popup>
<popup_effect>mfp-move-from-top</popup_effect>
<style_management>#6e716e</style_management>
<require_more_info>2</require_more_info>
<information_require>email,name,password</information_require>
</general>
<facebook>
<sort_order>10</sort_order>
</facebook>
<google>
<sort_order>20</sort_order>
</google>
<amazon>
<sort_order>30</sort_order>
</amazon>
<twitter>
<sort_order>40</sort_order>
</twitter>
<linkedin>
<sort_order>50</sort_order>
</linkedin>
<yahoo>
<sort_order>60</sort_order>
</yahoo>
<foursquare>
<sort_order>70</sort_order>
</foursquare>
<instagram>
<sort_order>80</sort_order>
</instagram>
<vkontakte>
<sort_order>90</sort_order>
</vkontakte>
<github>
<sort_order>100</sort_order>
</github>
<live>
<sort_order>110</sort_order>
</live>
</sociallogin>
</default>
<?xml version="1.0"?>
<!--
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialLogin
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<sociallogin>
<module>
<type>1</type>
</module>
<general>
<enabled>0</enabled>
<link_trigger>.header.links, .section-item-content .header.links</link_trigger>
<send_password>1</send_password>
<social_display>1,2,3,4</social_display>
<popup_login>popup_slide</popup_login>
<authentication_popup>1</authentication_popup>
<popup_effect>mfp-move-from-top</popup_effect>
<style_management>#6e716e</style_management>
<require_more_info>2</require_more_info>
<information_require>email,name,password</information_require>
<custom_css>
#bnt-social-login-fake-email {
background-color: grey !important;
border: grey !important;
}

#request-popup .social-login-title {
background-color: grey !important;
}
</custom_css>
</general>
<facebook>
<sort_order>10</sort_order>
</facebook>
<google>
<sort_order>20</sort_order>
</google>
<amazon>
<sort_order>30</sort_order>
</amazon>
<twitter>
<sort_order>40</sort_order>
</twitter>
<linkedin>
<sort_order>50</sort_order>
</linkedin>
<yahoo>
<sort_order>60</sort_order>
</yahoo>
<foursquare>
<sort_order>70</sort_order>
</foursquare>
<instagram>
<sort_order>80</sort_order>
</instagram>
<vkontakte>
<sort_order>90</sort_order>
</vkontakte>
<github>
<sort_order>100</sort_order>
</github>
<live>
<sort_order>110</sort_order>
</live>
</sociallogin>
</default>
</config>
1 change: 0 additions & 1 deletion i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ Back,Back
Submit,Submit
"Forgot Password","Forgot Password"
"Please enter your email address below to receive a password reset link.","Please enter your email address below to receive a password reset link."
"Go back","Go back"
"Could not authenticate. Please try again later","Could not authenticate. Please try again later"
"Social Login","Social Login"
General,General
Expand Down
108 changes: 54 additions & 54 deletions view/frontend/templates/popup/form/forgot.phtml
Original file line number Diff line number Diff line change
@@ -1,54 +1,54 @@
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialLogin
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
?>
<div class="social-login block-container forgot" style="display:none">
<div class="social-login-title">
<h2 class="forgot-pass-title"><?= __('Forgot Password') ?></h2>
</div>
<div class="block col-mp mp-12">
<div class="block-content">
<form class="form-password-forget" id="social-form-password-forget" data-mage-init='{"validation":{}}'>
<fieldset class="fieldset" data-hasrequired="<?= __('* Required Fields') ?>">
<div class="field note"><?= __('Please enter your email address below to receive a password reset link.') ?></div>
<div class="field email required">
<label for="email_address" class="label"><span><?= __('Email') ?></span></label>
<div class="control">
<input type="email" name="email" alt="email" id="email_address_forgot" class="input-text"
value="<?= $block->escapeHtml($block->getEmailValue()) ?>"
data-validate="{required:true, 'validate-email':true}"/>
</div>
</div>
<?= $block->getChildHtml('form_additional_info') ?>
</fieldset>
<div class="actions-toolbar">
<div class="primary">
<button type="button" id="bnt-social-login-forgot" class="action send primary">
<span><?= __('Submit') ?></span>
</button>
<div class="secondary">
<a class="action back" href="#"><span><?= __('Back') ?></span></a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<?php
/**
* Mageplaza
*
* NOTICE OF LICENSE
*
* This source file is subject to the Mageplaza.com license that is
* available through the world-wide-web at this URL:
* https://www.mageplaza.com/LICENSE.txt
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to newer
* version in the future.
*
* @category Mageplaza
* @package Mageplaza_SocialLogin
* @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/)
* @license https://www.mageplaza.com/LICENSE.txt
*/
?>
<div class="social-login block-container forgot" style="display:none">
<div class="social-login-title">
<h2 class="forgot-pass-title"><?= __('Forgot Password') ?></h2>
</div>
<div class="block col-mp mp-12">
<div class="block-content">
<form class="form-password-forget" id="social-form-password-forget" data-mage-init='{"validation":{}}'>
<fieldset class="fieldset" data-hasrequired="<?= __('* Required Fields') ?>">
<div class="field note"><?= __('Please enter your email address below to receive a password reset link.') ?></div>
<div class="field email required">
<label for="email_address" class="label"><span><?= __('Email') ?></span></label>
<div class="control">
<input type="email" name="email" alt="email" id="email_address_forgot" class="input-text"
value="<?= $block->escapeHtml($block->getEmailValue()) ?>"
data-validate="{required:true, 'validate-email':true}"/>
</div>
</div>
<?= $block->getChildHtml('form_additional_info') ?>
</fieldset>
<div class="actions-toolbar">
<div class="primary">
<button type="button" id="bnt-social-login-forgot" class="action send primary">
<span><?= __('Submit') ?></span>
</button>
<div class="secondary">
<a class="action back" href="#"><span><?= __('Back') ?></span></a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
15 changes: 15 additions & 0 deletions view/frontend/web/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,21 @@
}
}

@media only screen and (max-width: 766px) {
.secondary {
width: 93%;
padding-top: 0;
margin-top: 0;
}
#bnt-social-login-authentication {
margin-bottom: 0;
}
.forgot-pass-title {
width: 80%;
font-size: 1.45em;
}
}

.customer-account-create .account-social-login, .customer-account-login .account-social-login {
display: block !important
}

0 comments on commit 5c14670

Please sign in to comment.