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();
|
->first();
|
||||||
|
|
||||||
$mailer = new NinjaMailerObject();
|
$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->company = $this->subscription->company;
|
||||||
$mailer->settings = $this->subscription->company->settings;
|
$mailer->settings = $this->subscription->company->settings;
|
||||||
$mailer->to_user = $contact;
|
$mailer->to_user = $contact;
|
||||||
|
@ -21,25 +21,28 @@ use Illuminate\Queue\SerializesModels;
|
|||||||
|
|
||||||
class ContactPasswordlessLogin extends Mailable
|
class ContactPasswordlessLogin extends Mailable
|
||||||
{
|
{
|
||||||
|
/** @var string */
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $email;
|
public $email;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
public $url;
|
public $url;
|
||||||
|
|
||||||
|
/** @var Company */
|
||||||
|
public $company;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new message instance.
|
* Create a new message instance.
|
||||||
*
|
*
|
||||||
* @param string $email
|
* @param string $email
|
||||||
* @param string $redirect
|
* @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->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
|
return $this
|
||||||
->subject(ctrans('texts.account_passwordless_login'))
|
->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_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',
|
'user_cross_linked_error' => 'User exists but cannot be crossed linked to multiple accounts',
|
||||||
'ach_verification_notification_label' => 'ACH verification',
|
'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;
|
return $LANG;
|
||||||
|
@ -1,16 +1,8 @@
|
|||||||
@component('email.template.master', ['design' => 'light'])
|
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
||||||
@slot('header')
|
<div class="center">
|
||||||
@include('email.components.header', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png'])
|
<h1>{{ ctrans('texts.login_link_requested_label') }}</h1>
|
||||||
@endslot
|
<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>
|
<a href="{{ $url }}" target="_blank" class="button">Sign in to Invoice Ninja</a>
|
||||||
|
</div>
|
||||||
<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>
|
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
Loading…
x
Reference in New Issue
Block a user