1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Construct client template & ClientContactResetPasswordObject.php

This commit is contained in:
Benjamin Beganović 2021-06-10 11:23:10 +02:00
parent e70effd404
commit fd58f1cadb
4 changed files with 191 additions and 2 deletions

View File

@ -39,6 +39,7 @@ class ClientContactResetPasswordObject
'button' => ctrans('texts.reset'),
'signature' => $this->company->settings->email_signature,
'settings' => $this->company->settings,
'company' => $this->company,
'logo' => $this->company->present()->logo(),
];
@ -46,9 +47,9 @@ class ClientContactResetPasswordObject
$mail_obj = new \stdClass;
$mail_obj->subject = ctrans('texts.your_password_reset_link');
$mail_obj->data = $data;
$mail_obj->markdown = 'email.admin.generic';
$mail_obj->markdown = 'email.client.generic';
$mail_obj->tag = $this->company->company_key;
return $mail_obj;
}
}
}

View File

@ -4261,6 +4261,7 @@ $LANG = array(
'invoices_backup_subject' => 'Your invoices are ready for download',
'migration_failed_label' => 'Migration failed',
'migration_failed' => 'Looks like something went wrong with the migration for the following company:',
'client_email_company_contact_label' => 'If you have any questions please contact us, we\'re here to help!',
);
return $LANG;

View File

@ -0,0 +1,27 @@
@component('email.template.client', ['design' => 'light', 'settings' => $settings, 'logo' => $logo, 'company' => $company ?? ''])
<div class="center">
@isset($greeting)
<p>{{ $greeting }}</p>
@endisset
@isset($title)
<h1>{{ $title }}</h1>
@endisset
@isset($h2)
<h2>{{ $title }}</h2>
@endisset
<div style="margin-top: 10px; margin-bottom: 30px;">
{{ $content }}
</div>
@isset($additional_info)
<p>{{ $additional_info }}</p>
@endisset
@isset($url)
<a href="{{ $url }}" class="button" target="_blank">{{ ctrans($button) }}</a>
@endisset
</div>
@endcomponent

View File

@ -0,0 +1,160 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<style>
@import url("https://use.typekit.net/zxn7pho.css");
</style>
<style type="text/css">
:root {
color-scheme: light dark;
supported-color-schemes: light dark;
}
@if(isset($settings) && $settings->email_style === 'dark')
body {
background-color: #1a1a1a !important;
color: #ffffff !important;
}
div, tr, td {
border-color: #222222 !important;
}
h1, h2, h3, p, td {
color: #ffffff !important;
}
p {
color: #bbbbbc !important;
}
.dark-bg-base {
background-color: #222222 !important;
}
.dark-bg {
background-color: #3a3a3c !important;
}
.dark-text-white p {
color: #ffffff !important;
}
hr {
border-color: #474849 !important;
}
@endif
/** Content-specific styles. **/
#content .button {
display: inline-block;
background-color: #0091ea;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 2px;
text-decoration: none;
font-size: 13px;
padding: 15px 50px;
font-weight: 600;
margin-bottom: 30px;
}
#content h1 {
font-family: 'canada-type-gibson', 'roboto', Arial, Helvetica, sans-serif;
font-weight: 600;
font-size: 32px;
margin-top: 20px;
margin-bottom: 30px;
}
#content > p {
font-size: 16px;
font-family: 'roboto', Arial, Helvetica, sans-serif;
font-weight: 500;
}
#content .center {
text-align: center;
}
</style>
</head>
<body
style="margin: 0; padding: 0; font-family: 'roboto', Arial, Helvetica, sans-serif; color: #3b3b3b;-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="570"
style="border-collapse: collapse;" class="dark-bg-base">
<tr>
<div style="text-align: center;margin-top: 25px; margin-bottom: 10px;"></div>
</tr>
<tr>
<td>
<div
style="border: 1px solid #c2c2c2; border-bottom: none; padding-bottom: 10px; border-top-left-radius: 3px; border-top-right-radius: 3px;">
<img
style="margin-top: 40px; height: 40px; display: block; margin-left: auto; margin-right: auto;"
src="{{ $logo ?? '' }}"/>
</div>
</td>
</tr>
<tr>
<td>
<div style="border: 1px solid #c2c2c2; border-top: none; border-bottom: none;" id="content">
<div style="padding-top: 10px;"></div>
{{ $slot }}
</div>
</td>
</tr>
@if(isset($company) & $company instanceof \App\Models\Company)
<tr>
<td>
<div class="dark-bg dark-text-white"
style="text-align: center; padding-top: 10px; padding-bottom: 25px; background-color: #f9f9f9; border: 1px solid #c2c2c2; border-top: none; border-bottom-color: #f9f9f9;">
<p style="font-size: 15px; color: #2e2e2e; font-family: 'roboto', Arial, Helvetica, sans-serif; font-weight: 400; margin-bottom: 30px;">
{{ ctrans('texts.client_email_company_contact_label') }}
</p>
<p style="font-size: 15px; color: #2e2e2e; font-family: 'roboto', Arial, Helvetica, sans-serif; font-weight: 500; margin-bottom:0;">
{{ $company->present()->name() }}</p>
<p style="font-size: 15px; color: #2e2e2e; font-family: 'roboto', Arial, Helvetica, sans-serif; font-weight: 400; margin-top: 5px;">
<span>{{ $company->settings->phone }}</span>
<span style="font-weight: 500"> {{ $company->settings->website }}</span>
</p>
</div>
</td>
</tr>
@endif
<tr>
<td>
<div class="dark-bg-base"
style="padding-top: 10px;padding-bottom: 10px; background-color: #242424; border: 1px solid #c2c2c2; border-top-color: #242424; border-bottom-color: #242424;">
@if(isset($company) && !$company->account->isPaid())
<p style="text-align: center; color: #ffffff; font-size: 10px;
font-family: Verdana, Geneva, Tahoma, sans-serif;"{{ date('Y') }} Invoice Ninja, All
Rights Reserved
</p>
@endif
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>