2021-03-05 03:08:47 +00:00
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
2022-07-09 15:45:08 +00:00
|
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
2021-03-05 03:08:47 +00:00
|
|
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2019-05-02 23:00:05 +00:00
|
|
|
// Some Global Values
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdlvxu_required = false;
|
|
|
|
jform_vvvvwdnvxv_required = false;
|
|
|
|
jform_vvvvwdpvxw_required = false;
|
|
|
|
jform_vvvvwdrvxx_required = false;
|
|
|
|
jform_vvvvwdsvxy_required = false;
|
|
|
|
jform_vvvvwdtvxz_required = false;
|
|
|
|
jform_vvvvwdyvya_required = false;
|
|
|
|
jform_vvvvwdyvyb_required = false;
|
2019-01-31 21:44:21 +00:00
|
|
|
|
2019-05-02 23:00:05 +00:00
|
|
|
// Initial Script
|
2024-03-09 19:52:51 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', function()
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datalenght_vvvvwdl = jQuery("#jform_datalenght").val();
|
|
|
|
var has_defaults_vvvvwdl = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdl(datalenght_vvvvwdl,has_defaults_vvvvwdl);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var datadefault_vvvvwdn = jQuery("#jform_datadefault").val();
|
|
|
|
var has_defaults_vvvvwdn = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdn(datadefault_vvvvwdn,has_defaults_vvvvwdn);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdp = jQuery("#jform_datatype").val();
|
|
|
|
var has_defaults_vvvvwdp = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdp(datatype_vvvvwdp,has_defaults_vvvvwdp);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2020-07-07 15:13:04 +00:00
|
|
|
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdr(datatype_vvvvwdr,has_defaults_vvvvwdr);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
2019-12-03 02:17:35 +00:00
|
|
|
var has_defaults_vvvvwds = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwds = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwds(has_defaults_vvvvwds,datatype_vvvvwds);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdt = jQuery("#jform_datatype").val();
|
|
|
|
var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdt(datatype_vvvvwdt,has_defaults_vvvvwdt);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
|
|
|
var store_vvvvwdv = jQuery("#jform_store").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
|
2020-07-07 15:13:04 +00:00
|
|
|
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
vvvvwdv(store_vvvvwdv,datatype_vvvvwdv,has_defaults_vvvvwdv);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
2019-12-03 02:17:35 +00:00
|
|
|
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
var store_vvvvwdw = jQuery("#jform_store").val();
|
|
|
|
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdw(datatype_vvvvwdw,store_vvvvwdw,has_defaults_vvvvwdw);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
2019-12-03 02:17:35 +00:00
|
|
|
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2022-07-09 15:16:21 +00:00
|
|
|
var store_vvvvwdx = jQuery("#jform_store").val();
|
|
|
|
var datatype_vvvvwdx = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwdx(has_defaults_vvvvwdx,store_vvvvwdx,datatype_vvvvwdx);
|
|
|
|
|
|
|
|
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdy(has_defaults_vvvvwdy);
|
2019-05-02 23:00:05 +00:00
|
|
|
});
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdl function
|
|
|
|
function vvvvwdl(datalenght_vvvvwdl,has_defaults_vvvvwdl)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datalenght_vvvvwdl) && datalenght_vvvvwdl.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdl = datalenght_vvvvwdl;
|
|
|
|
var datalenght_vvvvwdl = [];
|
|
|
|
datalenght_vvvvwdl.push(temp_vvvvwdl);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datalenght_vvvvwdl))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datalenght_vvvvwdl = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datalenght = datalenght_vvvvwdl.some(datalenght_vvvvwdl_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdl) && has_defaults_vvvvwdl.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdl = has_defaults_vvvvwdl;
|
|
|
|
var has_defaults_vvvvwdl = [];
|
|
|
|
has_defaults_vvvvwdl.push(temp_vvvvwdl);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdl))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdl = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdl.some(has_defaults_vvvvwdl_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datalenght && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').show();
|
|
|
|
// add required attribute to datalenght_other field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdlvxu_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght_other',0);
|
|
|
|
jQuery('#jform_datalenght_other').prop('required','required');
|
|
|
|
jQuery('#jform_datalenght_other').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datalenght_other').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdlvxu_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght_other').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datalenght_other field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdlvxu_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght_other',1);
|
|
|
|
jQuery('#jform_datalenght_other').removeAttr('required');
|
|
|
|
jQuery('#jform_datalenght_other').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datalenght_other').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdlvxu_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdl Some function
|
|
|
|
function datalenght_vvvvwdl_SomeFunc(datalenght_vvvvwdl)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datalenght_vvvvwdl == 'Other')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdl Some function
|
|
|
|
function has_defaults_vvvvwdl_SomeFunc(has_defaults_vvvvwdl)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdl == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdn function
|
|
|
|
function vvvvwdn(datadefault_vvvvwdn,has_defaults_vvvvwdn)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datadefault_vvvvwdn) && datadefault_vvvvwdn.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdn = datadefault_vvvvwdn;
|
|
|
|
var datadefault_vvvvwdn = [];
|
|
|
|
datadefault_vvvvwdn.push(temp_vvvvwdn);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datadefault_vvvvwdn))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datadefault_vvvvwdn = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datadefault = datadefault_vvvvwdn.some(datadefault_vvvvwdn_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdn) && has_defaults_vvvvwdn.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdn = has_defaults_vvvvwdn;
|
|
|
|
var has_defaults_vvvvwdn = [];
|
|
|
|
has_defaults_vvvvwdn.push(temp_vvvvwdn);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdn))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdn = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdn.some(has_defaults_vvvvwdn_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datadefault && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').show();
|
|
|
|
// add required attribute to datadefault_other field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdnvxv_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datadefault_other',0);
|
|
|
|
jQuery('#jform_datadefault_other').prop('required','required');
|
|
|
|
jQuery('#jform_datadefault_other').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datadefault_other').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdnvxv_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault_other').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datadefault_other field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdnvxv_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datadefault_other',1);
|
|
|
|
jQuery('#jform_datadefault_other').removeAttr('required');
|
|
|
|
jQuery('#jform_datadefault_other').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datadefault_other').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdnvxv_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdn Some function
|
|
|
|
function datadefault_vvvvwdn_SomeFunc(datadefault_vvvvwdn)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datadefault_vvvvwdn == 'Other')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdn Some function
|
|
|
|
function has_defaults_vvvvwdn_SomeFunc(has_defaults_vvvvwdn)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdn == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdp function
|
|
|
|
function vvvvwdp(datatype_vvvvwdp,has_defaults_vvvvwdp)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdp) && datatype_vvvvwdp.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdp = datatype_vvvvwdp;
|
|
|
|
var datatype_vvvvwdp = [];
|
|
|
|
datatype_vvvvwdp.push(temp_vvvvwdp);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdp))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdp = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdp.some(datatype_vvvvwdp_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdp) && has_defaults_vvvvwdp.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdp = has_defaults_vvvvwdp;
|
|
|
|
var has_defaults_vvvvwdp = [];
|
|
|
|
has_defaults_vvvvwdp.push(temp_vvvvwdp);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdp))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdp = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdp.some(has_defaults_vvvvwdp_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght').closest('.control-group').show();
|
2019-09-12 20:06:52 +00:00
|
|
|
// add required attribute to datalenght field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdpvxw_required)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght',0);
|
|
|
|
jQuery('#jform_datalenght').prop('required','required');
|
|
|
|
jQuery('#jform_datalenght').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datalenght').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdpvxw_required = false;
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datalenght field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdpvxw_required)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datalenght',1);
|
|
|
|
jQuery('#jform_datalenght').removeAttr('required');
|
|
|
|
jQuery('#jform_datalenght').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datalenght').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdpvxw_required = true;
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdp Some function
|
|
|
|
function datatype_vvvvwdp_SomeFunc(datatype_vvvvwdp)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdp == 'CHAR' || datatype_vvvvwdp == 'VARCHAR' || datatype_vvvvwdp == 'INT' || datatype_vvvvwdp == 'TINYINT' || datatype_vvvvwdp == 'BIGINT' || datatype_vvvvwdp == 'FLOAT' || datatype_vvvvwdp == 'DECIMAL' || datatype_vvvvwdp == 'DOUBLE')
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdp Some function
|
|
|
|
function has_defaults_vvvvwdp_SomeFunc(has_defaults_vvvvwdp)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdp == 1)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdr function
|
|
|
|
function vvvvwdr(datatype_vvvvwdr,has_defaults_vvvvwdr)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !== Array)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdr = datatype_vvvvwdr;
|
|
|
|
var datatype_vvvvwdr = [];
|
|
|
|
datatype_vvvvwdr.push(temp_vvvvwdr);
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdr))
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdr = [];
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_SomeFunc);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdr) && has_defaults_vvvvwdr.constructor !== Array)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdr = has_defaults_vvvvwdr;
|
|
|
|
var has_defaults_vvvvwdr = [];
|
|
|
|
has_defaults_vvvvwdr.push(temp_vvvvwdr);
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdr))
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdr = [];
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').show();
|
2019-05-02 23:00:05 +00:00
|
|
|
jQuery('#jform_indexes').closest('.control-group').show();
|
|
|
|
// add required attribute to indexes field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdrvxx_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',0);
|
|
|
|
jQuery('#jform_indexes').prop('required','required');
|
|
|
|
jQuery('#jform_indexes').attr('aria-required',true);
|
|
|
|
jQuery('#jform_indexes').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdrvxx_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_indexes').closest('.control-group').hide();
|
|
|
|
// remove required attribute from indexes field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdrvxx_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',1);
|
|
|
|
jQuery('#jform_indexes').removeAttr('required');
|
|
|
|
jQuery('#jform_indexes').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_indexes').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdrvxx_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdr Some function
|
|
|
|
function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdr == 'CHAR' || datatype_vvvvwdr == 'VARCHAR' || datatype_vvvvwdr == 'DATETIME' || datatype_vvvvwdr == 'DATE' || datatype_vvvvwdr == 'TIME' || datatype_vvvvwdr == 'INT' || datatype_vvvvwdr == 'TINYINT' || datatype_vvvvwdr == 'BIGINT' || datatype_vvvvwdr == 'FLOAT' || datatype_vvvvwdr == 'DECIMAL' || datatype_vvvvwdr == 'DOUBLE')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdr Some function
|
|
|
|
function has_defaults_vvvvwdr_SomeFunc(has_defaults_vvvvwdr)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdr == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwds function
|
|
|
|
function vvvvwds(has_defaults_vvvvwds,datatype_vvvvwds)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwds) && has_defaults_vvvvwds.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwds = has_defaults_vvvvwds;
|
|
|
|
var has_defaults_vvvvwds = [];
|
|
|
|
has_defaults_vvvvwds.push(temp_vvvvwds);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwds))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwds = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwds.some(has_defaults_vvvvwds_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwds) && datatype_vvvvwds.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwds = datatype_vvvvwds;
|
|
|
|
var datatype_vvvvwds = [];
|
|
|
|
datatype_vvvvwds.push(temp_vvvvwds);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwds))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwds = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwds.some(datatype_vvvvwds_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (has_defaults && datatype)
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').show();
|
|
|
|
jQuery('#jform_indexes').closest('.control-group').show();
|
|
|
|
// add required attribute to indexes field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdsvxy_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',0);
|
|
|
|
jQuery('#jform_indexes').prop('required','required');
|
|
|
|
jQuery('#jform_indexes').attr('aria-required',true);
|
|
|
|
jQuery('#jform_indexes').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdsvxy_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datadefault').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_indexes').closest('.control-group').hide();
|
|
|
|
// remove required attribute from indexes field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdsvxy_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('indexes',1);
|
|
|
|
jQuery('#jform_indexes').removeAttr('required');
|
|
|
|
jQuery('#jform_indexes').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_indexes').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdsvxy_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwds Some function
|
|
|
|
function has_defaults_vvvvwds_SomeFunc(has_defaults_vvvvwds)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwds == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwds Some function
|
|
|
|
function datatype_vvvvwds_SomeFunc(datatype_vvvvwds)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'DATETIME' || datatype_vvvvwds == 'DATE' || datatype_vvvvwds == 'TIME' || datatype_vvvvwds == 'INT' || datatype_vvvvwds == 'TINYINT' || datatype_vvvvwds == 'BIGINT' || datatype_vvvvwds == 'FLOAT' || datatype_vvvvwds == 'DECIMAL' || datatype_vvvvwds == 'DOUBLE')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdt function
|
|
|
|
function vvvvwdt(datatype_vvvvwdt,has_defaults_vvvvwdt)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdt) && datatype_vvvvwdt.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdt = datatype_vvvvwdt;
|
|
|
|
var datatype_vvvvwdt = [];
|
|
|
|
datatype_vvvvwdt.push(temp_vvvvwdt);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdt))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdt = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdt.some(datatype_vvvvwdt_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdt) && has_defaults_vvvvwdt.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdt = has_defaults_vvvvwdt;
|
|
|
|
var has_defaults_vvvvwdt = [];
|
|
|
|
has_defaults_vvvvwdt.push(temp_vvvvwdt);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdt))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdt = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdt.some(has_defaults_vvvvwdt_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').show();
|
|
|
|
// add required attribute to store field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdtvxz_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('store',0);
|
|
|
|
jQuery('#jform_store').prop('required','required');
|
|
|
|
jQuery('#jform_store').attr('aria-required',true);
|
|
|
|
jQuery('#jform_store').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdtvxz_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').hide();
|
|
|
|
// remove required attribute from store field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdtvxz_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('store',1);
|
|
|
|
jQuery('#jform_store').removeAttr('required');
|
|
|
|
jQuery('#jform_store').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_store').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdtvxz_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdt Some function
|
|
|
|
function datatype_vvvvwdt_SomeFunc(datatype_vvvvwdt)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdt == 'CHAR' || datatype_vvvvwdt == 'VARCHAR' || datatype_vvvvwdt == 'TEXT' || datatype_vvvvwdt == 'MEDIUMTEXT' || datatype_vvvvwdt == 'LONGTEXT' || datatype_vvvvwdt == 'BLOB' || datatype_vvvvwdt == 'TINYBLOB' || datatype_vvvvwdt == 'MEDIUMBLOB' || datatype_vvvvwdt == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdt Some function
|
|
|
|
function has_defaults_vvvvwdt_SomeFunc(has_defaults_vvvvwdt)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdt == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdv function
|
|
|
|
function vvvvwdv(store_vvvvwdv,datatype_vvvvwdv,has_defaults_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdv = store_vvvvwdv;
|
|
|
|
var store_vvvvwdv = [];
|
|
|
|
store_vvvvwdv.push(temp_vvvvwdv);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(store_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var store_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdv = datatype_vvvvwdv;
|
|
|
|
var datatype_vvvvwdv = [];
|
|
|
|
datatype_vvvvwdv.push(temp_vvvvwdv);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdv) && has_defaults_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdv = has_defaults_vvvvwdv;
|
|
|
|
var has_defaults_vvvvwdv = [];
|
|
|
|
has_defaults_vvvvwdv.push(temp_vvvvwdv);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdv.some(has_defaults_vvvvwdv_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (store && datatype && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdv Some function
|
|
|
|
function store_vvvvwdv_SomeFunc(store_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (store_vvvvwdv == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdv Some function
|
|
|
|
function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdv == 'CHAR' || datatype_vvvvwdv == 'VARCHAR' || datatype_vvvvwdv == 'TEXT' || datatype_vvvvwdv == 'MEDIUMTEXT' || datatype_vvvvwdv == 'LONGTEXT' || datatype_vvvvwdv == 'BLOB' || datatype_vvvvwdv == 'TINYBLOB' || datatype_vvvvwdv == 'MEDIUMBLOB' || datatype_vvvvwdv == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdv Some function
|
|
|
|
function has_defaults_vvvvwdv_SomeFunc(has_defaults_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdv == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdw function
|
|
|
|
function vvvvwdw(datatype_vvvvwdw,store_vvvvwdw,has_defaults_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdw) && datatype_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdw = datatype_vvvvwdw;
|
|
|
|
var datatype_vvvvwdw = [];
|
|
|
|
datatype_vvvvwdw.push(temp_vvvvwdw);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdw = store_vvvvwdw;
|
|
|
|
var store_vvvvwdw = [];
|
|
|
|
store_vvvvwdw.push(temp_vvvvwdw);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(store_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var store_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var store = store_vvvvwdw.some(store_vvvvwdw_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdw = has_defaults_vvvvwdw;
|
|
|
|
var has_defaults_vvvvwdw = [];
|
|
|
|
has_defaults_vvvvwdw.push(temp_vvvvwdw);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (datatype && store && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdw Some function
|
|
|
|
function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdw == 'CHAR' || datatype_vvvvwdw == 'VARCHAR' || datatype_vvvvwdw == 'TEXT' || datatype_vvvvwdw == 'MEDIUMTEXT' || datatype_vvvvwdw == 'LONGTEXT' || datatype_vvvvwdw == 'BLOB' || datatype_vvvvwdw == 'TINYBLOB' || datatype_vvvvwdw == 'MEDIUMBLOB' || datatype_vvvvwdw == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdw Some function
|
|
|
|
function store_vvvvwdw_SomeFunc(store_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (store_vvvvwdw == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdw Some function
|
|
|
|
function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdw == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdx function
|
|
|
|
function vvvvwdx(has_defaults_vvvvwdx,store_vvvvwdx,datatype_vvvvwdx)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdx) && has_defaults_vvvvwdx.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdx = has_defaults_vvvvwdx;
|
|
|
|
var has_defaults_vvvvwdx = [];
|
|
|
|
has_defaults_vvvvwdx.push(temp_vvvvwdx);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdx))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdx = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdx.some(has_defaults_vvvvwdx_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(store_vvvvwdx) && store_vvvvwdx.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdx = store_vvvvwdx;
|
|
|
|
var store_vvvvwdx = [];
|
|
|
|
store_vvvvwdx.push(temp_vvvvwdx);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(store_vvvvwdx))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var store_vvvvwdx = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var store = store_vvvvwdx.some(store_vvvvwdx_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
if (isSet(datatype_vvvvwdx) && datatype_vvvvwdx.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var temp_vvvvwdx = datatype_vvvvwdx;
|
|
|
|
var datatype_vvvvwdx = [];
|
|
|
|
datatype_vvvvwdx.push(temp_vvvvwdx);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdx))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdx = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype = datatype_vvvvwdx.some(datatype_vvvvwdx_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (has_defaults && store && datatype)
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdx Some function
|
|
|
|
function has_defaults_vvvvwdx_SomeFunc(has_defaults_vvvvwdx)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdx == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdx Some function
|
|
|
|
function store_vvvvwdx_SomeFunc(store_vvvvwdx)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (store_vvvvwdx == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdx Some function
|
|
|
|
function datatype_vvvvwdx_SomeFunc(datatype_vvvvwdx)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (datatype_vvvvwdx == 'CHAR' || datatype_vvvvwdx == 'VARCHAR' || datatype_vvvvwdx == 'TEXT' || datatype_vvvvwdx == 'MEDIUMTEXT' || datatype_vvvvwdx == 'LONGTEXT' || datatype_vvvvwdx == 'BLOB' || datatype_vvvvwdx == 'TINYBLOB' || datatype_vvvvwdx == 'MEDIUMBLOB' || datatype_vvvvwdx == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
// the vvvvwdy function
|
|
|
|
function vvvvwdy(has_defaults_vvvvwdy)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2022-07-09 15:16:21 +00:00
|
|
|
if (has_defaults_vvvvwdy == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_datatype').closest('.control-group').show();
|
|
|
|
// add required attribute to datatype field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdyvya_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datatype',0);
|
|
|
|
jQuery('#jform_datatype').prop('required','required');
|
|
|
|
jQuery('#jform_datatype').attr('aria-required',true);
|
|
|
|
jQuery('#jform_datatype').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdyvya_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_null_switch').closest('.control-group').show();
|
|
|
|
// add required attribute to null_switch field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (jform_vvvvwdyvyb_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('null_switch',0);
|
|
|
|
jQuery('#jform_null_switch').prop('required','required');
|
|
|
|
jQuery('#jform_null_switch').attr('aria-required',true);
|
|
|
|
jQuery('#jform_null_switch').addClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdyvyb_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datatype').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datatype field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdyvya_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('datatype',1);
|
|
|
|
jQuery('#jform_datatype').removeAttr('required');
|
|
|
|
jQuery('#jform_datatype').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_datatype').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdyvya_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_null_switch').closest('.control-group').hide();
|
|
|
|
// remove required attribute from null_switch field
|
2022-07-09 15:16:21 +00:00
|
|
|
if (!jform_vvvvwdyvyb_required)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('null_switch',1);
|
|
|
|
jQuery('#jform_null_switch').removeAttr('required');
|
|
|
|
jQuery('#jform_null_switch').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_null_switch').removeClass('required');
|
2022-07-09 15:16:21 +00:00
|
|
|
jform_vvvvwdyvyb_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-27 21:05:28 +00:00
|
|
|
// update fields required
|
|
|
|
function updateFieldRequired(name, status) {
|
|
|
|
// check if not_required exist
|
2024-03-09 19:52:51 +00:00
|
|
|
if (document.getElementById('jform_not_required')) {
|
2020-02-27 21:05:28 +00:00
|
|
|
var not_required = jQuery('#jform_not_required').val().split(",");
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2020-02-27 21:05:28 +00:00
|
|
|
if(status == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2020-02-27 21:05:28 +00:00
|
|
|
not_required.push(name);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-02-27 21:05:28 +00:00
|
|
|
not_required = removeFieldFromNotRequired(not_required, name);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2020-02-27 21:05:28 +00:00
|
|
|
|
|
|
|
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2020-02-27 21:05:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// remove field from not_required
|
|
|
|
function removeFieldFromNotRequired(array, what) {
|
|
|
|
return array.filter(function(element){
|
|
|
|
return element !== what;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// fix not required array
|
|
|
|
function fixNotRequiredArray(array) {
|
|
|
|
var seen = {};
|
|
|
|
return removeEmptyFromNotRequiredArray(array).filter(function(item) {
|
|
|
|
return seen.hasOwnProperty(item) ? false : (seen[item] = true);
|
|
|
|
});
|
|
|
|
}
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2020-02-27 21:05:28 +00:00
|
|
|
// remove empty from not_required array
|
|
|
|
function removeEmptyFromNotRequiredArray(array) {
|
|
|
|
return array.filter(function (el) {
|
|
|
|
// remove ( 一_一) as well - lol
|
|
|
|
return (el.length > 0 && '一_一' !== el);
|
|
|
|
});
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// the isSet function
|
|
|
|
function isSet(val)
|
|
|
|
{
|
|
|
|
if ((val != undefined) && (val != null) && 0 !== val.length){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
2019-01-31 21:44:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
jQuery(document).ready(function($)
|
|
|
|
{
|
|
|
|
// check and load all the custom code edit buttons
|
|
|
|
getEditCustomCodeButtons();
|
|
|
|
});
|
|
|
|
|
2024-03-09 19:52:51 +00:00
|
|
|
function getEditCustomCodeButtons_server(id) {
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getEditCustomCodeButtons&format=json&raw=true&vdm="+vastDevMod);
|
2024-03-09 19:52:51 +00:00
|
|
|
let requestParams = '';
|
|
|
|
if (token.length > 0 && id > 0) {
|
|
|
|
requestParams = token+'=1&id='+id+'&return_here='+return_here;
|
2019-01-31 21:44:21 +00:00
|
|
|
}
|
2024-03-09 19:52:51 +00:00
|
|
|
// Construct URL with parameters for GET request
|
|
|
|
const urlWithParams = getUrl + '&' + requestParams;
|
|
|
|
|
|
|
|
// Using the Fetch API for the GET request
|
|
|
|
return fetch(urlWithParams, {
|
|
|
|
method: 'GET',
|
|
|
|
headers: {
|
|
|
|
'Content-Type': 'application/json'
|
|
|
|
}
|
|
|
|
}).then(response => {
|
|
|
|
if (!response.ok) {
|
|
|
|
throw new Error('Network response was not ok');
|
|
|
|
}
|
|
|
|
return response.json();
|
2019-01-31 21:44:21 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2024-03-09 19:52:51 +00:00
|
|
|
function getEditCustomCodeButtons() {
|
|
|
|
// Get the id using pure JavaScript
|
|
|
|
const id = document.querySelector("#jform_id").value;
|
|
|
|
getEditCustomCodeButtons_server(id).then(function(result) {
|
|
|
|
if (typeof result === 'object') {
|
|
|
|
Object.entries(result).forEach(([field, buttons]) => {
|
|
|
|
// Creating the div element for buttons
|
|
|
|
const div = document.createElement('div');
|
|
|
|
div.className = 'control-group';
|
|
|
|
div.innerHTML = '<div class="control-label"><label>Add/Edit Customcode</label></div><div class="controls control-customcode-buttons-'+field+'"></div>';
|
|
|
|
|
|
|
|
// Insert the div before .control-wrapper-{field}
|
|
|
|
const insertBeforeElement = document.querySelector(".control-wrapper-"+field);
|
|
|
|
insertBeforeElement.parentNode.insertBefore(div, insertBeforeElement);
|
|
|
|
|
|
|
|
// Adding buttons to the div
|
|
|
|
Object.entries(buttons).forEach(([name, button]) => {
|
|
|
|
const controlsDiv = document.querySelector(".control-customcode-buttons-"+field);
|
|
|
|
controlsDiv.innerHTML += button;
|
2019-01-31 21:44:21 +00:00
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2024-03-09 19:52:51 +00:00
|
|
|
}).catch(error => {
|
|
|
|
console.error('Error:', error);
|
|
|
|
});
|
|
|
|
}
|