diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php
index 61610187e9b6..1845582ae227 100644
--- a/app/Ninja/Mailers/ContactMailer.php
+++ b/app/Ninja/Mailers/ContactMailer.php
@@ -33,6 +33,8 @@ class ContactMailer extends Mailer
'paymentLink',
'paymentButton',
'autoBill',
+ 'portalLink',
+ 'portalButton',
];
/**
diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php
index d6a3f12ea270..bcc371304e1e 100644
--- a/app/Services/TemplateService.php
+++ b/app/Services/TemplateService.php
@@ -63,6 +63,8 @@ class TemplateService
'$customInvoice2' => $account->custom_invoice_text_label2,
'$documents' => $documentsHTML,
'$autoBill' => empty($data['autobill'])?'':$data['autobill'],
+ '$portalLink' => $invitation->contact->link,
+ '$portalButton' => Form::emailViewButton($invitation->contact->link, 'portal'),
];
// Add variables for available payment types
diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php
index eb6ed3fd03ed..ceaa077b1453 100644
--- a/resources/lang/en/texts.php
+++ b/resources/lang/en/texts.php
@@ -1692,7 +1692,7 @@ $LANG = array(
'lang_Spanish' => 'Spanish',
'lang_Spanish - Spain' => 'Spanish - Spain',
'lang_Swedish' => 'Swedish',
-
+
// Frequencies
'freq_weekly' => 'Weekly',
'freq_two_weeks' => 'Two weeks',
@@ -2004,6 +2004,8 @@ $LANG = array(
'country_Yemen' => 'Yemen',
'country_Zambi' => 'Zambi',
+ 'view_client_portal' => 'View client portal',
+ 'view_portal' => 'View Portal',
);
return $LANG;
diff --git a/resources/views/accounts/templates_and_reminders.blade.php b/resources/views/accounts/templates_and_reminders.blade.php
index f6412ffcabd6..a54d23440bb9 100644
--- a/resources/views/accounts/templates_and_reminders.blade.php
+++ b/resources/views/accounts/templates_and_reminders.blade.php
@@ -267,6 +267,8 @@
"{{ URL::to('/payment/...') }}$password",
'{!! Form::flatButton('pay_now', '#36c157') !!}$password',
'{{ trans('texts.auto_bill_notification_placeholder') }}',
+ "{{ URL::to('/client/portal/...') }}",
+ '{!! Form::flatButton('view_portal', '#36c157') !!}',
];
// Add blanks for custom values
diff --git a/resources/views/clients/show.blade.php b/resources/views/clients/show.blade.php
index cf03276e3faa..bbff7eec5e9c 100644
--- a/resources/views/clients/show.blade.php
+++ b/resources/views/clients/show.blade.php
@@ -148,7 +148,9 @@
@if ($contact->phone)
{{ $contact->phone }}
@endif
- {{ trans('texts.view_dashboard') }}
+ @if ($client->account->enable_client_portal)
+ {{ trans('texts.view_client_portal') }}
+ @endif
@endforeach