mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
app/Mail/ContactPasswordlessLogin.php
This commit is contained in:
parent
40f22e7839
commit
15acba27dd
@ -451,7 +451,7 @@ class BillingPortalPurchase extends Component
|
||||
->first();
|
||||
|
||||
$mailer = new NinjaMailerObject();
|
||||
$mailer->mailable = new ContactPasswordlessLogin($this->email, $this->subscription->company->id, (string)route('client.subscription.purchase', $this->subscription->hashed_id) . '?coupon=' . $this->coupon);
|
||||
$mailer->mailable = new ContactPasswordlessLogin($this->email, $this->subscription->company, (string)route('client.subscription.purchase', $this->subscription->hashed_id) . '?coupon=' . $this->coupon);
|
||||
$mailer->company = $this->subscription->company;
|
||||
$mailer->settings = $this->subscription->company->settings;
|
||||
$mailer->to_user = $contact;
|
||||
|
@ -21,25 +21,28 @@ use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ContactPasswordlessLogin extends Mailable
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
/** @var string */
|
||||
public $email;
|
||||
|
||||
/** @var string */
|
||||
public $url;
|
||||
|
||||
/** @var Company */
|
||||
public $company;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param string $email
|
||||
* @param string $redirect
|
||||
*/
|
||||
public function __construct(string $email, $company_id, string $redirect = '')
|
||||
public function __construct(string $email, Company $company, string $redirect = '')
|
||||
{
|
||||
$this->email = $email;
|
||||
|
||||
$this->url = MagicLink::create($email, $company_id, $redirect);
|
||||
$this->company = $company;
|
||||
|
||||
$this->url = MagicLink::create($email, $company->id, $redirect);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -51,6 +54,9 @@ class ContactPasswordlessLogin extends Mailable
|
||||
{
|
||||
return $this
|
||||
->subject(ctrans('texts.account_passwordless_login'))
|
||||
->view('email.billing.passwordless-login');
|
||||
->view('email.billing.passwordless-login', [
|
||||
'logo' => $this->company->present()->logo(),
|
||||
'settings' => $this->company->settings,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -4255,7 +4255,9 @@ $LANG = array(
|
||||
'user_duplicate_error' => 'Cannot add the same user to the same company',
|
||||
'user_cross_linked_error' => 'User exists but cannot be crossed linked to multiple accounts',
|
||||
'ach_verification_notification_label' => 'ACH verification',
|
||||
'ach_verification_notification' => 'Connecting bank accounts require verification. Stripe will automatically sends two small deposits for this purpose. These deposits take 1-2 business days to appear on the customer\'s online statement.'
|
||||
'ach_verification_notification' => 'Connecting bank accounts require verification. Stripe will automatically sends two small deposits for this purpose. These deposits take 1-2 business days to appear on the customer\'s online statement.',
|
||||
'login_link_requested_label' => 'Login link requested',
|
||||
'login_link_requested' => 'There was a request to login using link. If you did not request this, it\'s safe to ignore it.',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
@ -1,16 +1,8 @@
|
||||
@component('email.template.master', ['design' => 'light'])
|
||||
@slot('header')
|
||||
@include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png'])
|
||||
@endslot
|
||||
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
||||
<div class="center">
|
||||
<h1>{{ ctrans('texts.login_link_requested_label') }}</h1>
|
||||
<p>{{ ctrans('texts.login_link_requested') }}</p>
|
||||
|
||||
<h2>Login link requested</h2>
|
||||
<p>Hey, there was a request to log in using link.</p>
|
||||
|
||||
<a href="{{ $url }}" target="_blank" class="button">Sign in to Invoice Ninja</a>
|
||||
|
||||
<span style="margin-top: 35px; display: block;">Link above is only for you. Don't share it anyone.</span>
|
||||
<span>If you didn't request this, just ignore it.</span>
|
||||
|
||||
<span style="margin-top: 25px; display: block;">If you can't click on the button, copy following link:</span>
|
||||
<a href="{{ $url }}">{{ $url }}</a>
|
||||
<a href="{{ $url }}" target="_blank" class="button">Sign in to Invoice Ninja</a>
|
||||
</div>
|
||||
@endcomponent
|
||||
|
Loading…
x
Reference in New Issue
Block a user