Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/Http/Controllers/Dashboard/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,17 @@ public function postMail()

execute(new UpdateConfigCommand($config));

$setting = app(Repository::class);
$parameters = Binput::get('setting');

if (isset($parameters['mail_signature'])) {
if ($mail_signature = Binput::get('setting.mail_signature', null, false, false)) {
$setting->set('mail_signature', $mail_signature);
} else {
$setting->delete('mail_signature');
}
}

return cachet_redirect('dashboard.settings.mail')
->withInput(Binput::all())
->withSuccess(trans('dashboard.notifications.awesome'));
Expand Down
1 change: 1 addition & 0 deletions resources/lang/de-DE/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
'subject' => 'Test-Benachrichtigung von Cachet',
'body' => 'Dies ist eine Test-Benachrichtigung von Cachet.',
],
'signature' => 'Benutzerdefinierte HTML E-Mail Signatur',
],
'security' => [
'security' => 'Sicherheit',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
'subject' => 'Test notification from Cachet',
'body' => 'This is a test notification from Cachet.',
],
'signature' => 'Custom HTML E-Mail Signature',
],
'security' => [
'security' => 'Security',
Expand Down
4 changes: 4 additions & 0 deletions resources/views/dashboard/settings/mail.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
<label>{{ trans('forms.setup.mail_password') }}</label>
<input type="password" class="form-control" name="config[mail_password]" value="{{ Binput::old('config.mail_password') }}" autocomplete="off" placeholder="{{ trans('forms.setup.mail_password') }}">
</div>
<div class="form-group">
<label>{{ trans('dashboard.settings.mail.signature') }}</label>
<textarea name="setting[mail_signature]" class="form-control" rows="10" placeholder="{{ trans('dashboard.settings.mail.signature') }}">{{ Config::get('setting.mail_signature') }}</textarea>
</div>
</fieldset>

<div class="row">
Expand Down
1 change: 1 addition & 0 deletions resources/views/notifications/incident/new.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@lang('Thanks,')<br>
{{ Config::get('setting.app_name') }}

{!! Config::get('setting.mail_signature') !!}
@include('notifications.partials.subscription')

@endcomponent
2 changes: 2 additions & 0 deletions resources/views/notifications/partials/subscription.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{!! Config::get('setting.mail_signature') !!}

@component('mail::subcopy')
[{{ $unsubscribeText }}]({{ $unsubscribeUrl }}) &mdash; [{{ $manageSubscriptionText }}]({{ $manageSubscriptionUrl }})
@endcomponent
2 changes: 2 additions & 0 deletions resources/views/vendor/notifications/email.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
@lang('Regards'),<br>{{ setting('app_name', config('app.name')) }}
@endif

{!! Config::get('setting.mail_signature') !!}

{{-- Subcopy --}}
@isset($actionText)
@component('mail::subcopy')
Expand Down