45 lines
2.4 KiB
PHP
45 lines
2.4 KiB
PHP
@extends('layouts.admin')
|
|
|
|
@section('title', __('Edit') . ' — ' . $page->title)
|
|
|
|
@section('mobile_title', __('Edit page'))
|
|
|
|
@section('content')
|
|
<div class="mx-auto max-w-3xl">
|
|
<div class="mb-8">
|
|
<a href="{{ route('admin.pages.index') }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-500">← {{ __('Back to pages') }}</a>
|
|
<h1 class="mt-4 text-2xl font-semibold text-slate-900">{{ __('Edit page') }}</h1>
|
|
<p class="mt-2 rounded-lg bg-slate-50 px-3 py-2 font-mono text-xs text-slate-700">
|
|
{{ __('Public URL') }}: <a href="{{ route('public.page', ['publicPage' => $page]) }}" class="text-indigo-600 hover:underline" target="_blank" rel="noopener">{{ url('/r/'.$page->slug) }}</a>
|
|
</p>
|
|
@can('update', $page)
|
|
<p class="mt-3">
|
|
<a href="{{ route('admin.pages.mailwizz.edit', $page) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-500">{{ __('Mailwizz integration') }} →</a>
|
|
</p>
|
|
@endcan
|
|
</div>
|
|
|
|
<form action="{{ route('admin.pages.update', $page) }}" method="post" enctype="multipart/form-data" class="rounded-xl border border-slate-200 bg-white p-6 shadow-sm sm:p-8" novalidate>
|
|
@csrf
|
|
@method('PUT')
|
|
@if ($errors->any())
|
|
<div class="mb-6 rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800" role="alert">
|
|
<p class="font-medium">{{ __('Please fix the following:') }}</p>
|
|
<ul class="mt-2 list-inside list-disc space-y-1">
|
|
@foreach ($errors->all() as $message)
|
|
<li>{{ $message }}</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|
|
@include('admin.pages._form', ['page' => $page])
|
|
<div class="mt-8 flex gap-3">
|
|
<button type="submit" class="rounded-lg bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500">
|
|
{{ __('Save changes') }}
|
|
</button>
|
|
<a href="{{ route('admin.pages.index') }}" class="rounded-lg border border-slate-300 bg-white px-4 py-2.5 text-sm font-semibold text-slate-700 hover:bg-slate-50">{{ __('Cancel') }}</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endsection
|