perubahan gambar
This commit is contained in:
parent
f0588b77fe
commit
7034f1a669
742
composer.lock
generated
742
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -254,8 +254,10 @@ form p {
|
|||||||
|
|
||||||
.btn-otp,
|
.btn-otp,
|
||||||
.btn-foto {
|
.btn-foto {
|
||||||
width: fit-content;
|
/* width: fit-content; */
|
||||||
height: fit-content;
|
width: 110px;
|
||||||
|
/* height: fit-content; */
|
||||||
|
height: 53px;
|
||||||
margin-left: 2%;
|
margin-left: 2%;
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
padding: 0.85rem 0.9rem;
|
padding: 0.85rem 0.9rem;
|
||||||
|
@ -355,6 +355,51 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
startButtonEkyc.style.display = "none";
|
startButtonEkyc.style.display = "none";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//gambar untuk foto wajah
|
||||||
|
var uploadInput = document.getElementById('fotoEkyc');
|
||||||
|
var imageHolder = document.getElementById('imageHolderEkyc');
|
||||||
|
var gambarButton = document.getElementById('gambarEkyc');
|
||||||
|
|
||||||
|
gambarButton.addEventListener('click', function() {
|
||||||
|
uploadInput.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploadInput.addEventListener('change', function(event) {
|
||||||
|
var file = event.target.files[0];
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function() {
|
||||||
|
imageHolder.src = reader.result; // Mengubah sumber gambar pada elemen img dengan ID imageHolderEkyc
|
||||||
|
};
|
||||||
|
|
||||||
|
reader.readAsDataURL(file); // Membaca file gambar sebagai URL data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//gambar foto ktp
|
||||||
|
var uploadInput = document.getElementById('fotoKtp');
|
||||||
|
var imageHolder = document.getElementById('imageHolderKtp');
|
||||||
|
var gambarButton = document.getElementById('gambarKtp');
|
||||||
|
|
||||||
|
gambarButton.addEventListener('click', function() {
|
||||||
|
uploadInput.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
uploadInput.addEventListener('change', function(event) {
|
||||||
|
var file = event.target.files[0];
|
||||||
|
|
||||||
|
if (file) {
|
||||||
|
var reader = new FileReader();
|
||||||
|
reader.onload = function() {
|
||||||
|
imageHolder.src = reader.result; // Mengubah sumber gambar pada elemen img dengan ID imageHolderEkyc
|
||||||
|
};
|
||||||
|
|
||||||
|
reader.readAsDataURL(file); // Membaca file gambar sebagai URL data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
/******************************************
|
/******************************************
|
||||||
* END KTP & E-KYC CAMERA
|
* END KTP & E-KYC CAMERA
|
||||||
|
@ -254,10 +254,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<video id="webcamKtp" autoplay playsinline></video>
|
<video id="webcamKtp" autoplay playsinline></video>
|
||||||
<div id="foto-preview-ktp"></div>
|
<div id="foto-preview-ktp"></div>
|
||||||
<input type="hidden" id="fotoKtp" name="ktp" required>
|
<input type="file" id="fotoKtp" name="wajah" accept="image/*" required style="display: none">
|
||||||
<div style="display: flex; margin-top: 1rem">
|
<div style="display: flex; margin-top: 1rem; gap:10px">
|
||||||
<button type="button" class="btn-foto" id="startButtonKtp"
|
<button type="button" class="btn-foto" id="startButtonKtp"
|
||||||
data-state="off">Mulai Kamera</button>
|
data-state="off">Mulai Kamera</button>
|
||||||
|
<button type="button" class="btn-foto" id="gambarKtp"
|
||||||
|
data-state="off">pilih Gambar</button>
|
||||||
<button type="button" class="btn-foto"
|
<button type="button" class="btn-foto"
|
||||||
id="captureButtonKtp">Ambil Foto</button>
|
id="captureButtonKtp">Ambil Foto</button>
|
||||||
<button type="button" class="btn-foto"
|
<button type="button" class="btn-foto"
|
||||||
@ -276,10 +278,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<video id="webcamEkyc" autoplay playsinline></video>
|
<video id="webcamEkyc" autoplay playsinline></video>
|
||||||
<div id="foto-preview-ekyc"></div>
|
<div id="foto-preview-ekyc"></div>
|
||||||
<input type="hidden" id="fotoEkyc" name="wajah" required>
|
<input type="file" id="fotoEkyc" name="wajah" accept="image/*" required style="display: none">
|
||||||
<div style="display: flex; margin-top: 1rem">
|
<div style="display: flex; margin-top: 1rem gap: 10px">
|
||||||
<button type="button" class="btn-foto" id="startButtonEkyc"
|
<button type="button" class="btn-foto" id="startButtonEkyc"
|
||||||
data-state="off">Mulai Kamera</button>
|
data-state="off">Mulai Kamera</button>
|
||||||
|
<button type="button" class="btn-foto" id="gambarEkyc"
|
||||||
|
data-state="off">Pilih gambar</button>
|
||||||
<button type="button" class="btn-foto"
|
<button type="button" class="btn-foto"
|
||||||
id="captureButtonEkyc">Ambil Foto</button>
|
id="captureButtonEkyc">Ambil Foto</button>
|
||||||
<button type="button" class="btn-foto"
|
<button type="button" class="btn-foto"
|
||||||
|
Loading…
Reference in New Issue
Block a user