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
|
|
|
|
*/
|
|
|
|
|
2016-01-30 20:28:43 +00:00
|
|
|
// Some Global Values
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwbvvv_required = false;
|
|
|
|
jform_vvvvvwcvvw_required = false;
|
|
|
|
jform_vvvvvwevvx_required = false;
|
|
|
|
jform_vvvvvwwvvy_required = false;
|
|
|
|
jform_vvvvvwxvvz_required = false;
|
|
|
|
jform_vvvvvxavwa_required = false;
|
|
|
|
jform_vvvvvxavwb_required = false;
|
|
|
|
jform_vvvvvxavwc_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// Initial Script
|
2024-03-09 19:47:28 +00:00
|
|
|
document.addEventListener('DOMContentLoaded', function()
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2016-02-26 13:57:30 +00:00
|
|
|
var add_php_helper_admin_vvvvvvv = jQuery("#jform_add_php_helper_admin input[type='radio']:checked").val();
|
|
|
|
vvvvvvv(add_php_helper_admin_vvvvvvv);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-02-26 13:57:30 +00:00
|
|
|
var add_php_helper_site_vvvvvvw = jQuery("#jform_add_php_helper_site input[type='radio']:checked").val();
|
|
|
|
vvvvvvw(add_php_helper_site_vvvvvvw);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
var add_php_helper_both_vvvvvvx = jQuery("#jform_add_php_helper_both input[type='radio']:checked").val();
|
|
|
|
vvvvvvx(add_php_helper_both_vvvvvvx);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
var add_css_admin_vvvvvvy = jQuery("#jform_add_css_admin input[type='radio']:checked").val();
|
|
|
|
vvvvvvy(add_css_admin_vvvvvvy);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
var add_css_site_vvvvvvz = jQuery("#jform_add_css_site input[type='radio']:checked").val();
|
|
|
|
vvvvvvz(add_css_site_vvvvvvz);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
var add_javascript_vvvvvwa = jQuery("#jform_add_javascript input[type='radio']:checked").val();
|
|
|
|
vvvvvwa(add_javascript_vvvvvwa);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
var add_sql_vvvvvwb = jQuery("#jform_add_sql input[type='radio']:checked").val();
|
|
|
|
vvvvvwb(add_sql_vvvvvwb);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_sql_uninstall_vvvvvwc = jQuery("#jform_add_sql_uninstall input[type='radio']:checked").val();
|
|
|
|
vvvvvwc(add_sql_uninstall_vvvvvwc);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var emptycontributors_vvvvvwd = jQuery("#jform_emptycontributors input[type='radio']:checked").val();
|
|
|
|
vvvvvwd(emptycontributors_vvvvvwd);
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_license_vvvvvwe = jQuery("#jform_add_license input[type='radio']:checked").val();
|
|
|
|
vvvvvwe(add_license_vvvvvwe);
|
2016-02-19 09:21:44 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_admin_event_vvvvvwf = jQuery("#jform_add_admin_event input[type='radio']:checked").val();
|
|
|
|
vvvvvwf(add_admin_event_vvvvvwf);
|
2016-03-04 20:58:05 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_site_event_vvvvvwg = jQuery("#jform_add_site_event input[type='radio']:checked").val();
|
|
|
|
vvvvvwg(add_site_event_vvvvvwg);
|
2016-03-04 20:58:05 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var addreadme_vvvvvwh = jQuery("#jform_addreadme input[type='radio']:checked").val();
|
|
|
|
vvvvvwh(addreadme_vvvvvwh);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_update_server_vvvvvwi = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
|
|
|
vvvvvwi(add_update_server_vvvvvwi);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_sales_server_vvvvvwj = jQuery("#jform_add_sales_server input[type='radio']:checked").val();
|
|
|
|
vvvvvwj(add_sales_server_vvvvvwj);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_license_vvvvvwk = jQuery("#jform_add_license input[type='radio']:checked").val();
|
|
|
|
vvvvvwk(add_license_vvvvvwk);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_php_postflight_install_vvvvvwl = jQuery("#jform_add_php_postflight_install input[type='radio']:checked").val();
|
|
|
|
vvvvvwl(add_php_postflight_install_vvvvvwl);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_php_postflight_update_vvvvvwm = jQuery("#jform_add_php_postflight_update input[type='radio']:checked").val();
|
|
|
|
vvvvvwm(add_php_postflight_update_vvvvvwm);
|
2016-11-22 05:48:55 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_php_method_uninstall_vvvvvwn = jQuery("#jform_add_php_method_uninstall input[type='radio']:checked").val();
|
|
|
|
vvvvvwn(add_php_method_uninstall_vvvvvwn);
|
2016-11-22 05:48:55 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_php_preflight_install_vvvvvwo = jQuery("#jform_add_php_preflight_install input[type='radio']:checked").val();
|
|
|
|
vvvvvwo(add_php_preflight_install_vvvvvwo);
|
2016-11-22 05:48:55 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_php_preflight_update_vvvvvwp = jQuery("#jform_add_php_preflight_update input[type='radio']:checked").val();
|
|
|
|
vvvvvwp(add_php_preflight_update_vvvvvwp);
|
2016-11-25 02:56:16 +00:00
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
var update_server_target_vvvvvwq = jQuery("#jform_update_server_target input[type='radio']:checked").val();
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_update_server_vvvvvwq = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
|
|
|
vvvvvwq(update_server_target_vvvvvwq,add_update_server_vvvvvwq);
|
2018-01-15 15:54:05 +00:00
|
|
|
|
|
|
|
var add_update_server_vvvvvwr = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
2018-05-11 04:08:14 +00:00
|
|
|
var update_server_target_vvvvvwr = jQuery("#jform_update_server_target input[type='radio']:checked").val();
|
|
|
|
vvvvvwr(add_update_server_vvvvvwr,update_server_target_vvvvvwr);
|
2016-11-22 05:48:55 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var update_server_target_vvvvvws = jQuery("#jform_update_server_target input[type='radio']:checked").val();
|
|
|
|
var add_update_server_vvvvvws = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
|
|
|
vvvvvws(update_server_target_vvvvvws,add_update_server_vvvvvws);
|
2016-11-22 17:08:17 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var update_server_target_vvvvvwu = jQuery("#jform_update_server_target input[type='radio']:checked").val();
|
|
|
|
var add_update_server_vvvvvwu = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
|
|
|
vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu);
|
2016-12-30 10:47:19 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var add_update_server_vvvvvww = jQuery("#jform_add_update_server input[type='radio']:checked").val();
|
|
|
|
vvvvvww(add_update_server_vvvvvww);
|
2018-03-09 03:26:44 +00:00
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
var buildcomp_vvvvvwx = jQuery("#jform_buildcomp input[type='radio']:checked").val();
|
|
|
|
vvvvvwx(buildcomp_vvvvvwx);
|
2018-03-09 03:26:44 +00:00
|
|
|
|
|
|
|
var dashboard_type_vvvvvwy = jQuery("#jform_dashboard_type input[type='radio']:checked").val();
|
|
|
|
vvvvvwy(dashboard_type_vvvvvwy);
|
2018-05-11 04:08:14 +00:00
|
|
|
|
|
|
|
var dashboard_type_vvvvvwz = jQuery("#jform_dashboard_type input[type='radio']:checked").val();
|
|
|
|
vvvvvwz(dashboard_type_vvvvvwz);
|
2019-05-15 17:39:27 +00:00
|
|
|
|
|
|
|
var translation_tool_vvvvvxa = jQuery("#jform_translation_tool").val();
|
|
|
|
vvvvvxa(translation_tool_vvvvvxa);
|
2016-01-30 20:28:43 +00:00
|
|
|
});
|
|
|
|
|
2016-02-26 13:57:30 +00:00
|
|
|
// the vvvvvvv function
|
|
|
|
function vvvvvvv(add_php_helper_admin_vvvvvvv)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-02-26 13:57:30 +00:00
|
|
|
if (add_php_helper_admin_vvvvvvv == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_admin-lbl').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_admin-lbl').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-26 13:57:30 +00:00
|
|
|
// the vvvvvvw function
|
|
|
|
function vvvvvvw(add_php_helper_site_vvvvvvw)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-02-26 13:57:30 +00:00
|
|
|
if (add_php_helper_site_vvvvvvw == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_site-lbl').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_site-lbl').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-26 13:57:30 +00:00
|
|
|
// the vvvvvvx function
|
2016-11-25 02:56:16 +00:00
|
|
|
function vvvvvvx(add_php_helper_both_vvvvvvx)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2016-11-25 02:56:16 +00:00
|
|
|
if (add_php_helper_both_vvvvvvx == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_both-lbl').closest('.control-group').show();
|
2016-11-25 02:56:16 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_helper_both-lbl').closest('.control-group').hide();
|
2016-11-25 02:56:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvvvy function
|
2018-01-15 15:54:05 +00:00
|
|
|
function vvvvvvy(add_css_admin_vvvvvvy)
|
2016-11-25 02:56:16 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-01-15 15:54:05 +00:00
|
|
|
if (add_css_admin_vvvvvvy == 1)
|
2016-11-25 02:56:16 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_css_admin-lbl').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_css_admin-lbl').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-25 02:56:16 +00:00
|
|
|
// the vvvvvvz function
|
2018-01-15 15:54:05 +00:00
|
|
|
function vvvvvvz(add_css_site_vvvvvvz)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-01-15 15:54:05 +00:00
|
|
|
if (add_css_site_vvvvvvz == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_css_site-lbl').closest('.control-group').show();
|
2018-01-15 15:54:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_css_site-lbl').closest('.control-group').hide();
|
2018-01-15 15:54:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvvwa function
|
|
|
|
function vvvvvwa(add_javascript_vvvvvwa)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (add_javascript_vvvvvwa == 1)
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_javascript-lbl').closest('.control-group').show();
|
2017-10-06 14:53:22 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_javascript-lbl').closest('.control-group').hide();
|
2017-10-06 14:53:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
// the vvvvvwb function
|
|
|
|
function vvvvvwb(add_sql_vvvvvwb)
|
2017-10-06 14:53:22 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-01-15 15:54:05 +00:00
|
|
|
if (add_sql_vvvvvwb == 1)
|
2017-10-06 14:53:22 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_sql').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to sql field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvwbvvv_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('sql',0);
|
|
|
|
jQuery('#jform_sql').prop('required','required');
|
|
|
|
jQuery('#jform_sql').attr('aria-required',true);
|
|
|
|
jQuery('#jform_sql').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwbvvv_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_sql').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from sql field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvwbvvv_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('sql',1);
|
|
|
|
jQuery('#jform_sql').removeAttr('required');
|
|
|
|
jQuery('#jform_sql').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_sql').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwbvvv_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-15 15:54:05 +00:00
|
|
|
// the vvvvvwc function
|
2018-05-11 04:08:14 +00:00
|
|
|
function vvvvvwc(add_sql_uninstall_vvvvvwc)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_sql_uninstall_vvvvvwc == 1)
|
|
|
|
{
|
|
|
|
jQuery('#jform_sql_uninstall').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to sql_uninstall field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvwcvvw_required)
|
2018-05-11 04:08:14 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('sql_uninstall',0);
|
|
|
|
jQuery('#jform_sql_uninstall').prop('required','required');
|
|
|
|
jQuery('#jform_sql_uninstall').attr('aria-required',true);
|
|
|
|
jQuery('#jform_sql_uninstall').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwcvvw_required = false;
|
2018-05-11 04:08:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_sql_uninstall').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from sql_uninstall field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvwcvvw_required)
|
2018-05-11 04:08:14 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('sql_uninstall',1);
|
|
|
|
jQuery('#jform_sql_uninstall').removeAttr('required');
|
|
|
|
jQuery('#jform_sql_uninstall').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_sql_uninstall').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwcvvw_required = true;
|
2018-05-11 04:08:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvvwd function
|
|
|
|
function vvvvvwd(emptycontributors_vvvvvwd)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (emptycontributors_vvvvvwd == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_number').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_number').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwe function
|
|
|
|
function vvvvvwe(add_license_vvvvvwe)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_license_vvvvvwe == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_license_type').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to license_type field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvwevvx_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('license_type',0);
|
|
|
|
jQuery('#jform_license_type').prop('required','required');
|
|
|
|
jQuery('#jform_license_type').attr('aria-required',true);
|
|
|
|
jQuery('#jform_license_type').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwevvx_required = false;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_license_type').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from license_type field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvwevvx_required)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('license_type',1);
|
|
|
|
jQuery('#jform_license_type').removeAttr('required');
|
|
|
|
jQuery('#jform_license_type').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_license_type').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwevvx_required = true;
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwf function
|
|
|
|
function vvvvvwf(add_admin_event_vvvvvwf)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_admin_event_vvvvvwf == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_admin_event-lbl').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_admin_event-lbl').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwg function
|
|
|
|
function vvvvvwg(add_site_event_vvvvvwg)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_site_event_vvvvvwg == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_site_event-lbl').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_site_event-lbl').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwh function
|
|
|
|
function vvvvvwh(addreadme_vvvvvwh)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (addreadme_vvvvvwh == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_readme').closest('.control-group').show();
|
|
|
|
jQuery('#jform_readme-lbl').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_readme').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_readme-lbl').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwi function
|
|
|
|
function vvvvvwi(add_update_server_vvvvvwi)
|
2016-03-04 20:58:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_update_server_vvvvvwi == 1)
|
2016-03-04 20:58:05 +00:00
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server_url').closest('.control-group').show();
|
2016-03-04 20:58:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server_url').closest('.control-group').hide();
|
2016-03-04 20:58:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwj function
|
|
|
|
function vvvvvwj(add_sales_server_vvvvvwj)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_sales_server_vvvvvwj == 1)
|
2016-03-04 20:58:05 +00:00
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_sales_server').closest('.control-group').show();
|
2016-03-04 20:58:05 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_sales_server').closest('.control-group').hide();
|
2016-03-04 20:58:05 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwk function
|
|
|
|
function vvvvvwk(add_license_vvvvvwk)
|
2016-03-04 20:58:05 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_license_vvvvvwk == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_lisencing_note').closest('.control-group').show();
|
|
|
|
jQuery('#jform_whmcs_key').closest('.control-group').show();
|
|
|
|
jQuery('#jform_whmcs_url').closest('.control-group').show();
|
2018-07-08 20:18:32 +00:00
|
|
|
jQuery('#jform_whmcs_buy_link').closest('.control-group').show();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_whmcs_lisencing_note').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_whmcs_key').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_whmcs_url').closest('.control-group').hide();
|
2018-07-08 20:18:32 +00:00
|
|
|
jQuery('#jform_whmcs_buy_link').closest('.control-group').hide();
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwl function
|
|
|
|
function vvvvvwl(add_php_postflight_install_vvvvvwl)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_php_postflight_install_vvvvvwl == 1)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_postflight_install-lbl').closest('.control-group').show();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_postflight_install-lbl').closest('.control-group').hide();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwm function
|
|
|
|
function vvvvvwm(add_php_postflight_update_vvvvvwm)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_php_postflight_update_vvvvvwm == 1)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_postflight_update-lbl').closest('.control-group').show();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_postflight_update-lbl').closest('.control-group').hide();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwn function
|
|
|
|
function vvvvvwn(add_php_method_uninstall_vvvvvwn)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_php_method_uninstall_vvvvvwn == 1)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').show();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_method_uninstall-lbl').closest('.control-group').hide();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwo function
|
|
|
|
function vvvvvwo(add_php_preflight_install_vvvvvwo)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_php_preflight_install_vvvvvwo == 1)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_preflight_install-lbl').closest('.control-group').show();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_preflight_install-lbl').closest('.control-group').hide();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwp function
|
|
|
|
function vvvvvwp(add_php_preflight_update_vvvvvwp)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_php_preflight_update_vvvvvwp == 1)
|
2016-10-23 22:48:26 +00:00
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_preflight_update-lbl').closest('.control-group').show();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-06-25 20:54:26 +00:00
|
|
|
jQuery('#jform_php_preflight_update-lbl').closest('.control-group').hide();
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwq function
|
|
|
|
function vvvvvwq(update_server_target_vvvvvwq,add_update_server_vvvvvwq)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (update_server_target_vvvvvwq == 1 && add_update_server_vvvvvwq == 1)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server').closest('.control-group').show();
|
2016-11-22 05:48:55 +00:00
|
|
|
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server').closest('.control-group').hide();
|
2016-11-22 05:48:55 +00:00
|
|
|
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwr function
|
|
|
|
function vvvvvwr(add_update_server_vvvvvwr,update_server_target_vvvvvwr)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_update_server_vvvvvwr == 1 && update_server_target_vvvvvwr == 1)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server').closest('.control-group').show();
|
2016-11-22 05:48:55 +00:00
|
|
|
jQuery('.note_update_server_note_ftp').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-02-15 00:42:39 +00:00
|
|
|
jQuery('#jform_update_server').closest('.control-group').hide();
|
2016-11-22 05:48:55 +00:00
|
|
|
jQuery('.note_update_server_note_ftp').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvws function
|
|
|
|
function vvvvvws(update_server_target_vvvvvws,add_update_server_vvvvvws)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (update_server_target_vvvvvws == 2 && add_update_server_vvvvvws == 1)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_update_server_note_zip').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_update_server_note_zip').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwu function
|
|
|
|
function vvvvvwu(update_server_target_vvvvvwu,add_update_server_vvvvvwu)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (update_server_target_vvvvvwu == 3 && add_update_server_vvvvvwu == 1)
|
2016-11-22 05:48:55 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_update_server_note_other').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_update_server_note_other').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvww function
|
|
|
|
function vvvvvww(add_update_server_vvvvvww)
|
2016-11-22 17:08:17 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (add_update_server_vvvvvww == 1)
|
2016-11-22 17:08:17 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_update_server_target').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to update_server_target field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvwwvvy_required)
|
2016-11-22 17:08:17 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('update_server_target',0);
|
|
|
|
jQuery('#jform_update_server_target').prop('required','required');
|
|
|
|
jQuery('#jform_update_server_target').attr('aria-required',true);
|
|
|
|
jQuery('#jform_update_server_target').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwwvvy_required = false;
|
2016-11-22 17:08:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_update_server_target').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from update_server_target field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvwwvvy_required)
|
2016-11-22 17:08:17 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('update_server_target',1);
|
|
|
|
jQuery('#jform_update_server_target').removeAttr('required');
|
|
|
|
jQuery('#jform_update_server_target').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_update_server_target').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwwvvy_required = true;
|
2016-11-22 17:08:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwx function
|
|
|
|
function vvvvvwx(buildcomp_vvvvvwx)
|
2016-12-30 10:47:19 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (buildcomp_vvvvvwx == 1)
|
2016-12-30 10:47:19 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_buildcompsql').closest('.control-group').show();
|
2018-09-10 11:04:52 +00:00
|
|
|
// add required attribute to buildcompsql field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvwxvvz_required)
|
2016-12-30 10:47:19 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('buildcompsql',0);
|
|
|
|
jQuery('#jform_buildcompsql').prop('required','required');
|
|
|
|
jQuery('#jform_buildcompsql').attr('aria-required',true);
|
|
|
|
jQuery('#jform_buildcompsql').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwxvvz_required = false;
|
2016-12-30 10:47:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_buildcompsql').closest('.control-group').hide();
|
2018-09-10 11:04:52 +00:00
|
|
|
// remove required attribute from buildcompsql field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvwxvvz_required)
|
2016-12-30 10:47:19 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('buildcompsql',1);
|
|
|
|
jQuery('#jform_buildcompsql').removeAttr('required');
|
|
|
|
jQuery('#jform_buildcompsql').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_buildcompsql').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvwxvvz_required = true;
|
2016-12-30 10:47:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwy function
|
|
|
|
function vvvvvwy(dashboard_type_vvvvvwy)
|
2018-03-09 03:26:44 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (dashboard_type_vvvvvwy == 2)
|
2018-03-09 03:26:44 +00:00
|
|
|
{
|
|
|
|
jQuery('#jform_dashboard').closest('.control-group').show();
|
|
|
|
jQuery('.note_dynamic_dashboard').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_dashboard').closest('.control-group').hide();
|
|
|
|
jQuery('.note_dynamic_dashboard').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-11 04:08:14 +00:00
|
|
|
// the vvvvvwz function
|
|
|
|
function vvvvvwz(dashboard_type_vvvvvwz)
|
2018-03-09 03:26:44 +00:00
|
|
|
{
|
|
|
|
// set the function logic
|
2018-05-11 04:08:14 +00:00
|
|
|
if (dashboard_type_vvvvvwz == 1)
|
2018-03-09 03:26:44 +00:00
|
|
|
{
|
|
|
|
jQuery('.note_botton_component_dashboard').closest('.control-group').show();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('.note_botton_component_dashboard').closest('.control-group').hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-15 17:39:27 +00:00
|
|
|
// the vvvvvxa function
|
|
|
|
function vvvvvxa(translation_tool_vvvvvxa)
|
|
|
|
{
|
|
|
|
if (isSet(translation_tool_vvvvvxa) && translation_tool_vvvvvxa.constructor !== Array)
|
|
|
|
{
|
|
|
|
var temp_vvvvvxa = translation_tool_vvvvvxa;
|
|
|
|
var translation_tool_vvvvvxa = [];
|
|
|
|
translation_tool_vvvvvxa.push(temp_vvvvvxa);
|
|
|
|
}
|
|
|
|
else if (!isSet(translation_tool_vvvvvxa))
|
|
|
|
{
|
|
|
|
var translation_tool_vvvvvxa = [];
|
|
|
|
}
|
|
|
|
var translation_tool = translation_tool_vvvvvxa.some(translation_tool_vvvvvxa_SomeFunc);
|
|
|
|
|
|
|
|
|
|
|
|
// set this function logic
|
|
|
|
if (translation_tool)
|
|
|
|
{
|
|
|
|
jQuery('#jform_crowdin_account_api_key').closest('.control-group').show();
|
|
|
|
jQuery('.note_crowdin').closest('.control-group').show();
|
|
|
|
jQuery('#jform_crowdin_project_api_key').closest('.control-group').show();
|
|
|
|
// add required attribute to crowdin_project_api_key field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvxavwa_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_project_api_key',0);
|
|
|
|
jQuery('#jform_crowdin_project_api_key').prop('required','required');
|
|
|
|
jQuery('#jform_crowdin_project_api_key').attr('aria-required',true);
|
|
|
|
jQuery('#jform_crowdin_project_api_key').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwa_required = false;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_crowdin_project_identifier').closest('.control-group').show();
|
|
|
|
// add required attribute to crowdin_project_identifier field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvxavwb_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_project_identifier',0);
|
|
|
|
jQuery('#jform_crowdin_project_identifier').prop('required','required');
|
|
|
|
jQuery('#jform_crowdin_project_identifier').attr('aria-required',true);
|
|
|
|
jQuery('#jform_crowdin_project_identifier').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwb_required = false;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_crowdin_username').closest('.control-group').show();
|
|
|
|
// add required attribute to crowdin_username field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (jform_vvvvvxavwc_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_username',0);
|
|
|
|
jQuery('#jform_crowdin_username').prop('required','required');
|
|
|
|
jQuery('#jform_crowdin_username').attr('aria-required',true);
|
|
|
|
jQuery('#jform_crowdin_username').addClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwc_required = false;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
jQuery('#jform_crowdin_account_api_key').closest('.control-group').hide();
|
|
|
|
jQuery('.note_crowdin').closest('.control-group').hide();
|
|
|
|
jQuery('#jform_crowdin_project_api_key').closest('.control-group').hide();
|
|
|
|
// remove required attribute from crowdin_project_api_key field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvxavwa_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_project_api_key',1);
|
|
|
|
jQuery('#jform_crowdin_project_api_key').removeAttr('required');
|
|
|
|
jQuery('#jform_crowdin_project_api_key').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_crowdin_project_api_key').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwa_required = true;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_crowdin_project_identifier').closest('.control-group').hide();
|
|
|
|
// remove required attribute from crowdin_project_identifier field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvxavwb_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_project_identifier',1);
|
|
|
|
jQuery('#jform_crowdin_project_identifier').removeAttr('required');
|
|
|
|
jQuery('#jform_crowdin_project_identifier').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_crowdin_project_identifier').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwb_required = true;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
jQuery('#jform_crowdin_username').closest('.control-group').hide();
|
|
|
|
// remove required attribute from crowdin_username field
|
2019-07-08 16:05:54 +00:00
|
|
|
if (!jform_vvvvvxavwc_required)
|
2019-05-15 17:39:27 +00:00
|
|
|
{
|
|
|
|
updateFieldRequired('crowdin_username',1);
|
|
|
|
jQuery('#jform_crowdin_username').removeAttr('required');
|
|
|
|
jQuery('#jform_crowdin_username').removeAttr('aria-required');
|
|
|
|
jQuery('#jform_crowdin_username').removeClass('required');
|
2019-07-08 16:05:54 +00:00
|
|
|
jform_vvvvvxavwc_required = true;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the vvvvvxa Some function
|
|
|
|
function translation_tool_vvvvvxa_SomeFunc(translation_tool_vvvvvxa)
|
|
|
|
{
|
|
|
|
// set the function logic
|
|
|
|
if (translation_tool_vvvvvxa == 1)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
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(",");
|
2016-01-30 20:28:43 +00:00
|
|
|
|
2020-02-27 21:05:28 +00:00
|
|
|
if(status == 1)
|
2016-01-30 20:28:43 +00:00
|
|
|
{
|
2020-02-27 21:05:28 +00:00
|
|
|
not_required.push(name);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-02-27 21:05:28 +00:00
|
|
|
not_required = removeFieldFromNotRequired(not_required, name);
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
2020-02-27 21:05:28 +00:00
|
|
|
|
|
|
|
jQuery('#jform_not_required').val(fixNotRequiredArray(not_required).toString());
|
2016-01-30 20:28:43 +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);
|
|
|
|
});
|
|
|
|
}
|
2016-01-30 20:28:43 +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);
|
|
|
|
});
|
2016-01-30 20:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// the isSet function
|
|
|
|
function isSet(val)
|
|
|
|
{
|
|
|
|
if ((val != undefined) && (val != null) && 0 !== val.length){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
2017-10-26 16:43:51 +00:00
|
|
|
}
|
|
|
|
|
2018-03-11 02:44:43 +00:00
|
|
|
|
2017-10-26 16:43:51 +00:00
|
|
|
jQuery(document).ready(function()
|
|
|
|
{
|
2018-03-09 03:26:44 +00:00
|
|
|
// check what is the dashboard switch
|
|
|
|
var dasboard_type = jQuery("#jform_dashboard_type input[type='radio']:checked").val();
|
|
|
|
dasboardSwitch(dasboard_type);
|
2017-10-26 16:43:51 +00:00
|
|
|
// set buttons
|
|
|
|
function setButtons1() {
|
|
|
|
addButtonID('component_files_folders','button_component_files_folders', 1);
|
|
|
|
addButtonID('component_site_views','button_create_edit_views', 1);
|
|
|
|
}
|
|
|
|
function setButtons2() {
|
|
|
|
addButtonID('component_updates','component_version', 1);
|
|
|
|
addButtonID('component_mysql_tweaks','button_mysql_tweak_options', 1);
|
|
|
|
addButtonID('component_custom_admin_views','button_create_edit_views', 1);
|
|
|
|
}
|
|
|
|
function setButtons3() {
|
|
|
|
addButtonID('component_custom_admin_menus','button_add_custom_menus', 1);
|
|
|
|
addButtonID('component_config','button_add_config', 1);
|
|
|
|
addButtonID('component_admin_views','button_create_edit_views', 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// use setTimeout() to execute
|
|
|
|
setTimeout(setButtons1, 1000);
|
|
|
|
setTimeout(setButtons2, 2000);
|
|
|
|
setTimeout(setButtons3, 3000);
|
|
|
|
|
|
|
|
// now load the displays
|
|
|
|
function setDisplays1() {
|
|
|
|
getAjaxDisplay('component_admin_views');
|
|
|
|
}
|
|
|
|
function setDisplays2() {
|
|
|
|
getAjaxDisplay('component_custom_admin_views');
|
|
|
|
}
|
|
|
|
function setDisplays3() {
|
|
|
|
getAjaxDisplay('component_site_views');
|
|
|
|
}
|
|
|
|
|
|
|
|
// use setTimeout() to execute
|
|
|
|
setTimeout(setDisplays1, 1500);
|
|
|
|
setTimeout(setDisplays2, 2500);
|
|
|
|
setTimeout(setDisplays3, 3500);
|
|
|
|
|
2019-01-31 21:44:21 +00:00
|
|
|
// check and load all the customcode edit buttons
|
|
|
|
setTimeout(getEditCustomCodeButtons, 400);
|
2019-05-15 17:39:27 +00:00
|
|
|
|
|
|
|
// get crowdin detail if set
|
|
|
|
setTimeout(getTranslationToolDetails, 600);
|
2017-10-26 16:43:51 +00:00
|
|
|
});
|
|
|
|
|
2019-05-15 17:39:27 +00:00
|
|
|
function getTranslationToolDetails(){
|
|
|
|
// get the translation tool selection
|
|
|
|
var tool = jQuery("#jform_translation_tool").val();
|
|
|
|
// trigger Crowdin
|
|
|
|
if (tool == 1) {
|
|
|
|
// get the identifier
|
|
|
|
var identifier = jQuery("#jform_crowdin_project_identifier").val();
|
|
|
|
// get the key
|
|
|
|
var key = jQuery("#jform_crowdin_project_api_key").val();
|
|
|
|
// query server for details
|
|
|
|
getCrowdinDetails_server(identifier, key).done(function(result) {
|
|
|
|
if (result.error){
|
|
|
|
jQuery('#crowdin_information_box').show();
|
|
|
|
jQuery('#crowdin_error_box').show();
|
|
|
|
jQuery('#crowdin_error_box').html(result.error);
|
|
|
|
jQuery('#crowdin_success_box').hide();
|
|
|
|
} else if(result.html) {
|
|
|
|
jQuery('#crowdin_success_box').show();
|
|
|
|
jQuery('#crowdin_success_box').html(result.html);
|
|
|
|
jQuery('#crowdin_error_box').hide();
|
|
|
|
jQuery('#crowdin_information_box').hide();
|
|
|
|
} else {
|
|
|
|
jQuery('#crowdin_information_box').show();
|
|
|
|
jQuery('#crowdin_success_box').hide();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCrowdinDetails_server(identifier, key){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getCrowdinDetails&format=json&raw=true&vdm="+vastDevMod);
|
2019-05-15 17:39:27 +00:00
|
|
|
if(token.length > 0 && identifier.length > 0 && key.length > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&identifier='+identifier+'&key='+key;
|
2019-05-15 17:39:27 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
|
|
|
dataType: 'json',
|
|
|
|
data: request,
|
|
|
|
jsonp: false
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-10-26 16:43:51 +00:00
|
|
|
function getAjaxDisplay(type){
|
|
|
|
getAjaxDisplay_server(type).done(function(result) {
|
|
|
|
if(result){
|
|
|
|
jQuery('#display_'+type).html(result);
|
|
|
|
}
|
|
|
|
// set button
|
|
|
|
addButtonID(type,'header_'+type+'_buttons', 2); // <-- little edit button
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function getAjaxDisplay_server(type){
|
2019-07-08 16:05:54 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod);
|
2017-10-26 16:43:51 +00:00
|
|
|
if(token.length > 0 && type.length > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type=' + type;
|
2017-10-26 16:43:51 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2017-10-26 16:43:51 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2017-10-26 16:43:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function addData(result, where){
|
|
|
|
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
|
|
|
|
}
|
|
|
|
|
2018-03-09 03:26:44 +00:00
|
|
|
function dasboardSwitch(value){
|
|
|
|
// hide if default
|
|
|
|
if (2 == value) {
|
|
|
|
jQuery('.control-group-componentdashboard-one').hide();
|
|
|
|
} else {
|
|
|
|
// default behaviour
|
|
|
|
if (jQuery('div.control-group-componentdashboard-one').length) {
|
|
|
|
jQuery('.control-group-componentdashboard-one').show();
|
|
|
|
} else {
|
|
|
|
addButtonID('component_dashboard','button_component_dashboard', 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-27 12:17:38 +00:00
|
|
|
|
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);
|
|
|
|
});
|
2019-01-31 21:44:21 +00:00
|
|
|
}
|
|
|
|
|
2017-10-26 16:43:51 +00:00
|
|
|
function addButtonID_server(type, size){
|
2018-12-29 14:56:06 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod);
|
2017-10-26 16:43:51 +00:00
|
|
|
if(token.length > 0 && type.length > 0 && size > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type='+type+'&size='+size;
|
2017-10-26 16:43:51 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2017-10-26 16:43:51 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2017-10-26 16:43:51 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
function addButtonID(type, where, size){
|
|
|
|
addButtonID_server(type, size).done(function(result) {
|
|
|
|
if(result){
|
|
|
|
if (2 == size) {
|
|
|
|
jQuery('#'+where).html(result);
|
|
|
|
} else {
|
|
|
|
addData(result, '#jform_'+where);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2018-02-27 12:17:38 +00:00
|
|
|
}
|
|
|
|
|
2018-03-28 09:46:14 +00:00
|
|
|
function addButton_server(type, size){
|
2018-12-29 14:56:06 +00:00
|
|
|
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod);
|
2017-10-26 16:43:51 +00:00
|
|
|
if(token.length > 0 && type.length > 0){
|
2019-07-08 16:05:54 +00:00
|
|
|
var request = token+'=1&type='+type+'&size='+size;
|
2017-10-26 16:43:51 +00:00
|
|
|
}
|
|
|
|
return jQuery.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: getUrl,
|
2018-12-29 14:56:06 +00:00
|
|
|
dataType: 'json',
|
2017-10-26 16:43:51 +00:00
|
|
|
data: request,
|
2018-12-29 14:56:06 +00:00
|
|
|
jsonp: false
|
2017-10-26 16:43:51 +00:00
|
|
|
});
|
|
|
|
}
|
2018-03-28 09:46:14 +00:00
|
|
|
function addButton(type, where, size){
|
|
|
|
// just to insure that default behaviour still works
|
|
|
|
size = typeof size !== 'undefined' ? size : 1;
|
|
|
|
addButton_server(type, size).done(function(result) {
|
2017-10-26 16:43:51 +00:00
|
|
|
if(result){
|
2018-03-28 09:46:14 +00:00
|
|
|
if (2 == size) {
|
|
|
|
jQuery('#'+where).html(result);
|
|
|
|
} else {
|
|
|
|
addData(result, '#jform_'+where);
|
|
|
|
}
|
2017-10-26 16:43:51 +00:00
|
|
|
}
|
|
|
|
})
|
2024-03-09 19:47:28 +00:00
|
|
|
}
|