feat: add a required field
parent
c0cf91e0f9
commit
9f2d413f7d
|
|
@ -81,8 +81,8 @@
|
|||
</div>
|
||||
<form id="form-edit-rumah" class="mt-6 space-y-4">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">RT</legend>
|
||||
<input id="edit-rt" name="rt" type="text" class="input w-full" placeholder="001" />
|
||||
<legend class="fieldset-legend">RT <span class="text-red-500">*</span></legend>
|
||||
<input id="edit-rt" name="rt" type="text" class="input w-full" placeholder="001" required />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Nama Pemilik Rumah</legend>
|
||||
|
|
@ -90,9 +90,9 @@
|
|||
placeholder="Nama lengkap" />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Alamat</legend>
|
||||
<legend class="fieldset-legend">Alamat <span class="text-red-500">*</span></legend>
|
||||
<textarea id="edit-alamat" name="alamat" class="textarea w-full" rows="4"
|
||||
placeholder="Tulis alamat lengkap"></textarea>
|
||||
placeholder="Tulis alamat lengkap" required></textarea>
|
||||
</fieldset>
|
||||
<div class="modal-action">
|
||||
<button type="button" class="btn rounded-full" onclick="modal_edit.close()">
|
||||
|
|
|
|||
|
|
@ -63,16 +63,16 @@
|
|||
</div>
|
||||
<form id="form-create-rumah" class="space-y-4 mt-6">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">No RT</legend>
|
||||
<input id="create-rt" name="rt" type="text" class="input w-full" placeholder="Masukkan No RT" />
|
||||
<legend class="fieldset-legend">No RT <span class="text-red-500">*</span></legend>
|
||||
<input id="create-rt" name="rt" type="text" class="input w-full" placeholder="Masukkan No RT" required />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Nama Pemilik Rumah</legend>
|
||||
<input id="create-nama-pemilik" name="nama_pemilik" type="text" class="input w-full" placeholder="Masukkan nama pemilik rumah" />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Alamat</legend>
|
||||
<textarea id="create-alamat" name="alamat" class="textarea w-full" rows="4" placeholder="Masukkan alamat"></textarea>
|
||||
<legend class="fieldset-legend">Alamat <span class="text-red-500">*</span></legend>
|
||||
<textarea id="create-alamat" name="alamat" class="textarea w-full" rows="4" placeholder="Masukkan alamat" required></textarea>
|
||||
</fieldset>
|
||||
<div class="modal-action">
|
||||
<button type="button" class="btn rounded-full" onclick="modal_create.close()">
|
||||
|
|
@ -259,16 +259,16 @@
|
|||
</div>
|
||||
<form id="form-edit-rumah" class="space-y-4 mt-6">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">No RT</legend>
|
||||
<input id="edit-rt" name="rt" type="text" class="input w-full" placeholder="Masukkan No RT" />
|
||||
<legend class="fieldset-legend">No RT <span class="text-red-500">*</span></legend>
|
||||
<input id="edit-rt" name="rt" type="text" class="input w-full" placeholder="Masukkan No RT" required />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Nama Pemilik Rumah</legend>
|
||||
<input id="edit-nama-pemilik" name="nama_pemilik" type="text" class="input w-full" placeholder="Masukkan nama pemilik rumah" />
|
||||
</fieldset>
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Alamat</legend>
|
||||
<textarea id="edit-alamat" name="alamat" class="textarea w-full" rows="4" placeholder="Masukkan alamat"></textarea>
|
||||
<legend class="fieldset-legend">Alamat <span class="text-red-500">*</span></legend>
|
||||
<textarea id="edit-alamat" name="alamat" class="textarea w-full" rows="4" placeholder="Masukkan alamat" required></textarea>
|
||||
</fieldset>
|
||||
<div class="modal-action">
|
||||
<button type="button" class="btn rounded-full" onclick="modal_edit.close()">
|
||||
|
|
@ -352,7 +352,7 @@
|
|||
modal_edit.showModal();
|
||||
});
|
||||
|
||||
$('#BtnSimpanRumahRw').on('click', function (e) {
|
||||
$('#form-create-rumah').on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
modal_create.close();
|
||||
|
|
@ -379,7 +379,7 @@
|
|||
});
|
||||
});
|
||||
|
||||
$('#BtnUpdateRumahRw').on('click', function (e) {
|
||||
$('#form-edit-rumah').on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
modal_edit.close();
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
<dialog id="modal_edit" class="modal modal-bottom sm:modal-middle">
|
||||
<div class="modal-box w-full sm:max-w-lg">
|
||||
<button class="btn btn-sm btn-circle absolute right-2 top-2" onclick="modal_edit.close()">✕</button>
|
||||
<h3 class="text-lg font-bold mb-4">Tambah Edukasi</h3>
|
||||
<h3 class="text-lg font-bold mb-4">Edit Edukasi</h3>
|
||||
<form id="form_edit" enctype="multipart/form-data">
|
||||
<input type="hidden" id="edit_id" name="Id">
|
||||
<div class="space-y-4">
|
||||
|
|
|
|||
|
|
@ -62,12 +62,12 @@
|
|||
<h3 class="text-lg font-bold mb-4">Tambah FAQ</h3>
|
||||
<form id="form_tambah">
|
||||
<div class="space-y-4">
|
||||
<fieldset class="fieldset text-base">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Pertanyaan <span class="text-red-500">*</span></legend>
|
||||
<textarea name="Pertanyaan" class="textarea textarea-bordered w-full h-32"
|
||||
placeholder="Masukkan pertanyaan" required></textarea>
|
||||
</fieldset>
|
||||
<fieldset class="fieldset text-base">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Jawaban <span class="text-red-500">*</span></legend>
|
||||
<textarea name="Jawaban" class="textarea textarea-bordered w-full h-32"
|
||||
placeholder="Masukkan jawaban" required></textarea>
|
||||
|
|
@ -94,16 +94,16 @@
|
|||
<dialog id="modal_edit" class="modal modal-bottom sm:modal-middle">
|
||||
<div class="modal-box w-full sm:max-w-lg">
|
||||
<button class="btn btn-sm btn-circle absolute right-2 top-2" onclick="modal_edit.close()">✕</button>
|
||||
<h3 class="text-lg font-bold mb-4">Tambah FAQ</h3>
|
||||
<h3 class="text-lg font-bold mb-4">Edit FAQ</h3>
|
||||
<form id="form_edit">
|
||||
<input type="hidden" id="edit_id" name="Id">
|
||||
<div class="space-y-4">
|
||||
<fieldset class="fieldset text-base">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Pertanyaan <span class="text-red-500">*</span></legend>
|
||||
<textarea id="edit_pertanyaan" name="Pertanyaan" class="textarea textarea-bordered w-full h-32"
|
||||
placeholder="Masukkan pertanyaan" required></textarea>
|
||||
</fieldset>
|
||||
<fieldset class="fieldset text-base">
|
||||
<fieldset class="fieldset">
|
||||
<legend class="fieldset-legend">Jawaban <span class="text-red-500">*</span></legend>
|
||||
<textarea id="edit_jawaban" name="Jawaban" class="textarea textarea-bordered w-full h-32"
|
||||
placeholder="Masukkan jawaban" required></textarea>
|
||||
|
|
|
|||
Loading…
Reference in New Issue