@extends('layouts.app') @section('title', __('Edit template').' — '.$template->name) @section('page-title', $template->name) @section('page-subtitle', $template->key) @push('head') {{-- Quill (WYSIWYG) --}} @endpush @section('content') @include('super-admin._nav') @php $localeNames = ['en' => 'English', 'fr' => 'Français', 'nl' => 'Nederlands', 'de' => 'Deutsch', 'ar' => 'العربية']; @endphp
{{ __('Back to templates') }}
@csrf @method('PATCH') {{-- Locale tabs --}}
@foreach($locales as $loc) @endforeach
@foreach($locales as $loc)
{{-- Translate-from picker --}}
{{ __('AI translate') }}: @foreach($locales as $src) @if($src !== $loc) @endif @endforeach {{ __('Translating…') }}
subject ?? [])[$loc] ?? '') }}">
{{-- Quill mounts here --}} {{-- Hidden field that gets synced from Quill on input + submit --}}
@endforeach
{{-- Errors --}} @if($errors->any())
    @foreach($errors->all() as $err)
  • • {{ $err }}
  • @endforeach
@endif {{-- Translate / preview status messages --}}
{{-- Variables --}}

{{ __('Available variables') }}

{{ __('Use these placeholders in subject and body — they will be replaced when the email is sent.') }}

@foreach(($template->variables ?? []) as $v) @php $tag = '{{ '.$v.' }}'; @endphp {{ $tag }} @endforeach @if(empty($template->variables)) {{ __('No variables declared.') }} @endif
{{-- Send test --}}
@csrf
@error('to')

{{ $message }}

@enderror
{{-- Preview modal --}}

{{ __('Email preview') }}

@push('scripts') @endpush @endsection