Introduction of tooltips.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Option;
|
||||
use App\Mail\InvoiceMail;
|
||||
use App\Models\Invoice;
|
||||
use App\TenantMail;
|
||||
@@ -36,6 +37,15 @@ class MailController extends Controller
|
||||
$invoiceMail->subject($request->Subject);
|
||||
$invoiceMail->body = $request->Body;
|
||||
|
||||
$options = Option::optionsAsObject();
|
||||
if (property_exists($options, 'bcc_copy')) {
|
||||
if (is_null($request->Bcc)) {
|
||||
$request->Bcc = $options->email;
|
||||
} else {
|
||||
$request->Bcc .= "," . $options->email;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$this->mailer->to($request->To)
|
||||
->cc($request->Cc)
|
||||
|
||||
@@ -38,5 +38,6 @@ return [
|
||||
'Email-Cc' => 'Cc',
|
||||
'Email-Subject' => 'Betreff',
|
||||
'Email-Body' => 'Nachricht',
|
||||
'Tooltip multiple email' => 'Mehrere E-Mail-Adressen werden durch "," (Komma) von einander getrennt.',
|
||||
|
||||
];
|
||||
|
||||
@@ -51,5 +51,18 @@ return [
|
||||
'Mail encryption' => 'Verschlüsselung',
|
||||
'Mail username' => 'Benutzername',
|
||||
'Mail password' => 'Passwort',
|
||||
'Bcc copy' => 'Kopie als Bcc erhalten',
|
||||
'Tooltip representative' => 'Wird beim Email Versand als Absender Name verwendet.',
|
||||
'Tooltip email' => 'Wird beim Email Versand als Absender Adresse verwendet.',
|
||||
'Tooltip color 1' => 'Diese Farbe wird im Schriftverkehr (PDF) für die Email Adresse und die Homepage verwendet.',
|
||||
'Tooltip color 2' => 'Diese Farbe wird im Schriftverkehr (PDF) für das Tätigkeitsfeld verwendet.',
|
||||
'Tooltip Mail transport' => 'Transport Protokoll für den Email Versand.<br/>Normalerweise <b>"smtp"</b>',
|
||||
'Tooltip Mail host' => 'Adresse des Email Servers, z.B.:<br/>smtp.gmail.com<br/>mail.gmx.net',
|
||||
'Tooltip Mail port' => 'Port des Email Servers, z.B.:<br/>587 (Verschlüsselung tls)<br/>465 (Verschlüsselung ssl)<br/><b>Entsprechend zutreffendes Verschlüsselungsverfahren unten eintragen.</b>',
|
||||
'Tooltip Mail encryption' => 'Verschlüsselungsverfahren für die Übertragung von Emails<br/>ssl, tls oder leer lassen für unverschlüsselte Übertragung (nicht empfohlen).',
|
||||
'Tooltip Mail username' => 'Meist die Email Adresse.',
|
||||
'Tooltip Mail password' => 'Das Passwort um Deine Emails abzurufen.',
|
||||
'Tooltip Bcc copy' => 'Die Email Übertragung per smtp lässt eine Speicherung der Nachricht in ihrem Postfach nicht zu.<br/>Falls Du eine Kopie der Nachricht in Deinem Postfach erhalten willst, kannst Du die Nachricht als Bcc Empfänger erhalten.',
|
||||
|
||||
|
||||
];
|
||||
|
||||
@@ -49,7 +49,7 @@ return [
|
||||
'Mail' => 'E-Mail',
|
||||
'Send email to your customer with attachments.' => 'E-Mail mit Anlagen an den Kunden versenden.',
|
||||
'Invoice body' => 'Sehr geehrte Kundin, sehr geehrter Kunde\n\nim Anhang erhalten Sie die Rechnung :invoice_number.\n\nMit freundlichen Grüßen',
|
||||
'Send Pdf' => 'Rechnung als Pdf versenden',
|
||||
'Send Xml' => 'Rechnung als Xml versenden',
|
||||
'Send Pdf' => 'Rechnung als Pdf anhängen',
|
||||
'Send Xml' => 'Rechnung als Xml anhängen',
|
||||
|
||||
];
|
||||
|
||||
3
resources/views/components/info-icon.blade.php
Normal file
3
resources/views/components/info-icon.blade.php
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" {{ $attributes->merge(['class' => 'size-8 p-1']) }}>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 390 B |
11
resources/views/components/tooltip.blade.php
Normal file
11
resources/views/components/tooltip.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div
|
||||
x-data="{ tooltip: false }"
|
||||
x-on:mouseover="tooltip = true"
|
||||
x-on:mouseleave="tooltip = false"
|
||||
{{ $attributes->merge(['class' => 'size-8 cursor-pointer']) }}>
|
||||
<x-info-icon/>
|
||||
<div x-show="tooltip"
|
||||
class="text-sm text-white absolute bg-gray-900 rounded-lg p-2 transform -translate-y-8 translate-x-8">
|
||||
{{$slot}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,21 +24,33 @@
|
||||
|
||||
<form class="mt-6 space-y-6" @submit.prevent="">
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label for="To" :value="__('common.Email-To')" class="w-1/4"/>
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="To"
|
||||
:value="__('common.Email-To')"/>
|
||||
<x-tooltip>{!! __('common.Tooltip multiple email') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="To" name="To" type="email" class="mt-1 block w-full"
|
||||
:value="old('To')" required multiple autocomplete="To"
|
||||
x-model="data.To"/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label for="Cc" :value="__('common.Email-Cc')" class="w-1/4"/>
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="Cc"
|
||||
:value="__('common.Email-Cc')"/>
|
||||
<x-tooltip>{!! __('common.Tooltip multiple email') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="Cc" name="Cc" type="email" class="mt-1 block w-full"
|
||||
:value="old('Cc')" multiple autocomplete="Cc"
|
||||
x-model="data.Cc"/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label for="Bcc" :value="__('common.Email-Bcc')" class="w-1/4"/>
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="Bcc"
|
||||
:value="__('common.Email-Bcc')"/>
|
||||
<x-tooltip>{!! __('common.Tooltip multiple email') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="Bcc" name="Bcc" type="email" class="mt-1 block w-full"
|
||||
:value="old('Bcc')" multiple autocomplete="Bcc"
|
||||
x-model="data.Bcc"/>
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
<div class="w-full flex flex-row" x-show="options.company_logo != null">
|
||||
<img class="w-1/4" :src="options.company_logo"/>
|
||||
<div class="ml-12">
|
||||
<x-primary-button class=""
|
||||
@click="clearPreview()">{{ __('form.Change') }}</x-primary-button>
|
||||
<x-primary-button @click="clearPreview()">{{ __('form.Change') }}</x-primary-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,8 +52,11 @@
|
||||
x-model="options.company_additional"/>
|
||||
</div>
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="representative"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="representative"
|
||||
:value="__('configuration.Representative')"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip representative') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="representative" name="representative" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('representative')" required autofocus
|
||||
@@ -86,7 +88,11 @@
|
||||
x-model="options.phone"/>
|
||||
</div>
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="email" :value="__('configuration.Email')"/>
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="email"
|
||||
:value="__('configuration.Email')"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip email') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full"
|
||||
:value="old('email')" required autofocus autocomplete="email"
|
||||
x-model="options.email"/>
|
||||
@@ -209,8 +215,11 @@
|
||||
</summary>
|
||||
<form class="mt-6 space-y-2" @submit.prevent="">
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="color_1"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="color_1"
|
||||
:value="__('configuration.Color'). ' 1'"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip color 1') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="color_1" name="color_1" type="color"
|
||||
class="mt-1 block"
|
||||
:value="old('color_1')" required autofocus
|
||||
@@ -218,8 +227,11 @@
|
||||
x-model="options.color_1"/>
|
||||
</div>
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="color_2"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="color_2"
|
||||
:value="__('configuration.Color'). ' 2'"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip color 2') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="color_2" name="color_2" type="color"
|
||||
class="mt-1 block"
|
||||
:value="old('color_2')" required autofocus
|
||||
@@ -234,14 +246,6 @@
|
||||
</div>
|
||||
|
||||
<!-- Mail derlivery -->
|
||||
<!--
|
||||
'transport' => $options->mail_transport,
|
||||
'host' => $options->mail_host,
|
||||
'port' => $options->mail_port,
|
||||
'encryption' => $options->mail_encryption,
|
||||
'username' => $options->mail_username,
|
||||
'password' => $options->mail_password,
|
||||
-->
|
||||
<div class="p-4 sm:p-8 bg-white dark:bg-gray-800 shadow sm:rounded-lg">
|
||||
<div class="max-w">
|
||||
<section>
|
||||
@@ -251,8 +255,11 @@
|
||||
</summary>
|
||||
<form class="mt-6 space-y-2" @submit.prevent="">
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_transport"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_transport"
|
||||
:value="__('configuration.Mail transport')"/>
|
||||
<x-tooltip>{!! __('configuration.Tooltip Mail transport') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_transport" name="mail_transport" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_transport')" autofocus
|
||||
@@ -262,8 +269,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_host"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_host"
|
||||
:value="__('configuration.Mail host')"/>
|
||||
<x-tooltip>{!! __('configuration.Tooltip Mail host') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_host" name="mail_host" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_host')" autofocus
|
||||
@@ -273,8 +283,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_port"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_port"
|
||||
:value="__('configuration.Mail port')"/>
|
||||
<x-tooltip>{!! __('configuration.Tooltip Mail port') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_port" name="mail_port" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_port')" autofocus
|
||||
@@ -284,8 +297,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_encryption"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_encryption"
|
||||
:value="__('configuration.Mail encryption')"/>
|
||||
<x-tooltip>{!! __('configuration.Tooltip Mail encryption') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_encryption" name="mail_encryption" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_encryption')" autofocus
|
||||
@@ -295,8 +311,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_username"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_username"
|
||||
:value="__('configuration.Mail username')"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip Mail username') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_username" name="mail_username" type="text"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_username')" autofocus
|
||||
@@ -306,8 +325,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<x-input-label class="w-1/4" for="mail_password"
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="mail_password"
|
||||
:value="__('configuration.Mail password')"/>
|
||||
<x-tooltip>{{ __('configuration.Tooltip Mail password') }}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="mail_password" name="mail_password" type="password"
|
||||
class="mt-1 block w-full"
|
||||
:value="old('mail_password')" autofocus
|
||||
@@ -315,6 +337,19 @@
|
||||
x-model="options.mail_password"/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row items-center">
|
||||
<div class="w-1/4 flex flex-row items-center">
|
||||
<x-input-label for="bcc_copy"
|
||||
:value="__('configuration.Bcc copy')"/>
|
||||
<x-tooltip>{!! __('configuration.Tooltip Bcc copy') !!}</x-tooltip>
|
||||
</div>
|
||||
<x-text-input id="bcc_copy" name="bcc_copy" type="checkbox"
|
||||
class="mt-1 block"
|
||||
:value="old('bcc_copy')" required autofocus
|
||||
autocomplete="bcc_copy"
|
||||
x-model="options.bcc_copy"/>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user