|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/lecturebazaar.com/resources/js/admin/ |
Upload File : |
(function ($) {
"use strict";
$('body').on('change', '#banSwitch', function () {
if (this.checked) {
$('#banSection').removeClass('d-none');
} else {
$('#banSection').addClass('d-none');
}
});
$('body').on('change', '.js-user-bank-input', function (e) {
e.preventDefault();
const $optionSelected = $(this).find("option:selected");
const specifications = $optionSelected.attr('data-specifications')
const $card = $('.js-bank-specifications-card');
let html = '';
if (specifications) {
Object.entries(JSON.parse(specifications)).forEach(([index, item], key) => {
html += '<div class="form-group">\n' +
' <label class="font-weight-500 text-dark-blue">' + item + '</label>\n' +
' <input type="text" name="bank_specifications[' + index + ']" value="" class="form-control"/>\n' +
' </div>'
})
}
$card.html(html);
});
$('body').on('change', '#enable_registration_bonusSwitch', function () {
const $field = $('.js-registration-bonus-field')
if (this.checked) {
$field.removeClass('d-none');
} else {
$field.addClass('d-none');
}
});
})(jQuery);