Update email preferences form

This commit is contained in:
Benjamin Beganović 2024-01-19 15:20:23 +01:00
parent 89309ac713
commit c1993f2142

View File

@ -9,27 +9,33 @@ ctrans('texts.preferences')) @section('body')
alt="{{ $company->present()->name() }}"
/>
<h1 class="text-center text-2xl mt-10">
{{ ctrans('texts.email_settings') }}
{{ ctrans('texts.email_preferences') }}
</h1>
<form class="my-4" method="post">
<form class="my-4 flex flex-col items-center text-center" method="post">
@csrf @method('put')
<label for="receive_emails">
<input type="checkbox" name="receive_emails"
id="receive_emails"
{{ $receive_emails ? 'checked' : '' }} />
@if($receive_emails)
<p>{{ ctrans('texts.subscribe_help') }}</p>
<span>
{{ ctrans('texts.resubscribe') }}
</span>
</label>
<div class="block my-4">
<button class="button button-secondary button-block">
{{ ctrans('texts.save') }}
<button
name="action"
value="unsubscribe"
class="button button-secondary mt-4"
>
{{ ctrans('texts.unsubscribe') }}
</button>
</div>
@else
<p>{{ ctrans('texts.unsubscribe_help') }}</p>
<button
name="action"
value="subscribe"
class="button button-secondary mt-4"
>
{{ ctrans('texts.subscribe') }}
</button>
@endif
</form>
</div>
</div>