@extends('client.layouts.dashboard') @section('title', 'Edit Template') @section('content')
Back to Templates
Edit Template
{{ ucfirst($template->type) }}
@if($template->isDerived())
Derived from SuperAdmin template
@endif
@csrf @method('PUT') @php $supportsWhatsAppMedia = in_array($template->channel, ['whatsapp', 'both'], true); @endphp
Template name is managed by SuperAdmin
@error('content')
{{ $message }}
@enderror
Available placeholders: {name}, {phone}, {date}, {time}
@if($supportsWhatsAppMedia)
WhatsApp Media
@error('media_type')
{{ $message }}
@enderror
Use URL or upload a file. If both are provided, uploaded file is used.
@error('media_url')
{{ $message }}
@enderror
Supported: image, video, and documents (max 100MB).
@error('media_file')
{{ $message }}
@enderror
@if($template->media_url)
Current media: Open current file
@endif
@else
Media upload is available only for templates with WhatsApp or Both channel.
@endif
is_active) ? 'checked' : '' }}>
Inactive templates won't be used for auto-replies
Cancel
Live Preview
Message Preview (with sample data):
{{ $template->content }}
@endsection @section('scripts') @endsection