49 lines
2.8 KiB
PHP
49 lines
2.8 KiB
PHP
<x-app-layout>
|
|
<div style="max-width: 600px; margin: 40px auto; background: white; padding: 30px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);">
|
|
<h2 style="font-size: 24px; font-weight: 900; color: #0052cc; margin-bottom: 20px;">Edit Isyarat</h2>
|
|
|
|
<!-- Form Update -->
|
|
<form action="{{ route('admin.gesture.update', $gesture->id) }}" method="POST" enctype="multipart/form-data">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<!-- Input Huruf/Kata -->
|
|
<div style="margin-bottom: 15px;">
|
|
<label style="display: block; font-size: 12px; font-weight: 800; color: #64748b; margin-bottom: 5px;">Huruf / Kata</label>
|
|
<input type="text" name="huruf_kata" value="{{ old('huruf_kata', $gesture->huruf_kata) }}"
|
|
style="width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px;" required>
|
|
</div>
|
|
|
|
<!-- Input Gambar (UBAH JADI gambar_contoh) -->
|
|
<div style="margin-bottom: 15px;">
|
|
<label style="display: block; font-size: 12px; font-weight: 800; color: #64748b; margin-bottom: 5px;">Ganti Gambar Isyarat</label>
|
|
<input type="file" name="gambar_contoh" accept="image/*"
|
|
style="width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px;">
|
|
|
|
@if($gesture->gambar_contoh && $gesture->gambar_contoh !== 'default_gesture.png')
|
|
<div style="margin-top: 10px;">
|
|
<p style="font-size: 10px; color: #64748b;">Gambar saat ini:</p>
|
|
<img src="{{ asset('storage/' . $gesture->gambar_contoh) }}" alt="Preview" style="width: 100px; border-radius: 8px; margin-top: 5px;">
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Input Deskripsi -->
|
|
<div style="margin-bottom: 20px;">
|
|
<label style="display: block; font-size: 12px; font-weight: 800; color: #64748b; margin-bottom: 5px;">Deskripsi</label>
|
|
<textarea name="deskripsi" rows="4"
|
|
style="width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px;">{{ old('deskripsi', $gesture->deskripsi) }}</textarea>
|
|
</div>
|
|
|
|
<!-- Tombol Aksi -->
|
|
<button type="submit"
|
|
style="background: #0052cc; color: white; padding: 12px 24px; border-radius: 12px; border: none; font-weight: 800; cursor: pointer;">
|
|
Simpan Perubahan
|
|
</button>
|
|
<a href="{{ route('admin.gesture') }}"
|
|
style="margin-left: 15px; color: #64748b; font-size: 12px; font-weight: 800; text-decoration: none;">
|
|
Batal
|
|
</a>
|
|
</form>
|
|
</div>
|
|
</x-app-layout> |