Merge pull request #4970 from devansh-webkul/google-captcha
Captcha Integrated #4632
This commit is contained in:
commit
a5d2e47108
|
|
@ -297,6 +297,11 @@ return [
|
|||
|
||||
'aliases' => [
|
||||
|
||||
/**
|
||||
* Laravel
|
||||
*
|
||||
* Place your aliases in alphabetical order.
|
||||
*/
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
'Artisan' => Illuminate\Support\Facades\Artisan::class,
|
||||
'Auth' => Illuminate\Support\Facades\Auth::class,
|
||||
|
|
@ -330,18 +335,25 @@ return [
|
|||
'URL' => Illuminate\Support\Facades\URL::class,
|
||||
'Validator' => Illuminate\Support\Facades\Validator::class,
|
||||
'View' => Illuminate\Support\Facades\View::class,
|
||||
'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class,
|
||||
'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
|
||||
/**
|
||||
* Bagisto
|
||||
*
|
||||
* Place your aliases in alphabetical order.
|
||||
*/
|
||||
'Captcha' => Webkul\Customer\Facades\Captcha::class,
|
||||
'Cart' => Webkul\Checkout\Facades\Cart::class,
|
||||
'Core' => Webkul\Core\Facades\Core::class,
|
||||
'DbView' => Flynsarmy\DbBladeCompiler\Facades\DbView::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
||||
'Concord' => Konekt\Concord\Facades\Concord::class,
|
||||
'Helper' => Konekt\Concord\Facades\Helper::class,
|
||||
'Core' => Webkul\Core\Facades\Core::class,
|
||||
'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class,
|
||||
'DbView' => Flynsarmy\DbBladeCompiler\Facades\DbView::class,
|
||||
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
||||
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
||||
'Helper' => Konekt\Concord\Facades\Helper::class,
|
||||
'Image' => Intervention\Image\Facades\Image::class,
|
||||
'PDF' => Barryvdh\DomPDF\Facade::class,
|
||||
'ProductImage' => Webkul\Product\Facades\ProductImage::class,
|
||||
'ProductVideo' => Webkul\Product\Facades\ProductVideo::class
|
||||
'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class,
|
||||
'ProductVideo' => Webkul\Product\Facades\ProductVideo::class,
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
use Webkul\Customer\Http\Requests\CustomerRegistrationRequest;
|
||||
use Webkul\Customer\Repositories\CustomerGroupRepository;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
||||
class CustomerController extends Controller
|
||||
{
|
||||
|
|
@ -70,14 +70,9 @@ class CustomerController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create(Request $request)
|
||||
public function create(CustomerRegistrationRequest $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'first_name' => 'required',
|
||||
'last_name' => 'required',
|
||||
'email' => 'email|required|unique:customers,email',
|
||||
'password' => 'confirmed|min:6|required',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
$data = [
|
||||
'first_name' => $request->get('first_name'),
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Webkul\API\Http\Controllers\Shop;
|
|||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Webkul\Customer\Http\Requests\CustomerForgotPasswordRequest;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
|
|
@ -14,23 +15,19 @@ class ForgotPasswordController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store()
|
||||
public function store(CustomerForgotPasswordRequest $request)
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'email' => 'required|email',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
$response = $this->broker()->sendResetLink(request(['email']));
|
||||
$response = $this->broker()->sendResetLink($request->only(['email']));
|
||||
|
||||
if ($response == Password::RESET_LINK_SENT) {
|
||||
return response()->json([
|
||||
return $response == Password::RESET_LINK_SENT
|
||||
? response()->json([
|
||||
'message' => trans($response),
|
||||
])
|
||||
: response()->json([
|
||||
'error' => trans($response),
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'error' => trans($response),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
namespace Webkul\API\Http\Controllers\Shop;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
use Webkul\API\Http\Resources\Customer\Customer as CustomerResource;
|
||||
use Webkul\Customer\Http\Requests\CustomerLoginRequest;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
|
||||
class SessionController extends Controller
|
||||
{
|
||||
|
|
@ -45,22 +46,19 @@ class SessionController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(CustomerLoginRequest $request)
|
||||
{
|
||||
request()->validate([
|
||||
'email' => 'required|email',
|
||||
'password' => 'required',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
$jwtToken = null;
|
||||
|
||||
if (! $jwtToken = auth()->guard($this->guard)->attempt(request()->only('email', 'password'))) {
|
||||
if (! $jwtToken = auth()->guard($this->guard)->attempt($request->only(['email', 'password']))) {
|
||||
return response()->json([
|
||||
'error' => 'Invalid Email or Password',
|
||||
], 401);
|
||||
}
|
||||
|
||||
Event::dispatch('customer.after.login', request('email'));
|
||||
Event::dispatch('customer.after.login', $request->get('email'));
|
||||
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,212 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer;
|
||||
|
||||
use Webkul\Customer\Contracts\Captcha as CaptchaContract;
|
||||
|
||||
class Captcha implements CaptchaContract
|
||||
{
|
||||
/**
|
||||
* Site key.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $siteKey;
|
||||
|
||||
/**
|
||||
* Secret key.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $secretKey;
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->siteKey = $this->getSiteKey();
|
||||
|
||||
$this->secretKey = $this->getSecretKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether captcha is active or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
return (bool) core()->getConfigData('customer.captcha.credentials.status');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get site key from the core config.
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function getSiteKey(): ?string
|
||||
{
|
||||
return core()->getConfigData('customer.captcha.credentials.site_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get secret key from the core config.
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function getSecretKey(): ?string
|
||||
{
|
||||
return core()->getConfigData('customer.captcha.credentials.secret_key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get client endpoint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClientEndpoint(): string
|
||||
{
|
||||
return static::CLIENT_ENDPOINT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get site verify endpoint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSiteVerifyEndpoint(): string
|
||||
{
|
||||
return static::SITE_VERIFY_ENDPOINT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render JS.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function renderJS(): string
|
||||
{
|
||||
return $this->isActive()
|
||||
? $this->getCaptchaJSView()
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Render Captcha.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render(): string
|
||||
{
|
||||
return $this->isActive()
|
||||
? $this->getCaptchaView()
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate response.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function validateResponse($response): bool
|
||||
{
|
||||
$client = new \GuzzleHttp\Client();
|
||||
|
||||
$response = $client->post($this->getSiteVerifyEndpoint(), [
|
||||
'query' => [
|
||||
'secret' => $this->secretKey,
|
||||
'response' => $response
|
||||
]
|
||||
]);
|
||||
|
||||
return json_decode($response->getBody())->success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or merge existing validations with your captcha validations.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getValidations($rules = []): array
|
||||
{
|
||||
return $this->isActive()
|
||||
? array_merge($rules, ['g-recaptcha-response' => 'required|captcha'])
|
||||
: $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or merge existing validation messages with your captcha validation messages.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getValidationMessages($messages = []): array
|
||||
{
|
||||
return $this->isActive()
|
||||
? array_merge($messages, [
|
||||
'g-recaptcha-response.required' => __('customer::app.admin.system.captcha.validations.required'),
|
||||
'g-recaptcha-response.captcha' => __('customer::app.admin.system.captcha.validations.captcha')
|
||||
])
|
||||
: $messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get attributes.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getAttributes(): array
|
||||
{
|
||||
return [
|
||||
'class' => 'g-recaptcha',
|
||||
'data-sitekey' => $this->siteKey,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Build attributes.
|
||||
*
|
||||
* @param array $attributes
|
||||
* @return string
|
||||
*/
|
||||
protected function buildHTMLAttributes(array $attributes): string
|
||||
{
|
||||
$htmlAttributes = [];
|
||||
|
||||
foreach ($attributes as $key => $value) {
|
||||
$htmlAttributes[] = "{$key}=\"{$value}\"";
|
||||
}
|
||||
|
||||
return count($htmlAttributes)
|
||||
? implode(' ', $htmlAttributes)
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get captcha view.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCaptchaView()
|
||||
{
|
||||
$htmlAttributes = $this->buildHTMLAttributes($this->getAttributes());
|
||||
|
||||
return view('customer::captcha.view', [
|
||||
'htmlAttributes' => $htmlAttributes
|
||||
])->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get captcha script view.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCaptchaJSView()
|
||||
{
|
||||
return view('customer::captcha.scripts', [
|
||||
'clientEndPoint' => $this->getClientEndpoint()
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
'key' => 'customer.captcha',
|
||||
'name' => 'customer::app.admin.system.captcha.title',
|
||||
'sort' => 1,
|
||||
], [
|
||||
'key' => 'customer.captcha.credentials',
|
||||
'name' => 'customer::app.admin.system.captcha.credentials',
|
||||
'sort' => 1,
|
||||
'fields' => [
|
||||
[
|
||||
'name' => 'site_key',
|
||||
'title' => 'customer::app.admin.system.captcha.site-key',
|
||||
'type' => 'text',
|
||||
'channel_based' => true,
|
||||
], [
|
||||
'name' => 'secret_key',
|
||||
'title' => 'customer::app.admin.system.captcha.secret-key',
|
||||
'type' => 'text',
|
||||
'channel_based' => true,
|
||||
], [
|
||||
'name' => 'status',
|
||||
'title' => 'customer::app.admin.system.captcha.status',
|
||||
'type' => 'boolean',
|
||||
'channel_based' => true,
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Contracts;
|
||||
|
||||
interface Captcha
|
||||
{
|
||||
const CLIENT_ENDPOINT = 'https://www.google.com/recaptcha/api.js';
|
||||
|
||||
const SITE_VERIFY_ENDPOINT = 'https://google.com/recaptcha/api/siteverify';
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Facades;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
class Captcha extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor()
|
||||
{
|
||||
return 'captcha';
|
||||
}
|
||||
}
|
||||
|
|
@ -4,13 +4,14 @@ namespace Webkul\Customer\Http\Controllers;
|
|||
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Support\Facades\Password;
|
||||
use Webkul\Customer\Http\Requests\CustomerForgotPasswordRequest;
|
||||
|
||||
class ForgotPasswordController extends Controller
|
||||
{
|
||||
use SendsPasswordResetEmails;
|
||||
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
|
@ -41,16 +42,12 @@ class ForgotPasswordController extends Controller
|
|||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store()
|
||||
public function store(CustomerForgotPasswordRequest $request)
|
||||
{
|
||||
try {
|
||||
$this->validate(request(), [
|
||||
'email' => 'required|email',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
$response = $this->broker()->sendResetLink(
|
||||
request(['email'])
|
||||
);
|
||||
try {
|
||||
$response = $this->broker()->sendResetLink($request->only(['email']));
|
||||
|
||||
if ($response == Password::RESET_LINK_SENT) {
|
||||
session()->flash('success', trans('customer::app.forget_password.reset_link_sent'));
|
||||
|
|
@ -59,7 +56,7 @@ class ForgotPasswordController extends Controller
|
|||
}
|
||||
|
||||
return back()
|
||||
->withInput(request(['email']))
|
||||
->withInput($request->only(['email']))
|
||||
->withErrors([
|
||||
'email' => trans('customer::app.forget_password.email_not_exist'),
|
||||
]);
|
||||
|
|
@ -69,6 +66,7 @@ class ForgotPasswordController extends Controller
|
|||
return redirect()->back();
|
||||
} catch (\Exception $e) {
|
||||
report($e);
|
||||
|
||||
session()->flash('error', trans($e->getMessage()));
|
||||
|
||||
return redirect()->back();
|
||||
|
|
|
|||
|
|
@ -2,54 +2,54 @@
|
|||
|
||||
namespace Webkul\Customer\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Cookie;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Str;
|
||||
use Webkul\Core\Repositories\SubscribersListRepository;
|
||||
use Webkul\Customer\Http\Requests\CustomerRegistrationRequest;
|
||||
use Webkul\Customer\Mail\RegistrationEmail;
|
||||
use Webkul\Customer\Mail\VerificationEmail;
|
||||
use Webkul\Shop\Mail\SubscriptionEmail;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
use Webkul\Customer\Repositories\CustomerGroupRepository;
|
||||
use Webkul\Core\Repositories\SubscribersListRepository;
|
||||
use Cookie;
|
||||
use Webkul\Customer\Repositories\CustomerRepository;
|
||||
use Webkul\Shop\Mail\SubscriptionEmail;
|
||||
|
||||
class RegistrationController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* CustomerRepository object
|
||||
* Customer repository instance.
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerRepository
|
||||
*/
|
||||
protected $customerRepository;
|
||||
|
||||
/**
|
||||
* CustomerGroupRepository object
|
||||
* Customer group repository instance.
|
||||
*
|
||||
* @var \Webkul\Customer\Repositories\CustomerGroupRepository
|
||||
*/
|
||||
protected $customerGroupRepository;
|
||||
|
||||
/**
|
||||
* SubscribersListRepository
|
||||
* Subscribers list repository instance.
|
||||
*
|
||||
* @var \Webkul\Core\Repositories\SubscribersListRepository
|
||||
*/
|
||||
protected $subscriptionRepository;
|
||||
|
||||
/**
|
||||
* Create a new Repository instance.
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param \Webkul\Customer\Repositories\CustomerRepository $customer
|
||||
* @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroupRepository
|
||||
* @param \Webkul\Core\Repositories\SubscribersListRepository $subscriptionRepository
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
|
|
@ -80,16 +80,12 @@ class RegistrationController extends Controller
|
|||
/**
|
||||
* Method to store user's sign up form data to DB.
|
||||
*
|
||||
* @param \Webkul\Customer\Http\Requests\CustomerRegistrationRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(CustomerRegistrationRequest $request)
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'first_name' => 'string|required',
|
||||
'last_name' => 'string|required',
|
||||
'email' => 'email|required|unique:customers,email',
|
||||
'password' => 'confirmed|min:6|required',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
$data = array_merge(request()->input(), [
|
||||
'password' => bcrypt(request()->input('password')),
|
||||
|
|
@ -169,7 +165,7 @@ class RegistrationController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Method to verify account
|
||||
* Method to verify account.
|
||||
*
|
||||
* @param string $token
|
||||
* @return \Illuminate\Http\Response
|
||||
|
|
@ -190,6 +186,8 @@ class RegistrationController extends Controller
|
|||
}
|
||||
|
||||
/**
|
||||
* Resend verification email.
|
||||
*
|
||||
* @param string $email
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,26 +2,27 @@
|
|||
|
||||
namespace Webkul\Customer\Http\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Cookie;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Webkul\Customer\Http\Requests\CustomerLoginRequest;
|
||||
|
||||
class SessionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
* Contains route related configuration.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* Create a new Repository instance.
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('customer')->except(['show','create']);
|
||||
$this->middleware('customer')->except(['show', 'create']);
|
||||
|
||||
$this->_config = request('_config');
|
||||
}
|
||||
|
|
@ -33,26 +34,22 @@ class SessionController extends Controller
|
|||
*/
|
||||
public function show()
|
||||
{
|
||||
if (auth()->guard('customer')->check()) {
|
||||
return redirect()->route('customer.profile.index');
|
||||
} else {
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
return auth()->guard('customer')->check()
|
||||
? redirect()->route('customer.profile.index')
|
||||
: view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @param \Webkul\Customer\Http\Requests\CustomerLoginRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
public function create(CustomerLoginRequest $request)
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'email' => 'required|email',
|
||||
'password' => 'required',
|
||||
]);
|
||||
$request->validated();
|
||||
|
||||
if (! auth()->guard('customer')->attempt(request(['email', 'password']))) {
|
||||
if (! auth()->guard('customer')->attempt($request->only(['email', 'password']))) {
|
||||
session()->flash('error', trans('shop::app.customer.login-form.invalid-creds'));
|
||||
|
||||
return redirect()->back();
|
||||
|
|
@ -71,15 +68,17 @@ class SessionController extends Controller
|
|||
|
||||
Cookie::queue(Cookie::make('enable-resend', 'true', 1));
|
||||
|
||||
Cookie::queue(Cookie::make('email-for-resend', request('email'), 1));
|
||||
Cookie::queue(Cookie::make('email-for-resend', $request->get('email'), 1));
|
||||
|
||||
auth()->guard('customer')->logout();
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
//Event passed to prepare cart after login
|
||||
Event::dispatch('customer.after.login', request('email'));
|
||||
/**
|
||||
* Event passed to prepare cart after login.
|
||||
*/
|
||||
Event::dispatch('customer.after.login', $request->get('email'));
|
||||
|
||||
return redirect()->intended(route($this->_config['redirect']));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Webkul\Customer\Facades\Captcha;
|
||||
|
||||
class CustomerForgotPasswordRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Define your rules.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $rules = [
|
||||
'email' => 'required|email',
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return Captcha::getValidations($this->rules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get custom messages for validator errors.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return Captcha::getValidationMessages();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Webkul\Customer\Facades\Captcha;
|
||||
|
||||
class CustomerLoginRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Define your rules.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $rules = [
|
||||
'email' => 'required|email',
|
||||
'password' => 'required',
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return Captcha::getValidations($this->rules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get custom messages for validator errors.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return Captcha::getValidationMessages();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Customer\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Webkul\Customer\Facades\Captcha;
|
||||
|
||||
class CustomerRegistrationRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Define your rules.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $rules = [
|
||||
'first_name' => 'string|required',
|
||||
'last_name' => 'string|required',
|
||||
'email' => 'email|required|unique:customers,email',
|
||||
'password' => 'confirmed|min:6|required',
|
||||
];
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return Captcha::getValidations($this->rules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get custom messages for validator errors.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function messages()
|
||||
{
|
||||
return Captcha::getValidationMessages();
|
||||
}
|
||||
}
|
||||
|
|
@ -3,19 +3,31 @@
|
|||
namespace Webkul\Customer\Providers;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factory as EloquentFactory;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Webkul\Customer\Captcha;
|
||||
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
||||
|
||||
class CustomerServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(Router $router)
|
||||
{
|
||||
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customer');
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer');
|
||||
|
||||
$this->app['validator']->extend('captcha', function ($attribute, $value, $parameters) {
|
||||
return $this->app['captcha']->validateResponse($value);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -26,14 +38,19 @@ class CustomerServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->registerConfig();
|
||||
|
||||
$this->registerEloquentFactoriesFrom(__DIR__ . '/../Database/Factories');
|
||||
|
||||
$this->app->singleton('captcha', function ($app) {
|
||||
return new Captcha();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register factories.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @param string $path
|
||||
* @return void
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
*/
|
||||
|
|
@ -41,4 +58,17 @@ class CustomerServiceProvider extends ServiceProvider
|
|||
{
|
||||
$this->app->make(EloquentFactory::class)->load($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register package config.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function registerConfig()
|
||||
{
|
||||
$this->mergeConfigFrom(
|
||||
dirname(__DIR__) . '/Config/system.php',
|
||||
'core'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,30 @@ return [
|
|||
'select-options' => 'تحتاج إلى تحديد خيارات قبل إضافة إلى قائمة الأمنيات',
|
||||
'remove-all-success' => 'تمت إزالة جميع العناصر من قائمة الأمنيات الخاصة بك',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => '.لم تقم بمراجعة أي منتج حتى الآن'
|
||||
]
|
||||
'empty' => '.لم تقم بمراجعة أي منتج حتى الآن',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'لقد أرسلنا رابط إعادة تعيين كلمة المرور بالبريد الإلكتروني.',
|
||||
'email_not_exist' => "لا يمكننا العثور على مستخدم بعنوان البريد الإلكتروني هذا",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'كلمة التحقق',
|
||||
'credentials' => 'أوراق اعتماد',
|
||||
'site-key' => 'مفتاح الموقع',
|
||||
'secret-key' => 'المفتاح السري',
|
||||
'status' => 'حالة',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'الرجاء اختيار CAPTCHA',
|
||||
'captcha' => 'هناك خطأ ما! حاول مرة اخرى.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -11,10 +11,30 @@ return [
|
|||
'select-options' => 'Vor dem Hinzufügen zur Wunschliste müssen Optionen ausgewählt werden',
|
||||
'remove-all-success' => 'Alle Elemente von Ihrer Wunschliste wurden entfernt',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'Sie haben noch kein Produkt bewertet'
|
||||
'empty' => 'Sie haben noch kein Produkt bewertet',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Wir haben Ihren Link zum Zurücksetzen des Passworts per E-Mail gesendet.'
|
||||
]
|
||||
'reset_link_sent' => 'Wir haben Ihren Link zum Zurücksetzen des Passworts per E-Mail gesendet.',
|
||||
'email_not_exist' => "Wir können keinen Benutzer mit dieser E-Mail-Adresse finden",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Referenzen',
|
||||
'site-key' => 'Site-Schlüssel',
|
||||
'secret-key' => 'Geheimer Schlüssel',
|
||||
'status' => 'Status',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Bitte wählen Sie CAPTCHA',
|
||||
'captcha' => 'Etwas ist schief gelaufen! Bitte versuche es erneut.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -11,11 +11,30 @@ return [
|
|||
'select-options' => 'Need To Select Options Before Adding To Wishlist',
|
||||
'remove-all-success' => 'All The Items From Your Wishlist Have Been Removed',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'You have not reviewed any of product yet'
|
||||
'empty' => 'You have not reviewed any of product yet',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'We have e-mailed your reset password link.',
|
||||
'email_not_exist' => "We can't find a user with that e-mail address"
|
||||
]
|
||||
'email_not_exist' => "We can't find a user with that e-mail address",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Credentials',
|
||||
'site-key' => 'Site Key',
|
||||
'secret-key' => 'Secret Key',
|
||||
'status' => 'Status',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Please select CAPTCHA',
|
||||
'captcha' => 'Something went wrong! Please try again.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -11,11 +11,30 @@ return [
|
|||
'select-options' => 'Necesita seleccionar opciones antes de agregar a la lista de deseos',
|
||||
'remove-all-success' => 'Se han eliminado todos los elementos de su lista de deseos',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'Aún no has calificado ningún producto'
|
||||
'empty' => 'Aún no has calificado ningún producto',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Hemos enviado un correo electrónico con el enlace para restablecer la contraseña.',
|
||||
'email_not_exist' => "No podemos encontrar un usuario con esa dirección de correo electrónico"
|
||||
]
|
||||
'email_not_exist' => "No podemos encontrar un usuario con esa dirección de correo electrónico",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Cartas credenciales',
|
||||
'site-key' => 'Clave del sitio',
|
||||
'secret-key' => 'Llave secreta',
|
||||
'status' => 'Estado',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Seleccione CAPTCHA',
|
||||
'captcha' => '¡Algo salió mal! Inténtalo de nuevo.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'wishlist' => [
|
||||
'success' => 'Article ajouté avec succès à la liste de souhaits',
|
||||
'failure' => 'L\'article ne peut pas être ajouté à la liste de souhaits',
|
||||
'already' => 'Article déjà présent dans votre liste de souhaits',
|
||||
'removed' => 'Article supprimé avec succès de la liste de souhaits',
|
||||
'remove-fail' => 'L\'article ne peut pas être supprimé de la liste de souhaits',
|
||||
'empty' => 'Vous n\'avez aucun article dans votre liste de souhaits',
|
||||
'select-options' => 'Besoin de sélectionner des options avant d\'ajouter à la liste de souhaits',
|
||||
'remove-all-success' => 'Tous les articles de votre liste de souhaits ont été supprimés',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'Vous n\'avez pas encore évalué de produit',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Nous avons envoyé par e-mail votre lien de réinitialisation de mot de passe.',
|
||||
'email_not_exist' => 'Nous ne pouvons pas trouver un utilisateur avec cette adresse e-mail',
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Crédits',
|
||||
'site-key' => 'Clé du site',
|
||||
'secret-key' => 'Clef secrète',
|
||||
'status' => 'Statut',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Veuillez sélectionner CAPTCHA',
|
||||
'captcha' => 'Quelque chose s\'est mal passé ! Veuillez réessayer.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -11,11 +11,30 @@ return [
|
|||
'select-options' => 'Seleziona una opzione del prodotto prima di aggiungerlo ai Preferiti',
|
||||
'remove-all-success' => 'Tutti i Prodotti presenti nei preferiti sono stati rimossi',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'Non hai ancora recensito i nostri prodotti'
|
||||
],
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Ti abbiamo inviato una email per generare una nuova password.'
|
||||
]
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Abbiamo inviato un\'e-mail con il link per reimpostare la password.',
|
||||
'email_not_exist' => "Non riusciamo a trovare un utente con quell'indirizzo e-mail",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Credenziali',
|
||||
'site-key' => 'Chiave del sito',
|
||||
'secret-key' => 'Chiave segreta',
|
||||
'status' => 'Stato',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Seleziona CAPTCHA',
|
||||
'captcha' => 'Qualcosa è andato storto! Per favore riprova.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'wishlist' => [
|
||||
'success' => 'Artikel succesvol toegevoegd aan verlanglijst',
|
||||
'failure' => 'Artikel kan niet worden toegevoegd aan verlanglijst',
|
||||
'already' => 'Artikel al aanwezig in uw verlanglijst',
|
||||
'removed' => 'Artikel succesvol verwijderd van verlanglijst',
|
||||
'remove-fail' => 'Artikel kan niet van verlanglijst worden verwijderd',
|
||||
'empty' => 'U heeft geen items op uw verlanglijst',
|
||||
'select-options' => 'Moet opties selecteren voordat u aan verlanglijst toevoegt',
|
||||
'remove-all-success' => 'Alle items van je verlanglijst zijn verwijderd',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'U heeft nog geen product beoordeeld',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'We hebben de link voor het opnieuw instellen van uw wachtwoord per e-mail verzonden.',
|
||||
'email_not_exist' => "We kunnen geen gebruiker met dat e-mailadres vinden",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Inloggegevens',
|
||||
'site-key' => 'Sitesleutel',
|
||||
'secret-key' => 'Geheime sleutel',
|
||||
'status' => 'Toestand',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Selecteer CAPTCHA',
|
||||
'captcha' => 'Er is iets fout gegaan! Probeer het opnieuw.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -11,7 +11,30 @@ return [
|
|||
'select-options' => 'Precisa selecionar opções antes de adicionar à lista de desejos',
|
||||
'remove-all-success' => 'Todos os itens da sua lista de desejos foram removidos',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
'empty' => 'Você não avaliou nenhum produto ainda'
|
||||
]
|
||||
'empty' => 'Você não avaliou nenhum produto ainda',
|
||||
],
|
||||
|
||||
'forget_password' => [
|
||||
'reset_link_sent' => 'Enviamos por e-mail o link de redefinição de senha.',
|
||||
'email_not_exist' => "Não conseguimos encontrar um usuário com esse endereço de e-mail",
|
||||
],
|
||||
|
||||
'admin' => [
|
||||
'system' => [
|
||||
'captcha' => [
|
||||
'title' => 'Captcha',
|
||||
'credentials' => 'Credenciais',
|
||||
'site-key' => 'Chave do Site',
|
||||
'secret-key' => 'Chave secreta',
|
||||
'status' => 'Status',
|
||||
|
||||
'validations' => [
|
||||
'required' => 'Selecione CAPTCHA',
|
||||
'captcha' => 'Algo deu errado! Por favor, tente novamente.',
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1 @@
|
|||
<script src="{{ $clientEndPoint }}" async defer></script>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<div {!! $htmlAttributes !!}></div>
|
||||
|
||||
@if ($errors->has('g-recaptcha-response'))
|
||||
<span class="control-error">
|
||||
{{ $errors->first('g-recaptcha-response') }}
|
||||
</span>
|
||||
@endif
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'Webkul Bagisto Customer',
|
||||
'version' => '0.0.1'
|
||||
];
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<div class="auth-content">
|
||||
<div class="sign-up-text">
|
||||
{{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
|
||||
|
|
@ -14,7 +13,9 @@
|
|||
{!! view_render_event('bagisto.shop.customers.login.before') !!}
|
||||
|
||||
<form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="login-form">
|
||||
<div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>
|
||||
|
||||
|
|
@ -32,8 +33,6 @@
|
|||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
|
||||
|
||||
<div class="forgot-password-link">
|
||||
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
|
||||
|
||||
|
|
@ -46,12 +45,25 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login.after') !!}
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
|
|
@ -59,6 +59,8 @@
|
|||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.password_confirmation.after') !!}
|
||||
|
||||
{{-- <div class="signup-confirm" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'">
|
||||
|
|
@ -76,6 +78,12 @@
|
|||
Checkbox Value 1
|
||||
</span> --}}
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
|
|
@ -95,3 +103,9 @@
|
|||
{!! view_render_event('bagisto.shop.customers.signup.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
|
|
@ -91,6 +91,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
|
||||
|
||||
<input class="theme-btn" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
|
||||
|
|
@ -103,3 +109,9 @@
|
|||
{!! view_render_event('bagisto.shop.customers.login.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
|
|
@ -56,6 +56,12 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.after') !!}
|
||||
|
||||
<button class="theme-btn" type="submit">
|
||||
|
|
@ -69,3 +75,9 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
|
|
@ -138,6 +138,14 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.password_confirmation.after') !!}
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
{!! Captcha::render() !!}
|
||||
|
||||
</div>
|
||||
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
|
|
@ -158,3 +166,9 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
{!! Captcha::renderJS() !!}
|
||||
|
||||
@endpush
|
||||
Loading…
Reference in New Issue