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
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdkvxu_required = false;
|
|
|
|
jform_vvvvwdmvxv_required = false;
|
|
|
|
jform_vvvvwdovxw_required = false;
|
|
|
|
jform_vvvvwdqvxx_required = false;
|
|
|
|
jform_vvvvwdrvxy_required = false;
|
|
|
|
jform_vvvvwdsvxz_required = false;
|
|
|
|
jform_vvvvwdxvya_required = false;
|
|
|
|
jform_vvvvwdxvyb_required = false;
|
2019-01-31 21:44:21 +00:00
|
|
|
|
2019-05-02 23:00:05 +00:00
|
|
|
// Initial Script
|
2024-03-09 19:47:28 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', function()
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datalenght_vvvvwdk = jQuery("#jform_datalenght").val();
|
|
|
|
var has_defaults_vvvvwdk = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
var datadefault_vvvvwdm = jQuery("#jform_datadefault").val();
|
|
|
|
var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdo = jQuery("#jform_datatype").val();
|
|
|
|
var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);
|
|
|
|
|
|
|
|
var datatype_vvvvwdq = jQuery("#jform_datatype").val();
|
|
|
|
var has_defaults_vvvvwdq = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwds = jQuery("#jform_datatype").val();
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwds = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds);
|
2019-07-28 21:48:42 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdu = jQuery("#jform_store").val();
|
|
|
|
var datatype_vvvvwdu = jQuery("#jform_datatype").val();
|
|
|
|
var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
|
|
|
vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
|
2020-07-07 15:13:04 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdv = jQuery("#jform_store").val();
|
2020-07-07 15:13:04 +00:00
|
|
|
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2024-04-09 11:49:29 +00:00
|
|
|
vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
2022-07-09 15:16:21 +00:00
|
|
|
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdw = jQuery("#jform_store").val();
|
|
|
|
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
|
|
|
|
vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_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();
|
2024-04-09 11:49:29 +00:00
|
|
|
vvvvwdx(has_defaults_vvvvwdx);
|
2019-05-02 23:00:05 +00:00
|
|
|
});
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdk function
|
|
|
|
function vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datalenght_vvvvwdk) && datalenght_vvvvwdk.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdk = datalenght_vvvvwdk;
|
|
|
|
var datalenght_vvvvwdk = [];
|
|
|
|
datalenght_vvvvwdk.push(temp_vvvvwdk);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datalenght_vvvvwdk))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datalenght_vvvvwdk = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datalenght = datalenght_vvvvwdk.some(datalenght_vvvvwdk_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdk) && has_defaults_vvvvwdk.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdk = has_defaults_vvvvwdk;
|
|
|
|
var has_defaults_vvvvwdk = [];
|
|
|
|
has_defaults_vvvvwdk.push(temp_vvvvwdk);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdk))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdk = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdk.some(has_defaults_vvvvwdk_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdkvxu_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdkvxu_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdkvxu_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdkvxu_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdk Some function
|
|
|
|
function datalenght_vvvvwdk_SomeFunc(datalenght_vvvvwdk)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datalenght_vvvvwdk == 'Other')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdk Some function
|
|
|
|
function has_defaults_vvvvwdk_SomeFunc(has_defaults_vvvvwdk)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdk == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdm function
|
|
|
|
function vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datadefault_vvvvwdm) && datadefault_vvvvwdm.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdm = datadefault_vvvvwdm;
|
|
|
|
var datadefault_vvvvwdm = [];
|
|
|
|
datadefault_vvvvwdm.push(temp_vvvvwdm);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datadefault_vvvvwdm))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datadefault_vvvvwdm = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datadefault = datadefault_vvvvwdm.some(datadefault_vvvvwdm_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdm) && has_defaults_vvvvwdm.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdm = has_defaults_vvvvwdm;
|
|
|
|
var has_defaults_vvvvwdm = [];
|
|
|
|
has_defaults_vvvvwdm.push(temp_vvvvwdm);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdm))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdm = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdm.some(has_defaults_vvvvwdm_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdmvxv_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdmvxv_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdmvxv_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdmvxv_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdm Some function
|
|
|
|
function datadefault_vvvvwdm_SomeFunc(datadefault_vvvvwdm)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datadefault_vvvvwdm == 'Other')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdm Some function
|
|
|
|
function has_defaults_vvvvwdm_SomeFunc(has_defaults_vvvvwdm)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdm == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdo function
|
|
|
|
function vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdo) && datatype_vvvvwdo.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdo = datatype_vvvvwdo;
|
|
|
|
var datatype_vvvvwdo = [];
|
|
|
|
datatype_vvvvwdo.push(temp_vvvvwdo);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdo))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdo = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdo.some(datatype_vvvvwdo_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdo) && has_defaults_vvvvwdo.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdo = has_defaults_vvvvwdo;
|
|
|
|
var has_defaults_vvvvwdo = [];
|
|
|
|
has_defaults_vvvvwdo.push(temp_vvvvwdo);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdo))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdo = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdo.some(has_defaults_vvvvwdo_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdovxw_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdovxw_required = false;
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datalenght').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datalenght field
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdovxw_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdovxw_required = true;
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdo Some function
|
|
|
|
function datatype_vvvvwdo_SomeFunc(datatype_vvvvwdo)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datatype_vvvvwdo == 'CHAR' || datatype_vvvvwdo == 'VARCHAR' || datatype_vvvvwdo == 'INT' || datatype_vvvvwdo == 'TINYINT' || datatype_vvvvwdo == 'BIGINT' || datatype_vvvvwdo == 'FLOAT' || datatype_vvvvwdo == 'DECIMAL' || datatype_vvvvwdo == 'DOUBLE')
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdo Some function
|
|
|
|
function has_defaults_vvvvwdo_SomeFunc(has_defaults_vvvvwdo)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdo == 1)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdq function
|
|
|
|
function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdq) && datatype_vvvvwdq.constructor !== Array)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdq = datatype_vvvvwdq;
|
|
|
|
var datatype_vvvvwdq = [];
|
|
|
|
datatype_vvvvwdq.push(temp_vvvvwdq);
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdq))
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdq = [];
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdq.some(datatype_vvvvwdq_SomeFunc);
|
2019-09-12 20:06:52 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdq) && has_defaults_vvvvwdq.constructor !== Array)
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdq = has_defaults_vvvvwdq;
|
|
|
|
var has_defaults_vvvvwdq = [];
|
|
|
|
has_defaults_vvvvwdq.push(temp_vvvvwdq);
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdq))
|
2019-09-12 20:06:52 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdq = [];
|
2019-09-12 20:06:52 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdq.some(has_defaults_vvvvwdq_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdqvxx_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdqvxx_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdqvxx_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdqvxx_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdq Some function
|
|
|
|
function datatype_vvvvwdq_SomeFunc(datatype_vvvvwdq)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'DATETIME' || datatype_vvvvwdq == 'DATE' || datatype_vvvvwdq == 'TIME' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdq Some function
|
|
|
|
function has_defaults_vvvvwdq_SomeFunc(has_defaults_vvvvwdq)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdq == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdr function
|
|
|
|
function vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdr) && has_defaults_vvvvwdr.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdr = has_defaults_vvvvwdr;
|
|
|
|
var has_defaults_vvvvwdr = [];
|
|
|
|
has_defaults_vvvvwdr.push(temp_vvvvwdr);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdr))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdr = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdr = datatype_vvvvwdr;
|
|
|
|
var datatype_vvvvwdr = [];
|
|
|
|
datatype_vvvvwdr.push(temp_vvvvwdr);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdr))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdr = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdrvxy_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdrvxy_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdrvxy_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdrvxy_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdr == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdr Some function
|
|
|
|
function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +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;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwds function
|
|
|
|
function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwds) && datatype_vvvvwds.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwds = datatype_vvvvwds;
|
|
|
|
var datatype_vvvvwds = [];
|
|
|
|
datatype_vvvvwds.push(temp_vvvvwds);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwds))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwds = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwds.some(datatype_vvvvwds_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwds) && has_defaults_vvvvwds.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +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
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwds))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwds = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwds.some(has_defaults_vvvvwds_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdsvxz_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdsvxz_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_store').closest('.control-group').hide();
|
|
|
|
// remove required attribute from store field
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdsvxz_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdsvxz_required = true;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwds Some function
|
|
|
|
function datatype_vvvvwds_SomeFunc(datatype_vvvvwds)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'TEXT' || datatype_vvvvwds == 'MEDIUMTEXT' || datatype_vvvvwds == 'LONGTEXT' || datatype_vvvvwds == 'BLOB' || datatype_vvvvwds == 'TINYBLOB' || datatype_vvvvwds == 'MEDIUMBLOB' || datatype_vvvvwds == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwds == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdu function
|
|
|
|
function vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(store_vvvvwdu) && store_vvvvwdu.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdu = store_vvvvwdu;
|
|
|
|
var store_vvvvwdu = [];
|
|
|
|
store_vvvvwdu.push(temp_vvvvwdu);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(store_vvvvwdu))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdu = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var store = store_vvvvwdu.some(store_vvvvwdu_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdu) && datatype_vvvvwdu.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdu = datatype_vvvvwdu;
|
|
|
|
var datatype_vvvvwdu = [];
|
|
|
|
datatype_vvvvwdu.push(temp_vvvvwdu);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdu))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdu = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdu.some(datatype_vvvvwdu_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdu) && has_defaults_vvvvwdu.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdu = has_defaults_vvvvwdu;
|
|
|
|
var has_defaults_vvvvwdu = [];
|
|
|
|
has_defaults_vvvvwdu.push(temp_vvvvwdu);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdu))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdu = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdu.some(has_defaults_vvvvwdu_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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdu Some function
|
|
|
|
function store_vvvvwdu_SomeFunc(store_vvvvwdu)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (store_vvvvwdu == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdu Some function
|
|
|
|
function datatype_vvvvwdu_SomeFunc(datatype_vvvvwdu)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (datatype_vvvvwdu == 'CHAR' || datatype_vvvvwdu == 'VARCHAR' || datatype_vvvvwdu == 'TEXT' || datatype_vvvvwdu == 'MEDIUMTEXT' || datatype_vvvvwdu == 'LONGTEXT' || datatype_vvvvwdu == 'BLOB' || datatype_vvvvwdu == 'TINYBLOB' || datatype_vvvvwdu == 'MEDIUMBLOB' || datatype_vvvvwdu == 'LONGBLOB')
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdu Some function
|
|
|
|
function has_defaults_vvvvwdu_SomeFunc(has_defaults_vvvvwdu)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdu == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdv function
|
|
|
|
function vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdv = datatype_vvvvwdv;
|
|
|
|
var datatype_vvvvwdv = [];
|
|
|
|
datatype_vvvvwdv.push(temp_vvvvwdv);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdv = store_vvvvwdv;
|
|
|
|
var store_vvvvwdv = [];
|
|
|
|
store_vvvvwdv.push(temp_vvvvwdv);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(store_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdv) && has_defaults_vvvvwdv.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +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
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdv))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdv = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +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 (datatype && store && has_defaults)
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_encryption').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdv Some function
|
|
|
|
function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +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;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdv Some function
|
|
|
|
function store_vvvvwdv_SomeFunc(store_vvvvwdv)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (store_vvvvwdv == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdv == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdw function
|
|
|
|
function vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +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
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(has_defaults_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdw = store_vvvvwdw;
|
|
|
|
var store_vvvvwdw = [];
|
|
|
|
store_vvvvwdw.push(temp_vvvvwdw);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(store_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var store_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var store = store_vvvvwdw.some(store_vvvvwdw_SomeFunc);
|
2019-05-02 23:00:05 +00:00
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
if (isSet(datatype_vvvvwdw) && datatype_vvvvwdw.constructor !== Array)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var temp_vvvvwdw = datatype_vvvvwdw;
|
|
|
|
var datatype_vvvvwdw = [];
|
|
|
|
datatype_vvvvwdw.push(temp_vvvvwdw);
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
else if (!isSet(datatype_vvvvwdw))
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype_vvvvwdw = [];
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
2024-04-09 11:49:29 +00:00
|
|
|
var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdw == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdw Some function
|
|
|
|
function store_vvvvwdw_SomeFunc(store_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (store_vvvvwdw == 4)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdw Some function
|
|
|
|
function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +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;
|
|
|
|
}
|
|
|
|
|
2024-04-09 11:49:29 +00:00
|
|
|
// the vvvvwdx function
|
|
|
|
function vvvvwdx(has_defaults_vvvvwdx)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2024-04-09 11:49:29 +00:00
|
|
|
if (has_defaults_vvvvwdx == 1)
|
2019-05-02 23:00:05 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_datatype').closest('.control-group').show();
|
|
|
|
// add required attribute to datatype field
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdxvya_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdxvya_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (jform_vvvvwdxvyb_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdxvyb_required = false;
|
2019-05-02 23:00:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_datatype').closest('.control-group').hide();
|
|
|
|
// remove required attribute from datatype field
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdxvya_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdxvya_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
|
2024-04-09 11:49:29 +00:00
|
|
|
if (!jform_vvvvwdxvyb_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');
|
2024-04-09 11:49:29 +00:00
|
|
|
jform_vvvvwdxvyb_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:47:28 +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:47:28 +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:47:28 +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:47:28 +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:47:28 +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:47:28 +00:00
|
|
|
}).catch(error => {
|
|
|
|
console.error('Error:', error);
|
|
|
|
});
|
|
|
|
}
|