HEX
Server: LiteSpeed
System: Linux server.zepintelhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: enamadmin (1026)
PHP: 8.2.30
Disabled: exec,system,passthru,shell_exec,proc_open,popen,apache_child_terminate
Upload Files
File: /home/enamadmin/public_html/elearning_plateforme1/lib/form/amd/build/defaultcustom.min.js
/**
 * Functionality for the form element defaultcustom
 *
 * @module     core_form/defaultcustom
 * @copyright  2017 Marina Glancy
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 * @since      3.3
 */
define("core_form/defaultcustom",["jquery"],(function($){$("body").on("change","input[data-defaultcustom=true]",(function(event){var element=$(event.target),defaultvalue=JSON.parse(element.attr("data-defaultvalue")),customvalue=JSON.parse(element.attr("data-customvalue")),type=element.attr("data-type"),form=element.closest("form"),elementName=element.attr("name").replace(/\[customize\]$/,"[value]"),newvalue=element.prop("checked")?customvalue:defaultvalue;"text"===type?form.find('[name="'+elementName+'"]').val(newvalue):"date_selector"===type?(form.find('[name="'+elementName+'[day]"]').val(newvalue.day),form.find('[name="'+elementName+'[month]"]').val(newvalue.month),form.find('[name="'+elementName+'[year]"]').val(newvalue.year)):"date_time_selector"===type&&(form.find('[name="'+elementName+'[day]"]').val(newvalue.day),form.find('[name="'+elementName+'[month]"]').val(newvalue.month),form.find('[name="'+elementName+'[year]"]').val(newvalue.year),form.find('[name="'+elementName+'[hour]"]').val(newvalue.hour),form.find('[name="'+elementName+'[minute]"]').val(newvalue.minute))}))}));

//# sourceMappingURL=defaultcustom.min.js.map