mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 02:54:36 -04:00
Form validation for contact password reset
This commit is contained in:
parent
5e09e232ca
commit
108512068e
@ -12,6 +12,7 @@
|
|||||||
namespace App\Http\Controllers\Auth;
|
namespace App\Http\Controllers\Auth;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Http\Requests\ClientPortal\Contact\ContactPasswordResetRequest;
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Models\Account;
|
use App\Models\Account;
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
@ -73,9 +74,8 @@ class ContactForgotPasswordController extends Controller
|
|||||||
return Password::broker('contacts');
|
return Password::broker('contacts');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendResetLinkEmail(Request $request)
|
public function sendResetLinkEmail(ContactPasswordResetRequest $request)
|
||||||
{
|
{
|
||||||
//MultiDB::userFindAndSetDb($request->input('email'));
|
|
||||||
|
|
||||||
$user = MultiDB::hasContact($request->input('email'));
|
$user = MultiDB::hasContact($request->input('email'));
|
||||||
|
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\ClientPortal\Contact;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class ContactPasswordResetRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 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 [
|
||||||
|
'email' => 'required',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -202,6 +202,7 @@ class AuthorizeCreditCard
|
|||||||
private function processFailedResponse($data, $request)
|
private function processFailedResponse($data, $request)
|
||||||
{
|
{
|
||||||
$response = $data['response'];
|
$response = $data['response'];
|
||||||
|
$amount = array_key_exists('amount_with_fee', $data) ? $data['amount_with_fee'] : 0;
|
||||||
|
|
||||||
PaymentFailureMailer::dispatch($this->authorize->client, $response->getTransactionResponse()->getTransId(), $this->authorize->client->company, $data['amount_with_fee']);
|
PaymentFailureMailer::dispatch($this->authorize->client, $response->getTransactionResponse()->getTransId(), $this->authorize->client->company, $data['amount_with_fee']);
|
||||||
|
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
<input type="email" name="email" id="email"
|
<input type="email" name="email" id="email"
|
||||||
class="input"
|
class="input"
|
||||||
value="{{ request()->query('email') ?? old('email') }}"
|
value="{{ request()->query('email') ?? old('email') }}"
|
||||||
autofocus>
|
autofocus
|
||||||
|
required>
|
||||||
@error('email')
|
@error('email')
|
||||||
<div class="validation validation-fail">
|
<div class="validation validation-fail">
|
||||||
{{ $message }}
|
{{ $message }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user