Verify CAPTCHA
This commit is contained in:
parent
946b30b486
commit
9b3c970bba
7 changed files with 132 additions and 58 deletions
|
@ -19,11 +19,23 @@ import '@fortawesome/fontawesome-free/js/regular'
|
|||
import '@fortawesome/fontawesome-free/js/brands'
|
||||
|
||||
// Friendly captcha
|
||||
import "friendly-challenge/widget";
|
||||
import { WidgetInstance } from 'friendly-challenge';
|
||||
|
||||
function doneCallback(solution) {
|
||||
$('#registration_form_captcha_solution').val(solution);
|
||||
}
|
||||
|
||||
const element = document.querySelector('#captcha');
|
||||
const options = {
|
||||
doneCallback: doneCallback,
|
||||
sitekey: 'FCMVL79DP1G5K1K0',
|
||||
}
|
||||
const widget = new WidgetInstance(element, options);
|
||||
widget.start()
|
||||
|
||||
// Dsiplay Filename when uploading
|
||||
document.querySelector('.custom-file-input').addEventListener('change',function(e){
|
||||
var fileName = document.getElementById("offering_form_photo").files[0].name;
|
||||
document.querySelector('.custom-file-input').addEventListener('change', function (e) {
|
||||
var fileName = document.getElementById('offering_form_photo').files[0].name;
|
||||
var nextSibling = e.target.nextElementSibling
|
||||
nextSibling.innerText = fileName
|
||||
})
|
||||
|
|
Reference in a new issue