Menambahkan fitur nama pimpinan bisa lebih dari satu
This commit is contained in:
@@ -41,6 +41,31 @@
|
||||
addDeleteListeners();
|
||||
});
|
||||
|
||||
const namaPimpinanDiv = document.getElementById('detail_nama_pimpinan');
|
||||
|
||||
document.getElementById("tambah_nama_pimpinan").addEventListener("click", function() {
|
||||
const newDiv = document.createElement("div");
|
||||
newDiv.className = "flex flex-col lg:flex-row gap-2 items-baseline lg:items-center w-full";
|
||||
newDiv.innerHTML = `
|
||||
<label class="form-label max-w-56">
|
||||
Nama Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nama_pimpinan[nama_pimpinan][]" value="">
|
||||
</div>
|
||||
<label class="form-label max-w-56">
|
||||
Nomor HP Pimpinan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="input" type="text" name="detail_nomor_hp_pimpinan[nomor_hp_pimpinan][]" value="">
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-xs delete-button">Hapus</button>
|
||||
`;
|
||||
namaPimpinanDiv.appendChild(newDiv);
|
||||
|
||||
addDeleteListeners();
|
||||
});
|
||||
|
||||
const namaPicReviewerDiv = document.getElementById('detail_nama_pic_reviewer');
|
||||
|
||||
document.getElementById("tambah_nama_pic_reviewer").addEventListener("click", function() {
|
||||
|
||||
Reference in New Issue
Block a user