fix error
This commit is contained in:
parent
5fe5273865
commit
685beea7de
@ -282,12 +282,16 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<!-- Modal Edit Template -->
|
<!-- Modal Edit Template - Fixed Version -->
|
||||||
@foreach ($templates as $template)
|
@foreach ($templates as $template)
|
||||||
<div id="modalEdit{{ $template->id }}" class="fixed inset-0 hidden items-center justify-center z-50">
|
<div id="modalEdit{{ $template->id }}" class="fixed inset-0 hidden items-center justify-center z-50">
|
||||||
<div class="absolute inset-0 bg-black opacity-50 closeEditOverlay" data-id="{{ $template->id }}"></div>
|
<div class="absolute inset-0 bg-black opacity-50 closeEditOverlay" data-id="{{ $template->id }}"></div>
|
||||||
<div class="bg-white rounded-lg shadow-lg w-full max-w-md z-50 flex flex-col max-h-[90vh]">
|
<div class="bg-white rounded-lg shadow-lg w-full max-w-md z-50 flex flex-col max-h-[90vh]">
|
||||||
|
|
||||||
|
<!-- PINDAHKAN FORM KE LUAR AGAR MENCAKUP SEMUA ELEMEN -->
|
||||||
|
<form id="editForm{{ $template->id }}" action="{{ route('templates.update', $template->id) }}" method="POST" enctype="multipart/form-data" class="h-full flex flex-col">
|
||||||
|
@csrf @method('PUT')
|
||||||
|
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div class="p-4 border-b sticky top-0 bg-white z-10">
|
<div class="p-4 border-b sticky top-0 bg-white z-10">
|
||||||
<h5 class="text-lg font-medium">Edit Template</h5>
|
<h5 class="text-lg font-medium">Edit Template</h5>
|
||||||
@ -295,9 +299,6 @@
|
|||||||
|
|
||||||
<!-- Scrollable content -->
|
<!-- Scrollable content -->
|
||||||
<div class="p-4 space-y-4 overflow-y-auto flex-1">
|
<div class="p-4 space-y-4 overflow-y-auto flex-1">
|
||||||
<form action="{{ route('templates.update', $template->id) }}" method="POST"
|
|
||||||
enctype="multipart/form-data" class="h-full flex flex-col">
|
|
||||||
@csrf @method('PUT')
|
|
||||||
<div class="flex-1 space-y-4">
|
<div class="flex-1 space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium">Nama Template</label>
|
<label class="block text-sm font-medium">Nama Template</label>
|
||||||
@ -386,18 +387,19 @@
|
|||||||
<input type="file" name="foto" class="w-full p-2 border rounded" accept="image/*">
|
<input type="file" name="foto" class="w-full p-2 border rounded" accept="image/*">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer -->
|
|
||||||
|
<!-- Footer - SEKARANG DI DALAM FORM -->
|
||||||
<div class="p-4 border-t flex justify-end space-x-2 sticky bottom-0 bg-white z-10">
|
<div class="p-4 border-t flex justify-end space-x-2 sticky bottom-0 bg-white z-10">
|
||||||
<button type="button" class="bg-gray-300 text-black px-3 py-1 rounded closeEditBtn"
|
<button type="button" class="bg-gray-300 text-black px-3 py-1 rounded closeEditBtn"
|
||||||
data-id="{{ $template->id }}">Batal</button>
|
data-id="{{ $template->id }}">Batal</button>
|
||||||
<button class="bg-blue-600 text-white px-3 py-1 rounded">Simpan Perubahan</button>
|
<!-- TAMBAHKAN type="submit" -->
|
||||||
|
<button type="submit" class="bg-blue-600 text-white px-3 py-1 rounded">Simpan Perubahan</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
@endforeach
|
||||||
@endforeach
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user