Major improment to user helper methods. Fixed custom field building options to allow options to be set. Fixed gh-569 to use correct paths in module custom fields and rules. Imporved the fancy date helper methods. Added the new Text::_() languange string search for language strings. Add the option to add header custom code to custom fields.

This commit is contained in:
Llewellyn van der Merwe 2020-07-07 17:13:04 +02:00
parent e86ab88f5c
commit 354565d96a
Signed by untrusted user: Llewellyn
GPG Key ID: EFC0C720A240551C
24 changed files with 2242 additions and 1755 deletions

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th June, 2020 + *Last Build*: 7th July, 2020
+ *Version*: 2.11.2 + *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **282642** + *Line count*: **282473**
+ *Field count*: **1522** + *Field count*: **1522**
+ *File count*: **1785** + *File count*: **1785**
+ *Folder count*: **295** + *Folder count*: **295**

View File

@ -144,11 +144,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 24th June, 2020 + *Last Build*: 7th July, 2020
+ *Version*: 2.11.2 + *Version*: 2.11.2
+ *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **282642** + *Line count*: **282473**
+ *Field count*: **1522** + *Field count*: **1522**
+ *File count*: **1785** + *File count*: **1785**
+ *Folder count*: **295** + *Folder count*: **295**

View File

@ -17,9 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// import the ###JFORM_extends### field type ###JFORM_TYPE_HEADER###
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('###JFORM_extends###');
/** /**
* ###Type### Form Field class for the ###Component### component * ###Type### Form Field class for the ###Component### component

View File

@ -322,8 +322,8 @@ class Get
= array( = array(
'Joomla' . '.JText._(', 'Joomla' . '.JText._(',
'JText:' . ':script(', 'JText:' . ':script(',
'JText:' . ':_(', 'Text:' . ':_(', // namespace and J version will be found
'JText:' . ':sprintf(', 'Text:' . ':sprintf(', // namespace and J version will be found
'JustTEXT:' . ':_(' 'JustTEXT:' . ':_('
); );
@ -1201,7 +1201,7 @@ class Get
array(&$this->componentContext, &$component) array(&$this->componentContext, &$component)
); );
// set upater // set updater
$updater = array( $updater = array(
'unique' => array( 'unique' => array(
'addadmin_views' => array('table' => 'component_admin_views', 'addadmin_views' => array('table' => 'component_admin_views',
@ -1281,7 +1281,8 @@ class Get
); );
// set the add targets // set the add targets
$addArrayF = array('files' => 'files', 'folders' => 'folders', $addArrayF = array('files' => 'files',
'folders' => 'folders',
'filesfullpath' => 'files', 'filesfullpath' => 'files',
'foldersfullpath' => 'folders'); 'foldersfullpath' => 'folders');
foreach ($addArrayF as $addTarget => $targetHere) foreach ($addArrayF as $addTarget => $targetHere)
@ -10370,7 +10371,7 @@ class Get
$locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," . $locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," .
PHP_EOL . $this->_t(2) . "'" . PHP_EOL . $this->_t(2) . "'" .
wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) . wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) .
"'));"; "'))";
} }
// update the script // update the script
return $this->setPlaceholders($script, $locker); return $this->setPlaceholders($script, $locker);

View File

@ -2328,6 +2328,7 @@ class Fields extends Structure
. ComponentbuilderHelper::safeString($typeName, 'F') . ComponentbuilderHelper::safeString($typeName, 'F')
. ". (custom) -->"; . ". (custom) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field"; $field .= PHP_EOL . $this->_t(2) . $taber . "<field";
$optionSet = '';
foreach ($fieldAttributes as $property => $value) foreach ($fieldAttributes as $property => $value)
{ {
if ($property != 'option') if ($property != 'option')
@ -2335,8 +2336,274 @@ class Fields extends Structure
$field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1)
. $property . '="' . $value . '"'; . $property . '="' . $value . '"';
} }
elseif ($property === 'option')
{
$optionSet = '';
if (strtolower($typeName) === 'groupedlist'
&& strpos(
$value, ','
) !== false
&& strpos($value, '@@') !== false)
{
// reset the group temp arrays
$groups_ = array();
$grouped_ = array('group' => array(),
'option' => array());
$order_ = array();
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
if (strpos($option, '@@') !== false)
{
// set the group label
$valueKeyArray = explode('@@', $option);
if (count((array) $valueKeyArray) == 2)
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[0], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[0]
);
// now add group label
$groups_[$valueKeyArray[1]] = PHP_EOL
. $this->_t(1) . $taber . $this->_t(2)
. '<group label="' . $langValue . '">';
// set order
$order_['group' . $valueKeyArray[1]]
= $valueKeyArray[1];
} }
}
elseif (strpos($option, '|') !== false)
{
// has other value then text
$valueKeyArray = explode('|', $option);
if (count((array) $valueKeyArray) == 3)
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[1], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][]
= PHP_EOL . $this->_t(1) . $taber
. $this->_t(3) . '<option value="'
. $valueKeyArray[0] . '">' . PHP_EOL
. $this->_t(1) . $taber . $this->_t(4)
. $langValue . '</option>';
$optionArray[$valueKeyArray[0]]
= $langValue;
// set order
$order_['group' . $valueKeyArray[2]]
= $valueKeyArray[2];
}
else
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[1], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['option'][$valueKeyArray[0]]
= PHP_EOL . $this->_t(1) . $taber
. $this->_t(2) . '<option value="'
. $valueKeyArray[0] . '">' . PHP_EOL
. $this->_t(1) . $taber . $this->_t(3)
. $langValue . '</option>';
$optionArray[$valueKeyArray[0]]
= $langValue;
// set order
$order_['option' . $valueKeyArray[0]]
= $valueKeyArray[0];
}
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$option, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $option
);
// now add to option set
$grouped_['option'][$option] = PHP_EOL
. $this->_t(1) . $taber . $this->_t(2)
. '<option value="' . $option . '">'
. PHP_EOL . $this->_t(1) . $taber
. $this->_t(3) . $langValue . '</option>';
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
}
}
// now build the groups
foreach ($order_ as $pointer_ => $_id)
{
// load the default key
$key_ = 'group';
if (strpos($pointer_, 'option') !== false)
{
// load the option field
$key_ = 'option';
}
// check if this is a group loader
if ('group' === $key_ && isset($groups_[$_id])
&& isset($grouped_[$key_][$_id])
&& ComponentbuilderHelper::checkArray(
$grouped_[$key_][$_id]
))
{
// set group label
$optionSet .= $groups_[$_id];
foreach ($grouped_[$key_][$_id] as $option_)
{
$optionSet .= $option_;
}
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
// close the group
$optionSet .= PHP_EOL . $this->_t(1) . $taber
. $this->_t(2) . '</group>';
}
elseif (isset($grouped_[$key_][$_id])
&& ComponentbuilderHelper::checkString(
$grouped_[$key_][$_id]
))
{
$optionSet .= $grouped_[$key_][$_id];
}
}
}
elseif (strpos($value, ',') !== false)
{
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
if (strpos($option, '|') !== false)
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$t, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $t
);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(1)
. $taber . $this->_t(2) . '<option value="'
. $v . '">' . PHP_EOL . $this->_t(1)
. $taber . $this->_t(3) . $langValue
. '</option>';
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$option, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $option
);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2)
. $taber . $this->_t(1) . '<option value="'
. $option . '">' . PHP_EOL . $this->_t(2)
. $taber . $this->_t(2) . $langValue
. '</option>';
$optionArray[$option] = $langValue;
}
}
}
else
{
// one option
if (strpos($value, '|') !== false)
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$t, true
);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber
. $this->_t(1) . '<option value="' . $v . '">'
. PHP_EOL . $this->_t(2) . $taber . $this->_t(2)
. $langValue . '</option>';
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$value, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $value
);
// now add to option set
$optionSet .= PHP_EOL . $this->_t(2)
. $taber . $this->_t(1) . '<option value="'
. $value . '">' . PHP_EOL . $this->_t(2)
. $taber . $this->_t(2) . $langValue
. '</option>';
$optionArray[$value] = $langValue;
}
}
}
}
// if options were found
if (ComponentbuilderHelper::checkString($optionSet))
{
$field .= '>';
$field .= PHP_EOL . $this->_t(3) . $taber . "<!--"
. $this->setLine(__LINE__) . " Option Set. -->";
$field .= $optionSet;
$field .= PHP_EOL . $this->_t(2) . $taber . "</field>";
}
// if no options found and must have a list of options
elseif (ComponentbuilderHelper::fieldCheck($typeName, 'list'))
{
$optionArray = false;
$field .= PHP_EOL . $this->_t(2) . $taber . "/>"; $field .= PHP_EOL . $this->_t(2) . $taber . "/>";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--"
. $this->setLine(__LINE__)
. " No Manual Options Were Added In Field Settings. -->"
. PHP_EOL;
}
else
{
$optionArray = false;
$field .= PHP_EOL . $this->_t(2) . $taber . "/>";
}
// incase the field is in the config and has not been set // incase the field is in the config and has not been set
if ('config' === $view_name_single && 'configs' === $view_name_list if ('config' === $view_name_single && 'configs' === $view_name_list
|| (strpos($view_name_single, 'P|uG!n') !== false || (strpos($view_name_single, 'P|uG!n') !== false
@ -3083,6 +3350,244 @@ class Fields extends Structure
{ {
$field->fieldXML->addAttribute($property, $value); $field->fieldXML->addAttribute($property, $value);
} }
elseif ($property === 'option')
{
ComponentbuilderHelper::xmlComment(
$field->fieldXML,
$this->setLine(__LINE__) . " Option Set."
);
if (strtolower($typeName) === 'groupedlist'
&& strpos(
$value, ','
) !== false
&& strpos($value, '@@') !== false)
{
// reset the group temp arrays
$groups_ = array();
$grouped_ = array('group' => array(),
'option' => array());
$order_ = array();
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
if (strpos($option, '@@') !== false)
{
// set the group label
$valueKeyArray = explode('@@', $option);
if (count((array) $valueKeyArray) == 2)
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[0], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[0]
);
// now add group label
$groups_[$valueKeyArray[1]] = $langValue;
// set order
$order_['group' . $valueKeyArray[1]]
= $valueKeyArray[1];
}
}
elseif (strpos($option, '|') !== false)
{
// has other value then text
$valueKeyArray = explode('|', $option);
if (count((array) $valueKeyArray) == 3)
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[1], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['group'][$valueKeyArray[2]][]
= array('value' => $valueKeyArray[0],
'text' => $langValue);
$optionArray[$valueKeyArray[0]]
= $langValue;
// set order
$order_['group' . $valueKeyArray[2]]
= $valueKeyArray[2];
}
else
{
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$valueKeyArray[1], true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue,
$valueKeyArray[1]
);
// now add to option set
$grouped_['option'][$valueKeyArray[0]]
= array('value' => $valueKeyArray[0],
'text' => $langValue);
$optionArray[$valueKeyArray[0]]
= $langValue;
// set order
$order_['option' . $valueKeyArray[0]]
= $valueKeyArray[0];
}
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$option, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $option
);
// now add to option set
$grouped_['option'][$option]
= array('value' => $option,
'text' => $langValue);
$optionArray[$option] = $langValue;
// set order
$order_['option' . $option] = $option;
}
}
// now build the groups
foreach ($order_ as $pointer_ => $_id)
{
// load the default key
$key_ = 'group';
if (strpos($pointer_, 'option') !== false)
{
// load the option field
$key_ = 'option';
}
// check if this is a group loader
if ('group' === $key_ && isset($groups_[$_id])
&& isset($grouped_[$key_][$_id])
&& ComponentbuilderHelper::checkArray(
$grouped_[$key_][$_id]
))
{
// set group label
$groupXML = $field->fieldXML->addChild('group');
$groupXML->addAttribute(
'label', $groups_[$_id]
);
foreach ($grouped_[$key_][$_id] as $option_)
{
$groupOptionXML = $groupXML->addChild(
'option'
);
$groupOptionXML->addAttribute(
'value', $option_['value']
);
$groupOptionXML[] = $option_['text'];
}
unset($groups_[$_id]);
unset($grouped_[$key_][$_id]);
}
elseif (isset($grouped_[$key_][$_id])
&& ComponentbuilderHelper::checkString(
$grouped_[$key_][$_id]
))
{
$optionXML = $field->fieldXML->addChild(
'option'
);
$optionXML->addAttribute(
'value', $grouped_[$key_][$_id]['value']
);
$optionXML[] = $grouped_[$key_][$_id]['text'];
}
}
}
elseif (strpos($value, ',') !== false)
{
// mulitpal options
$options = explode(',', $value);
foreach ($options as $option)
{
$optionXML = $field->fieldXML->addChild('option');
if (strpos($option, '|') !== false)
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$t, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $t
);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$option, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $option
);
// now add to option set
$optionXML->addAttribute('value', $option);
$optionArray[$option] = $langValue;
}
$optionXML[] = $langValue;
}
}
else
{
// one option
$optionXML = $field->fieldXML->addChild('option');
if (strpos($value, '|') !== false)
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$t, true
);
// add to lang array
$this->setLangContent($this->lang, $langValue, $t);
// now add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
}
else
{
// text is also the value
$langValue = $langView . '_'
. ComponentbuilderHelper::safeFieldName(
$value, true
);
// add to lang array
$this->setLangContent(
$this->lang, $langValue, $value
);
// now add to option set
$optionXML->addAttribute('value', $value);
$optionArray[$value] = $langValue;
}
$optionXML[] = $langValue;
}
}
} }
// incase the field is in the config and has not been set (or is part of a plugin or module) // incase the field is in the config and has not been set (or is part of a plugin or module)
if (('config' === $view_name_single if (('config' === $view_name_single
@ -4151,7 +4656,8 @@ class Fields extends Structure
$target_extension = trim(explode('.', $_extension)[0]); $target_extension = trim(explode('.', $_extension)[0]);
$correction = $target_extension . '.' . $otherView; $correction = $target_extension . '.' . $otherView;
$this->app->enqueueMessage( $this->app->enqueueMessage(
JText::sprintf('<hr /><h3>Category targeting view mismatch</h3> JText::sprintf(
'<hr /><h3>Category targeting view mismatch</h3>
<a>The <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open field"> <a>The <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open field">
category field</a> in <b>(%s) admin view</b> has a mismatching target view. category field</a> in <b>(%s) admin view</b> has a mismatching target view.
<br />To correct the mismatch, the <b>extension</b> value <code>%s</code> in the <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open category field"> <br />To correct the mismatch, the <b>extension</b> value <code>%s</code> in the <a href="index.php?option=com_componentbuilder&view=fields&task=field.edit&id=%s" target="_blank" title="open category field">
@ -4160,7 +4666,10 @@ class Fields extends Structure
best category integration with Joomla</a>. best category integration with Joomla</a>.
<br /><b>Please watch <a href="https://youtu.be/R4WQgcu6Xns" target="_blank" title="very important info on the topic"> <br /><b>Please watch <a href="https://youtu.be/R4WQgcu6Xns" target="_blank" title="very important info on the topic">
this tutorial</a> before proceeding!!!</b>, this tutorial</a> before proceeding!!!</b>,
<a href="https://gist.github.com/Llewellynvdm/e053dc39ae3b2bf769c76a3e62c75b95" target="_blank" title="first watch the tutorial to understand how to use this code">code fix</a></p>', $field['field'], $view_name_single, $_extension, $field['field'], $correction), 'Error' <a href="https://gist.github.com/Llewellynvdm/e053dc39ae3b2bf769c76a3e62c75b95" target="_blank" title="first watch the tutorial to understand how to use this code">code fix</a></p>',
$field['field'], $view_name_single, $_extension,
$field['field'], $correction
), 'Error'
); );
} }
} }
@ -4544,12 +5053,21 @@ class Fields extends Structure
$this->buildDynamique( $this->buildDynamique(
$target, 'fieldcustom', $data['custom']['type'] $target, 'fieldcustom', $data['custom']['type']
); );
// get the extends name
$JFORM_extends = ComponentbuilderHelper::safeString(
$data['custom']['extends']
);
// JFORM_TYPE_HEADER <<<DYNAMIC>>>
$add_default_header = true;
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER' . $this->hhh]
= "//" . $this->setLine(
__LINE__
) . " Import the " . $JFORM_extends . " field type classes needed";
// JFORM_extens <<<DYNAMIC>>> // JFORM_extens <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' $this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_extends' . $this->hhh] . $data['type']][$this->hhh . 'JFORM_extends' . $this->hhh]
= ComponentbuilderHelper::safeString( = $JFORM_extends;
$data['custom']['extends']
);
// JFORM_EXTENDS <<<DYNAMIC>>> // JFORM_EXTENDS <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' $this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_EXTENDS' . $this->hhh] . $data['type']][$this->hhh . 'JFORM_EXTENDS' . $this->hhh]
@ -4582,6 +5100,20 @@ class Fields extends Structure
); );
} }
} }
// check if this is header text
if('HEADER' === $x)
{
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
. $this->hhh]
.= PHP_EOL . $this->setPlaceholders(
$phpBucket, $replace
);
// stop default headers from loading
$add_default_header = false;
}
else
{
// JFORM_TYPE_PHP <<<DYNAMIC>>> // JFORM_TYPE_PHP <<<DYNAMIC>>>
$this->fileContentDynamic['customfield_' $this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_PHP' . $data['type']][$this->hhh . 'JFORM_TYPE_PHP'
@ -4592,6 +5124,33 @@ class Fields extends Structure
} }
} }
} }
// check if we should add default header
if ($add_default_header)
{
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
. $this->hhh]
.= PHP_EOL . "jimport('joomla.form.helper');";
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
. $this->hhh]
.= PHP_EOL . "JFormHelper::loadFieldClass('"
. $JFORM_extends . "');";
}
// check the the JFormHelper::loadFieldClass(..) was set
elseif (strpos(
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
. $this->hhh], 'JFormHelper::loadFieldClass('
) === false)
{
$this->fileContentDynamic['customfield_'
. $data['type']][$this->hhh . 'JFORM_TYPE_HEADER'
. $this->hhh]
.= PHP_EOL . "JFormHelper::loadFieldClass('"
. $JFORM_extends . "');";
}
}
else else
{ {
// first build the custom field type file // first build the custom field type file

View File

@ -1849,9 +1849,20 @@ class Interpretation extends Fields
$method = array(); $method = array();
$method[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; $method[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**";
$method[] = $this->_t(1) . " * Greate user and update given table"; $method[] = $this->_t(1) . " * Greate user and update given table";
$method[] = $this->_t(1) . " *";
$method[] = $this->_t(1) . " * @param array \$credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)";
$method[] = $this->_t(1) . " * @param int \$autologin";
$method[] = $this->_t(1) . " * @param array \$params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)";
$method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration";
$method[] = $this->_t(1) . " *";
$method[] = $this->_t(1) . " * @return int|Error User ID on success, or an error.";
$method[] = $this->_t(1) . " */"; $method[] = $this->_t(1) . " */";
$method[] = $this->_t(1) $method[] = $this->_t(1)
. "public static function createUser(\$new)"; . "public static function createUser(\$credentials, \$autologin = 0,";
$method[] = $this->_t(2) . "\$params = array(";
$method[] = $this->_t(3) . "'useractivation' => 0, 'sendpassword' => 1";
$method[] = $this->_t(2) . "), \$mode = 1";
$method[] = $this->_t(1) . ")";
$method[] = $this->_t(1) . "{"; $method[] = $this->_t(1) . "{";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " load the user component language files if there is an error."; . " load the user component language files if there is an error.";
@ -1864,75 +1875,144 @@ class Interpretation extends Fields
$method[] = $this->_t(2) $method[] = $this->_t(2)
. "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " load the user regestration model"; . " Load the correct user model.";
$method[] = $this->_t(2) $method[] = $this->_t(2) . "if (\$mode == 1)";
. "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " make sure no activation is needed";
$method[] = $this->_t(2)
. "\$useractivation = self::setParams('com_users','useractivation',0);";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " make sure password is send";
$method[] = $this->_t(2)
. "\$sendpassword = self::setParams('com_users','sendpassword',1);";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Check if password was set";
$method[] = $this->_t(2)
. "if (isset(\$new['password']) && isset(\$new['password2']) && self::checkString(\$new['password']) && self::checkString(\$new['password2']))";
$method[] = $this->_t(2) . "{"; $method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Use the users passwords"; . " Load the backend-user model";
$method[] = $this->_t(3) . "\$password = \$new['password'];"; $method[] = $this->_t(3)
$method[] = $this->_t(3) . "\$password2 = \$new['password2'];"; . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');";
$method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "else"; $method[] = $this->_t(2) . "else";
$method[] = $this->_t(2) . "{"; $method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Set random password"; . " Load the user site-registration model";
$method[] = $this->_t(3) . "\$password = self::randomkey(8);"; $method[] = $this->_t(3)
$method[] = $this->_t(3) . "\$password2 = \$password;"; . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');";
$method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " set username if not set"; . " Check if we have params/config";
$method[] = $this->_t(2) . "if (self::checkArray(\$params))";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Make changes to user config";
$method[] = $this->_t(3)
. "foreach (\$params as \$param => \$set)";
$method[] = $this->_t(3) . "{";
$method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
. " If you know of a better path, let me know";
$method[] = $this->_t(4)
."\$params[\$param] = self::setParams('com_users', \$param, \$set);";
$method[] = $this->_t(3) . "}";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Set username to email if not set";
$method[] = $this->_t(2) $method[] = $this->_t(2)
. "if (!isset(\$new['username']) || !self::checkString(\$new['username']))"; . "if (!isset(\$credentials['username']) || !self::checkString(\$credentials['username']))";
$method[] = $this->_t(2) . "{"; $method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) $method[] = $this->_t(3)
. "\$new['username'] = self::safeString(\$new['name']);"; . "\$credentials['username'] = \$credentials['email'];";
$method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " linup new user data"; . " Lineup new user data array";
$method[] = $this->_t(2) . "\$data = array("; $method[] = $this->_t(2) . "\$data = array(";
$method[] = $this->_t(3) . "'username' => \$new['username'],"; $method[] = $this->_t(3) . "'username' => \$credentials['username'],";
$method[] = $this->_t(3) . "'name' => \$new['name'],"; $method[] = $this->_t(3) . "'name' => \$credentials['name']";
$method[] = $this->_t(3) . "'email1' => \$new['email'],";
$method[] = $this->_t(3)
. "'password1' => \$password, // First password field";
$method[] = $this->_t(3)
. "'password2' => \$password2, // Confirm password field";
$method[] = $this->_t(3) . "'block' => 0 );"; $method[] = $this->_t(3) . "'block' => 0 );";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " register the new user"; . " Added details based on mode";
$method[] = $this->_t(2) . "\$userId = \$model->register(\$data);"; $method[] = $this->_t(2) . "if (\$mode == 1)";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Site-registration mode";
$method[] = $this->_t(3) . "\$data['email1'] = \$credentials['email'];";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "else";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Admin-registration mode";
$method[] = $this->_t(3) . "\$data['email'] = \$credentials['email'];";
$method[] = $this->_t(3) . "\$data['registerDate'] = JFactory::getDate()->toSql();";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " set activation back to default"; . " Check if password was set";
$method[] = $this->_t(2) $method[] = $this->_t(2)
. "self::setParams('com_users','useractivation',\$useractivation);"; . "if (\$mode = 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Set random password when empty password was submitted,";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " and we are using the site-registration mode";
$method[] = $this->_t(3) . "\$credentials['password'] = self::randomkey(8);";
$method[] = $this->_t(3) . "\$credentials['password2'] = \$credentials['password'];";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " set send password back to default"; . " Now Add password if set";
$method[] = $this->_t(2) $method[] = $this->_t(2)
. "self::setParams('com_users','sendpassword',\$sendpassword);"; . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2'])))";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "if (\$mode = 1)";
$method[] = $this->_t(3) . "{";
$method[] = $this->_t(4) . "\$data['password1'] = \$credentials['password'];";
$method[] = $this->_t(3) . "}";
$method[] = $this->_t(3) . "else";
$method[] = $this->_t(3) . "{";
$method[] = $this->_t(4) . "\$data['password'] = \$credentials['password'];";
$method[] = $this->_t(3) . "}";
$method[] = $this->_t(3) . "\$data['password2'] = \$credentials['password2'];";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Create the new user";
$method[] = $this->_t(2) . "if (\$mode = 1)";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Site-registration mode";
$method[] = $this->_t(3) . "\$userId = \$model->register(\$data);";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "else";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Admin-registration mode";
$method[] = $this->_t(3) . "\$model->save(\$data);";
$method[] = $this->_t(3) . "\$userId = \$model->getState('user.id', 0);";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Check if we have params";
$method[] = $this->_t(2) . "if (self::checkArray(\$params))";
$method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Change user params/config back";
$method[] = $this->_t(3)
. "foreach (\$params as \$param => \$set)";
$method[] = $this->_t(3) . "{";
$method[] = $this->_t(4) . "//" . $this->setLine(__LINE__)
. " If you know of a better path, let me know";
$method[] = $this->_t(4)
."self::setParams('com_users', \$param, \$set);";
$method[] = $this->_t(3) . "}";
$method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " if user is created"; . " if user is created";
$method[] = $this->_t(2) . "if (\$userId > 0)"; $method[] = $this->_t(2) . "if (\$userId > 0)";
$method[] = $this->_t(2) . "{"; $method[] = $this->_t(2) . "{";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Auto Login if Needed";
$method[] = $this->_t(3) . "if (\$autologin && isset(\$credentials['password']))";
$method[] = $this->_t(3) . "{";
$method[] = $this->_t(4) . "JFactory::getApplication()->login(\$credentials);";
$method[] = $this->_t(3) . "}";
$method[] = $this->_t(3) . "//" . $this->setLine(__LINE__)
. " Return ID";
$method[] = $this->_t(3) . "return \$userId;"; $method[] = $this->_t(3) . "return \$userId;";
$method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "}";
$method[] = $this->_t(2) . "return \$model->getError();"; $method[] = $this->_t(2) . "return \$model->getError();";
$method[] = $this->_t(1) . "}"; $method[] = $this->_t(1) . "}";
$method[] = PHP_EOL . $this->_t(1) $method[] = PHP_EOL . $this->_t(1)
. "protected static function setParams(\$component,\$target,\$value)"; . "public static function setParams(\$component,\$target,\$value)";
$method[] = $this->_t(1) . "{"; $method[] = $this->_t(1) . "{";
$method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__)
. " Get the params and set the new values"; . " Get the params and set the new values";
@ -5662,11 +5742,17 @@ class Interpretation extends Fields
} }
// return buttons if they were build // return buttons if they were build
if (ComponentbuilderHelper::checkArray($buttons)) if (ComponentbuilderHelper::checkArray($buttons))
{
// just to check if the submission script is manually added
if (!isset($view['settings']->php_document) ||
strpos(implode(' ', $view['settings']->php_document),
'/submitbutton.js') === false)
{ {
// set the custom get form method JAVASCRIPT_FOR_BUTTONS // set the custom get form method JAVASCRIPT_FOR_BUTTONS
$this->fileContentDynamic[$view['settings']->code][$this->hhh $this->fileContentDynamic[$view['settings']->code][$this->hhh
. $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh] . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh]
= $this->setJavaScriptForButtons(); = $this->setJavaScriptForButtons();
}
// insure the form is added (only if no form exist) // insure the form is added (only if no form exist)
if (isset($view['settings']->default) if (isset($view['settings']->default)
&& strpos( && strpos(
@ -26396,10 +26482,10 @@ function vdm_dkim() {
$xml .= PHP_EOL . $this->_t(1) . '<config'; $xml .= PHP_EOL . $this->_t(1) . '<config';
$xml .= PHP_EOL . $this->_t(2) $xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="/administrator/components/com_' . 'addrulepath="/administrator/components/com_'
. $this->componentCodeName . '/modules/rules"'; . $this->componentCodeName . '/models/rules"';
$xml .= PHP_EOL . $this->_t(2) $xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="/administrator/components/com_' . 'addfieldpath="/administrator/components/com_'
. $this->componentCodeName . '/modules/fields"'; . $this->componentCodeName . '/models/fields"';
$xml .= PHP_EOL . $this->_t(1) . '>'; $xml .= PHP_EOL . $this->_t(1) . '>';
} }
else else
@ -26432,12 +26518,24 @@ function vdm_dkim() {
. $fieldset . ' fieldset points to the module -->'; . $fieldset . ' fieldset points to the module -->';
$xml .= PHP_EOL . $this->_t(1) . '<fieldset name="' $xml .= PHP_EOL . $this->_t(1) . '<fieldset name="'
. $fieldset . '" label="' . $label . '"'; . $fieldset . '" label="' . $label . '"';
if ($module->target == 2)
{
$xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="/administrator/modules/' . $module->file_name
. '/rules"';
$xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="/administrator/modules/' . $module->file_name
. '/fields"';
}
else
{
$xml .= PHP_EOL . $this->_t(2) $xml .= PHP_EOL . $this->_t(2)
. 'addrulepath="/modules/' . $module->file_name . 'addrulepath="/modules/' . $module->file_name
. '/rules"'; . '/rules"';
$xml .= PHP_EOL . $this->_t(2) $xml .= PHP_EOL . $this->_t(2)
. 'addfieldpath="/modules/' . $module->file_name . 'addfieldpath="/modules/' . $module->file_name
. '/fields"'; . '/fields"';
}
$xml .= PHP_EOL . $this->_t(1) . '>'; $xml .= PHP_EOL . $this->_t(1) . '>';
} }
else else

View File

@ -5535,14 +5535,61 @@ abstract class ComponentbuilderHelper
* *
*/ */
public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true)
{
// build record
$record = new stdClass();
// check if user can edit
if (self::canEditItem($record, $item, $view, $views, $component))
{
// set the edit link
if ($jRoute)
{
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
}
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
}
return false;
}
/**
* Can Edit (either any, or own)
*
* @param int $item The item to edit
* @param string $view The type of item to edit
* @param string $views The list view controller name
* @param string $component The component these views belong to
*
* @return bool if user can edit returns true els
*
*/
public static function allowEdit(&$item, $view, $views, $component = 'com_componentbuilder')
{
// build record
$record = new stdClass();
return self::canEditItem($record, $item, $view, $views, $component);
}
/**
* Can Edit (either any, or own)
*
* @param int $item The item to edit
* @param string $view The type of item to edit
* @param string $views The list view controller name
* @param string $component The component these views belong to
*
* @return bool if user can edit returns true els
*
*/
protected static function canEditItem(&$record, &$item, $view, $views, $component = 'com_componentbuilder')
{ {
// make sure the user has access to view // make sure the user has access to view
if (!JFactory::getUser()->authorise($view. '.access', $component)) if (!JFactory::getUser()->authorise($view. '.access', $component))
{ {
return false; return false;
} }
// build record // we start with false.
$record = new stdClass(); $can_edit = false;
// check that we have the ID // check that we have the ID
if (self::checkObject($item) && isset($item->id)) if (self::checkObject($item) && isset($item->id))
{ {
@ -5572,26 +5619,15 @@ abstract class ComponentbuilderHelper
// get user action permission to edit // get user action permission to edit
$action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component));
// check if the view permission is set // check if the view permission is set
if (($edit = $action->get($view . '.edit', 'none-set')) === 'none-set') if (($can_edit = $action->get($view . '.edit', 'none-set')) === 'none-set')
{ {
// fall back on the core permission then // fall back on the core permission then (this can be an issue)
$edit = $action->get('core.edit', 'none-set'); $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false));
}
// can edit
if ($edit)
{
// set the edit link
if ($jRoute)
{
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
}
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
} }
} }
return false; return $can_edit;
} }
/** /**
* set subform type table * set subform type table
* *
@ -5633,9 +5669,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy date * Change to nice fancy date
*/ */
public static function fancyDate($date) public static function fancyDate($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5645,9 +5681,9 @@ abstract class ComponentbuilderHelper
/** /**
* get date based in period past * get date based in period past
*/ */
public static function fancyDynamicDate($date) public static function fancyDynamicDate($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5671,9 +5707,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy day time and date * Change to nice fancy day time and date
*/ */
public static function fancyDayTimeDate($time) public static function fancyDayTimeDate($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5683,9 +5719,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy time and date * Change to nice fancy time and date
*/ */
public static function fancyDateTime($time) public static function fancyDateTime($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5695,9 +5731,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice hour:minutes time * Change to nice hour:minutes time
*/ */
public static function fancyTime($time) public static function fancyTime($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5707,9 +5743,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date day as Sunday through Saturday * set the date day as Sunday through Saturday
*/ */
public static function setDayName($date) public static function setDayName($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5719,9 +5755,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date month as January through December * set the date month as January through December
*/ */
public static function setMonthName($date) public static function setMonthName($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5731,9 +5767,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date day as 1st * set the date day as 1st
*/ */
public static function setDay($date) public static function setDay($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5743,9 +5779,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date month as 5 * set the date month as 5
*/ */
public static function setMonth($date) public static function setMonth($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5755,9 +5791,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date year as 2004 (for charts) * set the date year as 2004 (for charts)
*/ */
public static function setYear($date) public static function setYear($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5767,9 +5803,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 2004/05 (for charts) * set the date as 2004/05 (for charts)
*/ */
public static function setYearMonth($date, $spacer = '/') public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5779,9 +5815,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 2004/05/03 (for charts) * set the date as 2004/05/03 (for charts)
*/ */
public static function setYearMonthDay($date, $spacer = '/') public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5791,9 +5827,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 03/05/2004 * set the date as 03/05/2004
*/ */
public static function setDayMonthYear($date, $spacer = '/') public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5810,6 +5846,16 @@ abstract class ComponentbuilderHelper
&& ($timestamp >= ~PHP_INT_MAX); && ($timestamp >= ~PHP_INT_MAX);
} }
/**
* Check if string is a valid date
* https://www.php.net/manual/en/function.checkdate.php#113205
*/
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
/** /**
* Load the Composer Vendors * Load the Composer Vendors

View File

@ -13,7 +13,7 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// set the defaults // set the defaults
$items = $displayData->vyffields; $items = $displayData->vycfields;
$user = JFactory::getUser(); $user = JFactory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL

View File

@ -13,7 +13,7 @@
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// set the defaults // set the defaults
$items = $displayData->vyplinked_components; $items = $displayData->vymlinked_components;
$user = JFactory::getUser(); $user = JFactory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL

View File

@ -249,7 +249,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
* *
* @return mixed An array of data items on success, false on failure. * @return mixed An array of data items on success, false on failure.
*/ */
public function getVyffields() public function getVycfields()
{ {
// Get the user object. // Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();
@ -337,13 +337,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// convert datatype // convert datatype
$item->datatype = $this->selectionTranslationVyffields($item->datatype, 'datatype'); $item->datatype = $this->selectionTranslationVycfields($item->datatype, 'datatype');
// convert indexes // convert indexes
$item->indexes = $this->selectionTranslationVyffields($item->indexes, 'indexes'); $item->indexes = $this->selectionTranslationVycfields($item->indexes, 'indexes');
// convert null_switch // convert null_switch
$item->null_switch = $this->selectionTranslationVyffields($item->null_switch, 'null_switch'); $item->null_switch = $this->selectionTranslationVycfields($item->null_switch, 'null_switch');
// convert store // convert store
$item->store = $this->selectionTranslationVyffields($item->store, 'store'); $item->store = $this->selectionTranslationVycfields($item->store, 'store');
} }
} }
@ -357,7 +357,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
* *
* @return translatable string * @return translatable string
*/ */
public function selectionTranslationVyffields($value,$name) public function selectionTranslationVycfields($value,$name)
{ {
// Array of datatype language strings // Array of datatype language strings
if ($name === 'datatype') if ($name === 'datatype')

View File

@ -13,11 +13,8 @@ jform_vvvvwczvxo_required = false;
jform_vvvvwdavxp_required = false; jform_vvvvwdavxp_required = false;
jform_vvvvwdbvxq_required = false; jform_vvvvwdbvxq_required = false;
jform_vvvvwdcvxr_required = false; jform_vvvvwdcvxr_required = false;
jform_vvvvwddvxs_required = false; jform_vvvvwdfvxs_required = false;
jform_vvvvwdgvxt_required = false; jform_vvvvwdfvxt_required = false;
jform_vvvvwdgvxu_required = false;
jform_vvvvwdhvxv_required = false;
jform_vvvvwdhvxw_required = false;
// Initial Script // Initial Script
jQuery(document).ready(function() jQuery(document).ready(function()
@ -34,32 +31,24 @@ jQuery(document).ready(function()
var datatype_vvvvwdc = jQuery("#jform_datatype").val(); var datatype_vvvvwdc = jQuery("#jform_datatype").val();
vvvvwdc(datatype_vvvvwdc); vvvvwdc(datatype_vvvvwdc);
var store_vvvvwdd = jQuery("#jform_store").val();
var datatype_vvvvwdd = jQuery("#jform_datatype").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val();
vvvvwdd(datatype_vvvvwdd); vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);
var store_vvvvwde = jQuery("#jform_store").val(); var store_vvvvwdf = jQuery("#jform_store").val();
var datatype_vvvvwde = jQuery("#jform_datatype").val(); vvvvwdf(store_vvvvwdf);
vvvvwde(store_vvvvwde,datatype_vvvvwde);
var store_vvvvwdg = jQuery("#jform_store").val(); var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val();
var datatype_vvvvwdg = jQuery("#jform_datatype").val(); vvvvwdg(add_css_view_vvvvwdg);
vvvvwdg(store_vvvvwdg,datatype_vvvvwdg);
var datatype_vvvvwdh = jQuery("#jform_datatype").val(); var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val();
var store_vvvvwdh = jQuery("#jform_store").val(); vvvvwdh(add_css_views_vvvvwdh);
vvvvwdh(datatype_vvvvwdh,store_vvvvwdh);
var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwdi(add_css_view_vvvvwdi); vvvvwdi(add_javascript_view_footer_vvvvwdi);
var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvwdj(add_css_views_vvvvwdj); vvvvwdj(add_javascript_views_footer_vvvvwdj);
var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwdk(add_javascript_view_footer_vvvvwdk);
var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvwdl(add_javascript_views_footer_vvvvwdl);
}); });
// the vvvvwcz function // the vvvvwcz function
@ -289,8 +278,20 @@ function datatype_vvvvwdc_SomeFunc(datatype_vvvvwdc)
} }
// the vvvvwdd function // the vvvvwdd function
function vvvvwdd(datatype_vvvvwdd) function vvvvwdd(store_vvvvwdd,datatype_vvvvwdd)
{ {
if (isSet(store_vvvvwdd) && store_vvvvwdd.constructor !== Array)
{
var temp_vvvvwdd = store_vvvvwdd;
var store_vvvvwdd = [];
store_vvvvwdd.push(temp_vvvvwdd);
}
else if (!isSet(store_vvvvwdd))
{
var store_vvvvwdd = [];
}
var store = store_vvvvwdd.some(store_vvvvwdd_SomeFunc);
if (isSet(datatype_vvvvwdd) && datatype_vvvvwdd.constructor !== Array) if (isSet(datatype_vvvvwdd) && datatype_vvvvwdd.constructor !== Array)
{ {
var temp_vvvvwdd = datatype_vvvvwdd; var temp_vvvvwdd = datatype_vvvvwdd;
@ -305,32 +306,25 @@ function vvvvwdd(datatype_vvvvwdd)
// set this function logic // set this function logic
if (datatype) if (store && datatype)
{ {
jQuery('#jform_store').closest('.control-group').show(); jQuery('.note_whmcs_encryption').closest('.control-group').show();
// add required attribute to store field
if (jform_vvvvwddvxs_required)
{
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
jform_vvvvwddvxs_required = false;
}
} }
else else
{ {
jQuery('#jform_store').closest('.control-group').hide(); jQuery('.note_whmcs_encryption').closest('.control-group').hide();
// remove required attribute from store field }
if (!jform_vvvvwddvxs_required) }
// the vvvvwdd Some function
function store_vvvvwdd_SomeFunc(store_vvvvwdd)
{
// set the function logic
if (store_vvvvwdd == 4)
{ {
updateFieldRequired('store',1); return true;
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
jform_vvvvwddvxs_required = true;
}
} }
return false;
} }
// the vvvvwdd Some function // the vvvvwdd Some function
@ -344,61 +338,82 @@ function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd)
return false; return false;
} }
// the vvvvwde function // the vvvvwdf function
function vvvvwde(store_vvvvwde,datatype_vvvvwde) function vvvvwdf(store_vvvvwdf)
{ {
if (isSet(store_vvvvwde) && store_vvvvwde.constructor !== Array) if (isSet(store_vvvvwdf) && store_vvvvwdf.constructor !== Array)
{ {
var temp_vvvvwde = store_vvvvwde; var temp_vvvvwdf = store_vvvvwdf;
var store_vvvvwde = []; var store_vvvvwdf = [];
store_vvvvwde.push(temp_vvvvwde); store_vvvvwdf.push(temp_vvvvwdf);
} }
else if (!isSet(store_vvvvwde)) else if (!isSet(store_vvvvwdf))
{ {
var store_vvvvwde = []; var store_vvvvwdf = [];
} }
var store = store_vvvvwde.some(store_vvvvwde_SomeFunc); var store = store_vvvvwdf.some(store_vvvvwdf_SomeFunc);
if (isSet(datatype_vvvvwde) && datatype_vvvvwde.constructor !== Array)
{
var temp_vvvvwde = datatype_vvvvwde;
var datatype_vvvvwde = [];
datatype_vvvvwde.push(temp_vvvvwde);
}
else if (!isSet(datatype_vvvvwde))
{
var datatype_vvvvwde = [];
}
var datatype = datatype_vvvvwde.some(datatype_vvvvwde_SomeFunc);
// set this function logic // set this function logic
if (store && datatype) if (store)
{ {
jQuery('.note_whmcs_encryption').closest('.control-group').show(); jQuery('#jform_initiator_on_get_model').closest('.control-group').show();
jQuery('#jform_initiator_on_save_model').closest('.control-group').show();
jQuery('.note_expert_field_save_mode').closest('.control-group').show();
jQuery('#jform_on_get_model_field').closest('.control-group').show();
// add required attribute to on_get_model_field field
if (jform_vvvvwdfvxs_required)
{
updateFieldRequired('on_get_model_field',0);
jQuery('#jform_on_get_model_field').prop('required','required');
jQuery('#jform_on_get_model_field').attr('aria-required',true);
jQuery('#jform_on_get_model_field').addClass('required');
jform_vvvvwdfvxs_required = false;
}
jQuery('#jform_on_save_model_field').closest('.control-group').show();
// add required attribute to on_save_model_field field
if (jform_vvvvwdfvxt_required)
{
updateFieldRequired('on_save_model_field',0);
jQuery('#jform_on_save_model_field').prop('required','required');
jQuery('#jform_on_save_model_field').attr('aria-required',true);
jQuery('#jform_on_save_model_field').addClass('required');
jform_vvvvwdfvxt_required = false;
}
} }
else else
{ {
jQuery('.note_whmcs_encryption').closest('.control-group').hide(); jQuery('#jform_initiator_on_get_model').closest('.control-group').hide();
} jQuery('#jform_initiator_on_save_model').closest('.control-group').hide();
} jQuery('.note_expert_field_save_mode').closest('.control-group').hide();
jQuery('#jform_on_get_model_field').closest('.control-group').hide();
// the vvvvwde Some function // remove required attribute from on_get_model_field field
function store_vvvvwde_SomeFunc(store_vvvvwde) if (!jform_vvvvwdfvxs_required)
{
// set the function logic
if (store_vvvvwde == 4)
{ {
return true; updateFieldRequired('on_get_model_field',1);
jQuery('#jform_on_get_model_field').removeAttr('required');
jQuery('#jform_on_get_model_field').removeAttr('aria-required');
jQuery('#jform_on_get_model_field').removeClass('required');
jform_vvvvwdfvxs_required = true;
}
jQuery('#jform_on_save_model_field').closest('.control-group').hide();
// remove required attribute from on_save_model_field field
if (!jform_vvvvwdfvxt_required)
{
updateFieldRequired('on_save_model_field',1);
jQuery('#jform_on_save_model_field').removeAttr('required');
jQuery('#jform_on_save_model_field').removeAttr('aria-required');
jQuery('#jform_on_save_model_field').removeClass('required');
jform_vvvvwdfvxt_required = true;
}
} }
return false;
} }
// the vvvvwde Some function // the vvvvwdf Some function
function datatype_vvvvwde_SomeFunc(datatype_vvvvwde) function store_vvvvwdf_SomeFunc(store_vvvvwdf)
{ {
// set the function logic // set the function logic
if (datatype_vvvvwde == 'CHAR' || datatype_vvvvwde == 'VARCHAR' || datatype_vvvvwde == 'TEXT' || datatype_vvvvwde == 'MEDIUMTEXT' || datatype_vvvvwde == 'LONGTEXT' || datatype_vvvvwde == 'BLOB' || datatype_vvvvwde == 'TINYBLOB' || datatype_vvvvwde == 'MEDIUMBLOB' || datatype_vvvvwde == 'LONGBLOB') if (store_vvvvwdf == 6)
{ {
return true; return true;
} }
@ -406,220 +421,10 @@ function datatype_vvvvwde_SomeFunc(datatype_vvvvwde)
} }
// the vvvvwdg function // the vvvvwdg function
function vvvvwdg(store_vvvvwdg,datatype_vvvvwdg) function vvvvwdg(add_css_view_vvvvwdg)
{
if (isSet(store_vvvvwdg) && store_vvvvwdg.constructor !== Array)
{
var temp_vvvvwdg = store_vvvvwdg;
var store_vvvvwdg = [];
store_vvvvwdg.push(temp_vvvvwdg);
}
else if (!isSet(store_vvvvwdg))
{
var store_vvvvwdg = [];
}
var store = store_vvvvwdg.some(store_vvvvwdg_SomeFunc);
if (isSet(datatype_vvvvwdg) && datatype_vvvvwdg.constructor !== Array)
{
var temp_vvvvwdg = datatype_vvvvwdg;
var datatype_vvvvwdg = [];
datatype_vvvvwdg.push(temp_vvvvwdg);
}
else if (!isSet(datatype_vvvvwdg))
{
var datatype_vvvvwdg = [];
}
var datatype = datatype_vvvvwdg.some(datatype_vvvvwdg_SomeFunc);
// set this function logic
if (store && datatype)
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').show();
jQuery('#jform_initiator_on_save_model').closest('.control-group').show();
jQuery('#jform_on_save_model_field').closest('.control-group').show();
// add required attribute to on_save_model_field field
if (jform_vvvvwdgvxt_required)
{
updateFieldRequired('on_save_model_field',0);
jQuery('#jform_on_save_model_field').prop('required','required');
jQuery('#jform_on_save_model_field').attr('aria-required',true);
jQuery('#jform_on_save_model_field').addClass('required');
jform_vvvvwdgvxt_required = false;
}
jQuery('.note_expert_field_save_mode').closest('.control-group').show();
jQuery('#jform_on_get_model_field').closest('.control-group').show();
// add required attribute to on_get_model_field field
if (jform_vvvvwdgvxu_required)
{
updateFieldRequired('on_get_model_field',0);
jQuery('#jform_on_get_model_field').prop('required','required');
jQuery('#jform_on_get_model_field').attr('aria-required',true);
jQuery('#jform_on_get_model_field').addClass('required');
jform_vvvvwdgvxu_required = false;
}
}
else
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').hide();
jQuery('#jform_initiator_on_save_model').closest('.control-group').hide();
jQuery('#jform_on_save_model_field').closest('.control-group').hide();
// remove required attribute from on_save_model_field field
if (!jform_vvvvwdgvxt_required)
{
updateFieldRequired('on_save_model_field',1);
jQuery('#jform_on_save_model_field').removeAttr('required');
jQuery('#jform_on_save_model_field').removeAttr('aria-required');
jQuery('#jform_on_save_model_field').removeClass('required');
jform_vvvvwdgvxt_required = true;
}
jQuery('.note_expert_field_save_mode').closest('.control-group').hide();
jQuery('#jform_on_get_model_field').closest('.control-group').hide();
// remove required attribute from on_get_model_field field
if (!jform_vvvvwdgvxu_required)
{
updateFieldRequired('on_get_model_field',1);
jQuery('#jform_on_get_model_field').removeAttr('required');
jQuery('#jform_on_get_model_field').removeAttr('aria-required');
jQuery('#jform_on_get_model_field').removeClass('required');
jform_vvvvwdgvxu_required = true;
}
}
}
// the vvvvwdg Some function
function store_vvvvwdg_SomeFunc(store_vvvvwdg)
{ {
// set the function logic // set the function logic
if (store_vvvvwdg == 6) if (add_css_view_vvvvwdg == 1)
{
return true;
}
return false;
}
// the vvvvwdg Some function
function datatype_vvvvwdg_SomeFunc(datatype_vvvvwdg)
{
// set the function logic
if (datatype_vvvvwdg == 'CHAR' || datatype_vvvvwdg == 'VARCHAR' || datatype_vvvvwdg == 'TEXT' || datatype_vvvvwdg == 'MEDIUMTEXT' || datatype_vvvvwdg == 'LONGTEXT' || datatype_vvvvwdg == 'BLOB' || datatype_vvvvwdg == 'TINYBLOB' || datatype_vvvvwdg == 'MEDIUMBLOB' || datatype_vvvvwdg == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwdh function
function vvvvwdh(datatype_vvvvwdh,store_vvvvwdh)
{
if (isSet(datatype_vvvvwdh) && datatype_vvvvwdh.constructor !== Array)
{
var temp_vvvvwdh = datatype_vvvvwdh;
var datatype_vvvvwdh = [];
datatype_vvvvwdh.push(temp_vvvvwdh);
}
else if (!isSet(datatype_vvvvwdh))
{
var datatype_vvvvwdh = [];
}
var datatype = datatype_vvvvwdh.some(datatype_vvvvwdh_SomeFunc);
if (isSet(store_vvvvwdh) && store_vvvvwdh.constructor !== Array)
{
var temp_vvvvwdh = store_vvvvwdh;
var store_vvvvwdh = [];
store_vvvvwdh.push(temp_vvvvwdh);
}
else if (!isSet(store_vvvvwdh))
{
var store_vvvvwdh = [];
}
var store = store_vvvvwdh.some(store_vvvvwdh_SomeFunc);
// set this function logic
if (datatype && store)
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').show();
jQuery('#jform_initiator_on_save_model').closest('.control-group').show();
jQuery('#jform_on_save_model_field').closest('.control-group').show();
// add required attribute to on_save_model_field field
if (jform_vvvvwdhvxv_required)
{
updateFieldRequired('on_save_model_field',0);
jQuery('#jform_on_save_model_field').prop('required','required');
jQuery('#jform_on_save_model_field').attr('aria-required',true);
jQuery('#jform_on_save_model_field').addClass('required');
jform_vvvvwdhvxv_required = false;
}
jQuery('.note_expert_field_save_mode').closest('.control-group').show();
jQuery('#jform_on_get_model_field').closest('.control-group').show();
// add required attribute to on_get_model_field field
if (jform_vvvvwdhvxw_required)
{
updateFieldRequired('on_get_model_field',0);
jQuery('#jform_on_get_model_field').prop('required','required');
jQuery('#jform_on_get_model_field').attr('aria-required',true);
jQuery('#jform_on_get_model_field').addClass('required');
jform_vvvvwdhvxw_required = false;
}
}
else
{
jQuery('#jform_initiator_on_get_model').closest('.control-group').hide();
jQuery('#jform_initiator_on_save_model').closest('.control-group').hide();
jQuery('#jform_on_save_model_field').closest('.control-group').hide();
// remove required attribute from on_save_model_field field
if (!jform_vvvvwdhvxv_required)
{
updateFieldRequired('on_save_model_field',1);
jQuery('#jform_on_save_model_field').removeAttr('required');
jQuery('#jform_on_save_model_field').removeAttr('aria-required');
jQuery('#jform_on_save_model_field').removeClass('required');
jform_vvvvwdhvxv_required = true;
}
jQuery('.note_expert_field_save_mode').closest('.control-group').hide();
jQuery('#jform_on_get_model_field').closest('.control-group').hide();
// remove required attribute from on_get_model_field field
if (!jform_vvvvwdhvxw_required)
{
updateFieldRequired('on_get_model_field',1);
jQuery('#jform_on_get_model_field').removeAttr('required');
jQuery('#jform_on_get_model_field').removeAttr('aria-required');
jQuery('#jform_on_get_model_field').removeClass('required');
jform_vvvvwdhvxw_required = true;
}
}
}
// the vvvvwdh Some function
function datatype_vvvvwdh_SomeFunc(datatype_vvvvwdh)
{
// set the function logic
if (datatype_vvvvwdh == 'CHAR' || datatype_vvvvwdh == 'VARCHAR' || datatype_vvvvwdh == 'TEXT' || datatype_vvvvwdh == 'MEDIUMTEXT' || datatype_vvvvwdh == 'LONGTEXT' || datatype_vvvvwdh == 'BLOB' || datatype_vvvvwdh == 'TINYBLOB' || datatype_vvvvwdh == 'MEDIUMBLOB' || datatype_vvvvwdh == 'LONGBLOB')
{
return true;
}
return false;
}
// the vvvvwdh Some function
function store_vvvvwdh_SomeFunc(store_vvvvwdh)
{
// set the function logic
if (store_vvvvwdh == 6)
{
return true;
}
return false;
}
// the vvvvwdi function
function vvvvwdi(add_css_view_vvvvwdi)
{
// set the function logic
if (add_css_view_vvvvwdi == 1)
{ {
jQuery('#jform_css_view-lbl').closest('.control-group').show(); jQuery('#jform_css_view-lbl').closest('.control-group').show();
} }
@ -629,11 +434,11 @@ function vvvvwdi(add_css_view_vvvvwdi)
} }
} }
// the vvvvwdj function // the vvvvwdh function
function vvvvwdj(add_css_views_vvvvwdj) function vvvvwdh(add_css_views_vvvvwdh)
{ {
// set the function logic // set the function logic
if (add_css_views_vvvvwdj == 1) if (add_css_views_vvvvwdh == 1)
{ {
jQuery('#jform_css_views-lbl').closest('.control-group').show(); jQuery('#jform_css_views-lbl').closest('.control-group').show();
} }
@ -643,11 +448,11 @@ function vvvvwdj(add_css_views_vvvvwdj)
} }
} }
// the vvvvwdk function // the vvvvwdi function
function vvvvwdk(add_javascript_view_footer_vvvvwdk) function vvvvwdi(add_javascript_view_footer_vvvvwdi)
{ {
// set the function logic // set the function logic
if (add_javascript_view_footer_vvvvwdk == 1) if (add_javascript_view_footer_vvvvwdi == 1)
{ {
jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show(); jQuery('#jform_javascript_view_footer-lbl').closest('.control-group').show();
} }
@ -657,11 +462,11 @@ function vvvvwdk(add_javascript_view_footer_vvvvwdk)
} }
} }
// the vvvvwdl function // the vvvvwdj function
function vvvvwdl(add_javascript_views_footer_vvvvwdl) function vvvvwdj(add_javascript_views_footer_vvvvwdj)
{ {
// set the function logic // set the function logic
if (add_javascript_views_footer_vvvvwdl == 1) if (add_javascript_views_footer_vvvvwdj == 1)
{ {
jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show(); jQuery('#jform_javascript_views_footer-lbl').closest('.control-group').show();
} }

File diff suppressed because it is too large Load Diff

View File

@ -9,98 +9,210 @@
*/ */
// Some Global Values // Some Global Values
jform_vvvvwekvyq_required = false; jform_vvvvweivyn_required = false;
jform_vvvvwelvyr_required = false; jform_vvvvwejvyo_required = false;
jform_vvvvwemvys_required = false; jform_vvvvwekvyp_required = false;
jform_vvvvwenvyt_required = false; jform_vvvvwelvyq_required = false;
jform_vvvvwepvyu_required = false; jform_vvvvwenvyr_required = false;
// Initial Script // Initial Script
jQuery(document).ready(function() jQuery(document).ready(function()
{ {
var location_vvvvwek = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwek(location_vvvvwek); vvvvwei(location_vvvvwei);
var location_vvvvwel = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwel(location_vvvvwel); vvvvwej(location_vvvvwej);
var type_vvvvwek = jQuery("#jform_type").val();
vvvvwek(type_vvvvwek);
var type_vvvvwel = jQuery("#jform_type").val();
vvvvwel(type_vvvvwel);
var type_vvvvwem = jQuery("#jform_type").val(); var type_vvvvwem = jQuery("#jform_type").val();
vvvvwem(type_vvvvwem); vvvvwem(type_vvvvwem);
var type_vvvvwen = jQuery("#jform_type").val(); var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwen(type_vvvvwen); vvvvwen(target_vvvvwen);
var type_vvvvweo = jQuery("#jform_type").val();
vvvvweo(type_vvvvweo);
var target_vvvvwep = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwep(target_vvvvwep);
}); });
// the vvvvwek function // the vvvvwei function
function vvvvwek(location_vvvvwek) function vvvvwei(location_vvvvwei)
{ {
// set the function logic // set the function logic
if (location_vvvvwek == 1) if (location_vvvvwei == 1)
{ {
jQuery('#jform_admin_view').closest('.control-group').show(); jQuery('#jform_admin_view').closest('.control-group').show();
// add required attribute to admin_view field // add required attribute to admin_view field
if (jform_vvvvwekvyq_required) if (jform_vvvvweivyn_required)
{ {
updateFieldRequired('admin_view',0); updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required'); jQuery('#jform_admin_view').addClass('required');
jform_vvvvwekvyq_required = false; jform_vvvvweivyn_required = false;
} }
} }
else else
{ {
jQuery('#jform_admin_view').closest('.control-group').hide(); jQuery('#jform_admin_view').closest('.control-group').hide();
// remove required attribute from admin_view field // remove required attribute from admin_view field
if (!jform_vvvvwekvyq_required) if (!jform_vvvvweivyn_required)
{ {
updateFieldRequired('admin_view',1); updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required'); jQuery('#jform_admin_view').removeClass('required');
jform_vvvvwekvyq_required = true; jform_vvvvweivyn_required = true;
} }
} }
} }
// the vvvvwel function // the vvvvwej function
function vvvvwel(location_vvvvwel) function vvvvwej(location_vvvvwej)
{ {
// set the function logic // set the function logic
if (location_vvvvwel == 2) if (location_vvvvwej == 2)
{ {
jQuery('#jform_site_view').closest('.control-group').show(); jQuery('#jform_site_view').closest('.control-group').show();
// add required attribute to site_view field // add required attribute to site_view field
if (jform_vvvvwelvyr_required) if (jform_vvvvwejvyo_required)
{ {
updateFieldRequired('site_view',0); updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required'); jQuery('#jform_site_view').addClass('required');
jform_vvvvwelvyr_required = false; jform_vvvvwejvyo_required = false;
} }
} }
else else
{ {
jQuery('#jform_site_view').closest('.control-group').hide(); jQuery('#jform_site_view').closest('.control-group').hide();
// remove required attribute from site_view field // remove required attribute from site_view field
if (!jform_vvvvwelvyr_required) if (!jform_vvvvwejvyo_required)
{ {
updateFieldRequired('site_view',1); updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required'); jQuery('#jform_site_view').removeClass('required');
jform_vvvvwelvyr_required = true; jform_vvvvwejvyo_required = true;
} }
} }
} }
// the vvvvwek function
function vvvvwek(type_vvvvwek)
{
if (isSet(type_vvvvwek) && type_vvvvwek.constructor !== Array)
{
var temp_vvvvwek = type_vvvvwek;
var type_vvvvwek = [];
type_vvvvwek.push(temp_vvvvwek);
}
else if (!isSet(type_vvvvwek))
{
var type_vvvvwek = [];
}
var type = type_vvvvwek.some(type_vvvvwek_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvwekvyp_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwekvyp_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvwekvyp_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwekvyp_required = true;
}
}
}
// the vvvvwek Some function
function type_vvvvwek_SomeFunc(type_vvvvwek)
{
// set the function logic
if (type_vvvvwek == 3)
{
return true;
}
return false;
}
// the vvvvwel function
function vvvvwel(type_vvvvwel)
{
if (isSet(type_vvvvwel) && type_vvvvwel.constructor !== Array)
{
var temp_vvvvwel = type_vvvvwel;
var type_vvvvwel = [];
type_vvvvwel.push(temp_vvvvwel);
}
else if (!isSet(type_vvvvwel))
{
var type_vvvvwel = [];
}
var type = type_vvvvwel.some(type_vvvvwel_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvwelvyq_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwelvyq_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvwelvyq_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwelvyq_required = true;
}
}
}
// the vvvvwel Some function
function type_vvvvwel_SomeFunc(type_vvvvwel)
{
// set the function logic
if (type_vvvvwel == 1)
{
return true;
}
return false;
}
// the vvvvwem function // the vvvvwem function
function vvvvwem(type_vvvvwem) function vvvvwem(type_vvvvwem)
{ {
@ -117,118 +229,6 @@ function vvvvwem(type_vvvvwem)
var type = type_vvvvwem.some(type_vvvvwem_SomeFunc); var type = type_vvvvwem.some(type_vvvvwem_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
// add required attribute to url field
if (jform_vvvvwemvys_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwemvys_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
// remove required attribute from url field
if (!jform_vvvvwemvys_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwemvys_required = true;
}
}
}
// the vvvvwem Some function
function type_vvvvwem_SomeFunc(type_vvvvwem)
{
// set the function logic
if (type_vvvvwem == 3)
{
return true;
}
return false;
}
// the vvvvwen function
function vvvvwen(type_vvvvwen)
{
if (isSet(type_vvvvwen) && type_vvvvwen.constructor !== Array)
{
var temp_vvvvwen = type_vvvvwen;
var type_vvvvwen = [];
type_vvvvwen.push(temp_vvvvwen);
}
else if (!isSet(type_vvvvwen))
{
var type_vvvvwen = [];
}
var type = type_vvvvwen.some(type_vvvvwen_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
// add required attribute to article field
if (jform_vvvvwenvyt_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwenvyt_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
// remove required attribute from article field
if (!jform_vvvvwenvyt_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwenvyt_required = true;
}
}
}
// the vvvvwen Some function
function type_vvvvwen_SomeFunc(type_vvvvwen)
{
// set the function logic
if (type_vvvvwen == 1)
{
return true;
}
return false;
}
// the vvvvweo function
function vvvvweo(type_vvvvweo)
{
if (isSet(type_vvvvweo) && type_vvvvweo.constructor !== Array)
{
var temp_vvvvweo = type_vvvvweo;
var type_vvvvweo = [];
type_vvvvweo.push(temp_vvvvweo);
}
else if (!isSet(type_vvvvweo))
{
var type_vvvvweo = [];
}
var type = type_vvvvweo.some(type_vvvvweo_SomeFunc);
// set this function logic // set this function logic
if (type) if (type)
{ {
@ -240,45 +240,45 @@ function vvvvweo(type_vvvvweo)
} }
} }
// the vvvvweo Some function // the vvvvwem Some function
function type_vvvvweo_SomeFunc(type_vvvvweo) function type_vvvvwem_SomeFunc(type_vvvvwem)
{ {
// set the function logic // set the function logic
if (type_vvvvweo == 2) if (type_vvvvwem == 2)
{ {
return true; return true;
} }
return false; return false;
} }
// the vvvvwep function // the vvvvwen function
function vvvvwep(target_vvvvwep) function vvvvwen(target_vvvvwen)
{ {
// set the function logic // set the function logic
if (target_vvvvwep == 1) if (target_vvvvwen == 1)
{ {
jQuery('#jform_groups').closest('.control-group').show(); jQuery('#jform_groups').closest('.control-group').show();
// add required attribute to groups field // add required attribute to groups field
if (jform_vvvvwepvyu_required) if (jform_vvvvwenvyr_required)
{ {
updateFieldRequired('groups',0); updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required'); jQuery('#jform_groups').addClass('required');
jform_vvvvwepvyu_required = false; jform_vvvvwenvyr_required = false;
} }
} }
else else
{ {
jQuery('#jform_groups').closest('.control-group').hide(); jQuery('#jform_groups').closest('.control-group').hide();
// remove required attribute from groups field // remove required attribute from groups field
if (!jform_vvvvwepvyu_required) if (!jform_vvvvwenvyr_required)
{ {
updateFieldRequired('groups',1); updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required'); jQuery('#jform_groups').removeClass('required');
jform_vvvvwepvyu_required = true; jform_vvvvwenvyr_required = true;
} }
} }
} }

View File

@ -9,24 +9,28 @@
*/ */
// Some Global Values // Some Global Values
jform_vvvvweavyg_required = false; jform_vvvvwdyvyd_required = false;
jform_vvvvweavyh_required = false; jform_vvvvwdyvye_required = false;
jform_vvvvweavyi_required = false; jform_vvvvwdyvyf_required = false;
jform_vvvvwdyvyg_required = false;
jform_vvvvwdyvyh_required = false;
jform_vvvvwdzvyi_required = false;
jform_vvvvweavyj_required = false; jform_vvvvweavyj_required = false;
jform_vvvvweavyk_required = false; jform_vvvvwecvyk_required = false;
jform_vvvvwebvyl_required = false; jform_vvvvweevyl_required = false;
jform_vvvvwecvym_required = false;
jform_vvvvweevyn_required = false;
jform_vvvvwegvyo_required = false;
// Initial Script // Initial Script
jQuery(document).ready(function() jQuery(document).ready(function()
{ {
var protocol_vvvvwea = jQuery("#jform_protocol").val(); var protocol_vvvvwdy = jQuery("#jform_protocol").val();
vvvvwea(protocol_vvvvwea); vvvvwdy(protocol_vvvvwdy);
var protocol_vvvvweb = jQuery("#jform_protocol").val(); var protocol_vvvvwdz = jQuery("#jform_protocol").val();
vvvvweb(protocol_vvvvweb); vvvvwdz(protocol_vvvvwdz);
var protocol_vvvvwea = jQuery("#jform_protocol").val();
var authentication_vvvvwea = jQuery("#jform_authentication").val();
vvvvwea(protocol_vvvvwea,authentication_vvvvwea);
var protocol_vvvvwec = jQuery("#jform_protocol").val(); var protocol_vvvvwec = jQuery("#jform_protocol").val();
var authentication_vvvvwec = jQuery("#jform_authentication").val(); var authentication_vvvvwec = jQuery("#jform_authentication").val();
@ -39,14 +43,206 @@ jQuery(document).ready(function()
var protocol_vvvvweg = jQuery("#jform_protocol").val(); var protocol_vvvvweg = jQuery("#jform_protocol").val();
var authentication_vvvvweg = jQuery("#jform_authentication").val(); var authentication_vvvvweg = jQuery("#jform_authentication").val();
vvvvweg(protocol_vvvvweg,authentication_vvvvweg); vvvvweg(protocol_vvvvweg,authentication_vvvvweg);
var protocol_vvvvwei = jQuery("#jform_protocol").val();
var authentication_vvvvwei = jQuery("#jform_authentication").val();
vvvvwei(protocol_vvvvwei,authentication_vvvvwei);
}); });
// the vvvvwdy function
function vvvvwdy(protocol_vvvvwdy)
{
if (isSet(protocol_vvvvwdy) && protocol_vvvvwdy.constructor !== Array)
{
var temp_vvvvwdy = protocol_vvvvwdy;
var protocol_vvvvwdy = [];
protocol_vvvvwdy.push(temp_vvvvwdy);
}
else if (!isSet(protocol_vvvvwdy))
{
var protocol_vvvvwdy = [];
}
var protocol = protocol_vvvvwdy.some(protocol_vvvvwdy_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('#jform_authentication').closest('.control-group').show();
// add required attribute to authentication field
if (jform_vvvvwdyvyd_required)
{
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvwdyvyd_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
// add required attribute to host field
if (jform_vvvvwdyvye_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvwdyvye_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
// add required attribute to port field
if (jform_vvvvwdyvyf_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvwdyvyf_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
// add required attribute to path field
if (jform_vvvvwdyvyg_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
jform_vvvvwdyvyg_required = false;
}
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
// add required attribute to username field
if (jform_vvvvwdyvyh_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvwdyvyh_required = false;
}
}
else
{
jQuery('#jform_authentication').closest('.control-group').hide();
// remove required attribute from authentication field
if (!jform_vvvvwdyvyd_required)
{
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvwdyvyd_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
// remove required attribute from host field
if (!jform_vvvvwdyvye_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvwdyvye_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
// remove required attribute from port field
if (!jform_vvvvwdyvyf_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvwdyvyf_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
// remove required attribute from path field
if (!jform_vvvvwdyvyg_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
jform_vvvvwdyvyg_required = true;
}
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
// remove required attribute from username field
if (!jform_vvvvwdyvyh_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvwdyvyh_required = true;
}
}
}
// the vvvvwdy Some function
function protocol_vvvvwdy_SomeFunc(protocol_vvvvwdy)
{
// set the function logic
if (protocol_vvvvwdy == 2)
{
return true;
}
return false;
}
// the vvvvwdz function
function vvvvwdz(protocol_vvvvwdz)
{
if (isSet(protocol_vvvvwdz) && protocol_vvvvwdz.constructor !== Array)
{
var temp_vvvvwdz = protocol_vvvvwdz;
var protocol_vvvvwdz = [];
protocol_vvvvwdz.push(temp_vvvvwdz);
}
else if (!isSet(protocol_vvvvwdz))
{
var protocol_vvvvwdz = [];
}
var protocol = protocol_vvvvwdz.some(protocol_vvvvwdz_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
// add required attribute to signature field
if (jform_vvvvwdzvyi_required)
{
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwdzvyi_required = false;
}
}
else
{
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
// remove required attribute from signature field
if (!jform_vvvvwdzvyi_required)
{
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwdzvyi_required = true;
}
}
}
// the vvvvwdz Some function
function protocol_vvvvwdz_SomeFunc(protocol_vvvvwdz)
{
// set the function logic
if (protocol_vvvvwdz == 1)
{
return true;
}
return false;
}
// the vvvvwea function // the vvvvwea function
function vvvvwea(protocol_vvvvwea) function vvvvwea(protocol_vvvvwea,authentication_vvvvwea)
{ {
if (isSet(protocol_vvvvwea) && protocol_vvvvwea.constructor !== Array) if (isSet(protocol_vvvvwea) && protocol_vvvvwea.constructor !== Array)
{ {
@ -60,115 +256,45 @@ function vvvvwea(protocol_vvvvwea)
} }
var protocol = protocol_vvvvwea.some(protocol_vvvvwea_SomeFunc); var protocol = protocol_vvvvwea.some(protocol_vvvvwea_SomeFunc);
if (isSet(authentication_vvvvwea) && authentication_vvvvwea.constructor !== Array)
{
var temp_vvvvwea = authentication_vvvvwea;
var authentication_vvvvwea = [];
authentication_vvvvwea.push(temp_vvvvwea);
}
else if (!isSet(authentication_vvvvwea))
{
var authentication_vvvvwea = [];
}
var authentication = authentication_vvvvwea.some(authentication_vvvvwea_SomeFunc);
// set this function logic // set this function logic
if (protocol) if (protocol && authentication)
{ {
jQuery('#jform_authentication').closest('.control-group').show(); jQuery('#jform_password').closest('.control-group').show();
// add required attribute to authentication field // add required attribute to password field
if (jform_vvvvweavyg_required)
{
updateFieldRequired('authentication',0);
jQuery('#jform_authentication').prop('required','required');
jQuery('#jform_authentication').attr('aria-required',true);
jQuery('#jform_authentication').addClass('required');
jform_vvvvweavyg_required = false;
}
jQuery('#jform_host').closest('.control-group').show();
// add required attribute to host field
if (jform_vvvvweavyh_required)
{
updateFieldRequired('host',0);
jQuery('#jform_host').prop('required','required');
jQuery('#jform_host').attr('aria-required',true);
jQuery('#jform_host').addClass('required');
jform_vvvvweavyh_required = false;
}
jQuery('#jform_port').closest('.control-group').show();
// add required attribute to port field
if (jform_vvvvweavyi_required)
{
updateFieldRequired('port',0);
jQuery('#jform_port').prop('required','required');
jQuery('#jform_port').attr('aria-required',true);
jQuery('#jform_port').addClass('required');
jform_vvvvweavyi_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
// add required attribute to path field
if (jform_vvvvweavyj_required) if (jform_vvvvweavyj_required)
{ {
updateFieldRequired('path',0); updateFieldRequired('password',0);
jQuery('#jform_path').prop('required','required'); jQuery('#jform_password').prop('required','required');
jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_password').attr('aria-required',true);
jQuery('#jform_path').addClass('required'); jQuery('#jform_password').addClass('required');
jform_vvvvweavyj_required = false; jform_vvvvweavyj_required = false;
} }
jQuery('.note_ssh_security').closest('.control-group').show();
jQuery('#jform_username').closest('.control-group').show();
// add required attribute to username field
if (jform_vvvvweavyk_required)
{
updateFieldRequired('username',0);
jQuery('#jform_username').prop('required','required');
jQuery('#jform_username').attr('aria-required',true);
jQuery('#jform_username').addClass('required');
jform_vvvvweavyk_required = false;
}
} }
else else
{ {
jQuery('#jform_authentication').closest('.control-group').hide(); jQuery('#jform_password').closest('.control-group').hide();
// remove required attribute from authentication field // remove required attribute from password field
if (!jform_vvvvweavyg_required)
{
updateFieldRequired('authentication',1);
jQuery('#jform_authentication').removeAttr('required');
jQuery('#jform_authentication').removeAttr('aria-required');
jQuery('#jform_authentication').removeClass('required');
jform_vvvvweavyg_required = true;
}
jQuery('#jform_host').closest('.control-group').hide();
// remove required attribute from host field
if (!jform_vvvvweavyh_required)
{
updateFieldRequired('host',1);
jQuery('#jform_host').removeAttr('required');
jQuery('#jform_host').removeAttr('aria-required');
jQuery('#jform_host').removeClass('required');
jform_vvvvweavyh_required = true;
}
jQuery('#jform_port').closest('.control-group').hide();
// remove required attribute from port field
if (!jform_vvvvweavyi_required)
{
updateFieldRequired('port',1);
jQuery('#jform_port').removeAttr('required');
jQuery('#jform_port').removeAttr('aria-required');
jQuery('#jform_port').removeClass('required');
jform_vvvvweavyi_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
// remove required attribute from path field
if (!jform_vvvvweavyj_required) if (!jform_vvvvweavyj_required)
{ {
updateFieldRequired('path',1); updateFieldRequired('password',1);
jQuery('#jform_path').removeAttr('required'); jQuery('#jform_password').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_password').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required'); jQuery('#jform_password').removeClass('required');
jform_vvvvweavyj_required = true; jform_vvvvweavyj_required = true;
} }
jQuery('.note_ssh_security').closest('.control-group').hide();
jQuery('#jform_username').closest('.control-group').hide();
// remove required attribute from username field
if (!jform_vvvvweavyk_required)
{
updateFieldRequired('username',1);
jQuery('#jform_username').removeAttr('required');
jQuery('#jform_username').removeAttr('aria-required');
jQuery('#jform_username').removeClass('required');
jform_vvvvweavyk_required = true;
}
} }
} }
@ -183,58 +309,11 @@ function protocol_vvvvwea_SomeFunc(protocol_vvvvwea)
return false; return false;
} }
// the vvvvweb function // the vvvvwea Some function
function vvvvweb(protocol_vvvvweb) function authentication_vvvvwea_SomeFunc(authentication_vvvvwea)
{
if (isSet(protocol_vvvvweb) && protocol_vvvvweb.constructor !== Array)
{
var temp_vvvvweb = protocol_vvvvweb;
var protocol_vvvvweb = [];
protocol_vvvvweb.push(temp_vvvvweb);
}
else if (!isSet(protocol_vvvvweb))
{
var protocol_vvvvweb = [];
}
var protocol = protocol_vvvvweb.some(protocol_vvvvweb_SomeFunc);
// set this function logic
if (protocol)
{
jQuery('.note_ftp_signature').closest('.control-group').show();
jQuery('#jform_signature').closest('.control-group').show();
// add required attribute to signature field
if (jform_vvvvwebvyl_required)
{
updateFieldRequired('signature',0);
jQuery('#jform_signature').prop('required','required');
jQuery('#jform_signature').attr('aria-required',true);
jQuery('#jform_signature').addClass('required');
jform_vvvvwebvyl_required = false;
}
}
else
{
jQuery('.note_ftp_signature').closest('.control-group').hide();
jQuery('#jform_signature').closest('.control-group').hide();
// remove required attribute from signature field
if (!jform_vvvvwebvyl_required)
{
updateFieldRequired('signature',1);
jQuery('#jform_signature').removeAttr('required');
jQuery('#jform_signature').removeAttr('aria-required');
jQuery('#jform_signature').removeClass('required');
jform_vvvvwebvyl_required = true;
}
}
}
// the vvvvweb Some function
function protocol_vvvvweb_SomeFunc(protocol_vvvvweb)
{ {
// set the function logic // set the function logic
if (protocol_vvvvweb == 1) if (authentication_vvvvwea == 1 || authentication_vvvvwea == 3 || authentication_vvvvwea == 5)
{ {
return true; return true;
} }
@ -272,28 +351,28 @@ function vvvvwec(protocol_vvvvwec,authentication_vvvvwec)
// set this function logic // set this function logic
if (protocol && authentication) if (protocol && authentication)
{ {
jQuery('#jform_password').closest('.control-group').show(); jQuery('#jform_private').closest('.control-group').show();
// add required attribute to password field // add required attribute to private field
if (jform_vvvvwecvym_required) if (jform_vvvvwecvyk_required)
{ {
updateFieldRequired('password',0); updateFieldRequired('private',0);
jQuery('#jform_password').prop('required','required'); jQuery('#jform_private').prop('required','required');
jQuery('#jform_password').attr('aria-required',true); jQuery('#jform_private').attr('aria-required',true);
jQuery('#jform_password').addClass('required'); jQuery('#jform_private').addClass('required');
jform_vvvvwecvym_required = false; jform_vvvvwecvyk_required = false;
} }
} }
else else
{ {
jQuery('#jform_password').closest('.control-group').hide(); jQuery('#jform_private').closest('.control-group').hide();
// remove required attribute from password field // remove required attribute from private field
if (!jform_vvvvwecvym_required) if (!jform_vvvvwecvyk_required)
{ {
updateFieldRequired('password',1); updateFieldRequired('private',1);
jQuery('#jform_password').removeAttr('required'); jQuery('#jform_private').removeAttr('required');
jQuery('#jform_password').removeAttr('aria-required'); jQuery('#jform_private').removeAttr('aria-required');
jQuery('#jform_password').removeClass('required'); jQuery('#jform_private').removeClass('required');
jform_vvvvwecvym_required = true; jform_vvvvwecvyk_required = true;
} }
} }
} }
@ -313,7 +392,7 @@ function protocol_vvvvwec_SomeFunc(protocol_vvvvwec)
function authentication_vvvvwec_SomeFunc(authentication_vvvvwec) function authentication_vvvvwec_SomeFunc(authentication_vvvvwec)
{ {
// set the function logic // set the function logic
if (authentication_vvvvwec == 1 || authentication_vvvvwec == 3 || authentication_vvvvwec == 5) if (authentication_vvvvwec == 2 || authentication_vvvvwec == 3)
{ {
return true; return true;
} }
@ -351,28 +430,28 @@ function vvvvwee(protocol_vvvvwee,authentication_vvvvwee)
// set this function logic // set this function logic
if (protocol && authentication) if (protocol && authentication)
{ {
jQuery('#jform_private').closest('.control-group').show(); jQuery('#jform_private_key').closest('.control-group').show();
// add required attribute to private field // add required attribute to private_key field
if (jform_vvvvweevyn_required) if (jform_vvvvweevyl_required)
{ {
updateFieldRequired('private',0); updateFieldRequired('private_key',0);
jQuery('#jform_private').prop('required','required'); jQuery('#jform_private_key').prop('required','required');
jQuery('#jform_private').attr('aria-required',true); jQuery('#jform_private_key').attr('aria-required',true);
jQuery('#jform_private').addClass('required'); jQuery('#jform_private_key').addClass('required');
jform_vvvvweevyn_required = false; jform_vvvvweevyl_required = false;
} }
} }
else else
{ {
jQuery('#jform_private').closest('.control-group').hide(); jQuery('#jform_private_key').closest('.control-group').hide();
// remove required attribute from private field // remove required attribute from private_key field
if (!jform_vvvvweevyn_required) if (!jform_vvvvweevyl_required)
{ {
updateFieldRequired('private',1); updateFieldRequired('private_key',1);
jQuery('#jform_private').removeAttr('required'); jQuery('#jform_private_key').removeAttr('required');
jQuery('#jform_private').removeAttr('aria-required'); jQuery('#jform_private_key').removeAttr('aria-required');
jQuery('#jform_private').removeClass('required'); jQuery('#jform_private_key').removeClass('required');
jform_vvvvweevyn_required = true; jform_vvvvweevyl_required = true;
} }
} }
} }
@ -392,7 +471,7 @@ function protocol_vvvvwee_SomeFunc(protocol_vvvvwee)
function authentication_vvvvwee_SomeFunc(authentication_vvvvwee) function authentication_vvvvwee_SomeFunc(authentication_vvvvwee)
{ {
// set the function logic // set the function logic
if (authentication_vvvvwee == 2 || authentication_vvvvwee == 3) if (authentication_vvvvwee == 4 || authentication_vvvvwee == 5)
{ {
return true; return true;
} }
@ -430,29 +509,11 @@ function vvvvweg(protocol_vvvvweg,authentication_vvvvweg)
// set this function logic // set this function logic
if (protocol && authentication) if (protocol && authentication)
{ {
jQuery('#jform_private_key').closest('.control-group').show(); jQuery('#jform_secret').closest('.control-group').show();
// add required attribute to private_key field
if (jform_vvvvwegvyo_required)
{
updateFieldRequired('private_key',0);
jQuery('#jform_private_key').prop('required','required');
jQuery('#jform_private_key').attr('aria-required',true);
jQuery('#jform_private_key').addClass('required');
jform_vvvvwegvyo_required = false;
}
} }
else else
{ {
jQuery('#jform_private_key').closest('.control-group').hide(); jQuery('#jform_secret').closest('.control-group').hide();
// remove required attribute from private_key field
if (!jform_vvvvwegvyo_required)
{
updateFieldRequired('private_key',1);
jQuery('#jform_private_key').removeAttr('required');
jQuery('#jform_private_key').removeAttr('aria-required');
jQuery('#jform_private_key').removeClass('required');
jform_vvvvwegvyo_required = true;
}
} }
} }
@ -471,68 +532,7 @@ function protocol_vvvvweg_SomeFunc(protocol_vvvvweg)
function authentication_vvvvweg_SomeFunc(authentication_vvvvweg) function authentication_vvvvweg_SomeFunc(authentication_vvvvweg)
{ {
// set the function logic // set the function logic
if (authentication_vvvvweg == 4 || authentication_vvvvweg == 5) if (authentication_vvvvweg == 2 || authentication_vvvvweg == 3 || authentication_vvvvweg == 4 || authentication_vvvvweg == 5)
{
return true;
}
return false;
}
// the vvvvwei function
function vvvvwei(protocol_vvvvwei,authentication_vvvvwei)
{
if (isSet(protocol_vvvvwei) && protocol_vvvvwei.constructor !== Array)
{
var temp_vvvvwei = protocol_vvvvwei;
var protocol_vvvvwei = [];
protocol_vvvvwei.push(temp_vvvvwei);
}
else if (!isSet(protocol_vvvvwei))
{
var protocol_vvvvwei = [];
}
var protocol = protocol_vvvvwei.some(protocol_vvvvwei_SomeFunc);
if (isSet(authentication_vvvvwei) && authentication_vvvvwei.constructor !== Array)
{
var temp_vvvvwei = authentication_vvvvwei;
var authentication_vvvvwei = [];
authentication_vvvvwei.push(temp_vvvvwei);
}
else if (!isSet(authentication_vvvvwei))
{
var authentication_vvvvwei = [];
}
var authentication = authentication_vvvvwei.some(authentication_vvvvwei_SomeFunc);
// set this function logic
if (protocol && authentication)
{
jQuery('#jform_secret').closest('.control-group').show();
}
else
{
jQuery('#jform_secret').closest('.control-group').hide();
}
}
// the vvvvwei Some function
function protocol_vvvvwei_SomeFunc(protocol_vvvvwei)
{
// set the function logic
if (protocol_vvvvwei == 2)
{
return true;
}
return false;
}
// the vvvvwei Some function
function authentication_vvvvwei_SomeFunc(authentication_vvvvwei)
{
// set the function logic
if (authentication_vvvvwei == 2 || authentication_vvvvwei == 3 || authentication_vvvvwei == 4 || authentication_vvvvwei == 5)
{ {
return true; return true;
} }

View File

@ -191,7 +191,7 @@ class ComponentbuilderModelServer extends JModelAdmin
* *
* @return mixed An array of data items on success, false on failure. * @return mixed An array of data items on success, false on failure.
*/ */
public function getVyplinked_components() public function getVymlinked_components()
{ {
// Get the user object. // Get the user object.
$user = JFactory::getUser(); $user = JFactory::getUser();

File diff suppressed because one or more lines are too long

View File

@ -207,180 +207,112 @@ jQuery('#adminForm').on('change', '#jform_datatype',function (e)
}); });
// #jform_store listeners for store_vvvvwdd function
jQuery('#jform_store').on('keyup',function()
{
var store_vvvvwdd = jQuery("#jform_store").val();
var datatype_vvvvwdd = jQuery("#jform_datatype").val();
vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var store_vvvvwdd = jQuery("#jform_store").val();
var datatype_vvvvwdd = jQuery("#jform_datatype").val();
vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);
});
// #jform_datatype listeners for datatype_vvvvwdd function // #jform_datatype listeners for datatype_vvvvwdd function
jQuery('#jform_datatype').on('keyup',function() jQuery('#jform_datatype').on('keyup',function()
{ {
var store_vvvvwdd = jQuery("#jform_store").val();
var datatype_vvvvwdd = jQuery("#jform_datatype").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val();
vvvvwdd(datatype_vvvvwdd); vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);
}); });
jQuery('#adminForm').on('change', '#jform_datatype',function (e) jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{ {
e.preventDefault(); e.preventDefault();
var store_vvvvwdd = jQuery("#jform_store").val();
var datatype_vvvvwdd = jQuery("#jform_datatype").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val();
vvvvwdd(datatype_vvvvwdd); vvvvwdd(store_vvvvwdd,datatype_vvvvwdd);
}); });
// #jform_store listeners for store_vvvvwde function // #jform_store listeners for store_vvvvwdf function
jQuery('#jform_store').on('keyup',function() jQuery('#jform_store').on('keyup',function()
{ {
var store_vvvvwde = jQuery("#jform_store").val(); var store_vvvvwdf = jQuery("#jform_store").val();
var datatype_vvvvwde = jQuery("#jform_datatype").val(); vvvvwdf(store_vvvvwdf);
vvvvwde(store_vvvvwde,datatype_vvvvwde);
}); });
jQuery('#adminForm').on('change', '#jform_store',function (e) jQuery('#adminForm').on('change', '#jform_store',function (e)
{ {
e.preventDefault(); e.preventDefault();
var store_vvvvwde = jQuery("#jform_store").val(); var store_vvvvwdf = jQuery("#jform_store").val();
var datatype_vvvvwde = jQuery("#jform_datatype").val(); vvvvwdf(store_vvvvwdf);
vvvvwde(store_vvvvwde,datatype_vvvvwde);
}); });
// #jform_datatype listeners for datatype_vvvvwde function // #jform_add_css_view listeners for add_css_view_vvvvwdg function
jQuery('#jform_datatype').on('keyup',function()
{
var store_vvvvwde = jQuery("#jform_store").val();
var datatype_vvvvwde = jQuery("#jform_datatype").val();
vvvvwde(store_vvvvwde,datatype_vvvvwde);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var store_vvvvwde = jQuery("#jform_store").val();
var datatype_vvvvwde = jQuery("#jform_datatype").val();
vvvvwde(store_vvvvwde,datatype_vvvvwde);
});
// #jform_store listeners for store_vvvvwdg function
jQuery('#jform_store').on('keyup',function()
{
var store_vvvvwdg = jQuery("#jform_store").val();
var datatype_vvvvwdg = jQuery("#jform_datatype").val();
vvvvwdg(store_vvvvwdg,datatype_vvvvwdg);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var store_vvvvwdg = jQuery("#jform_store").val();
var datatype_vvvvwdg = jQuery("#jform_datatype").val();
vvvvwdg(store_vvvvwdg,datatype_vvvvwdg);
});
// #jform_datatype listeners for datatype_vvvvwdg function
jQuery('#jform_datatype').on('keyup',function()
{
var store_vvvvwdg = jQuery("#jform_store").val();
var datatype_vvvvwdg = jQuery("#jform_datatype").val();
vvvvwdg(store_vvvvwdg,datatype_vvvvwdg);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var store_vvvvwdg = jQuery("#jform_store").val();
var datatype_vvvvwdg = jQuery("#jform_datatype").val();
vvvvwdg(store_vvvvwdg,datatype_vvvvwdg);
});
// #jform_datatype listeners for datatype_vvvvwdh function
jQuery('#jform_datatype').on('keyup',function()
{
var datatype_vvvvwdh = jQuery("#jform_datatype").val();
var store_vvvvwdh = jQuery("#jform_store").val();
vvvvwdh(datatype_vvvvwdh,store_vvvvwdh);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var datatype_vvvvwdh = jQuery("#jform_datatype").val();
var store_vvvvwdh = jQuery("#jform_store").val();
vvvvwdh(datatype_vvvvwdh,store_vvvvwdh);
});
// #jform_store listeners for store_vvvvwdh function
jQuery('#jform_store').on('keyup',function()
{
var datatype_vvvvwdh = jQuery("#jform_datatype").val();
var store_vvvvwdh = jQuery("#jform_store").val();
vvvvwdh(datatype_vvvvwdh,store_vvvvwdh);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var datatype_vvvvwdh = jQuery("#jform_datatype").val();
var store_vvvvwdh = jQuery("#jform_store").val();
vvvvwdh(datatype_vvvvwdh,store_vvvvwdh);
});
// #jform_add_css_view listeners for add_css_view_vvvvwdi function
jQuery('#jform_add_css_view').on('keyup',function() jQuery('#jform_add_css_view').on('keyup',function()
{ {
var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val();
vvvvwdi(add_css_view_vvvvwdi); vvvvwdg(add_css_view_vvvvwdg);
}); });
jQuery('#adminForm').on('change', '#jform_add_css_view',function (e) jQuery('#adminForm').on('change', '#jform_add_css_view',function (e)
{ {
e.preventDefault(); e.preventDefault();
var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val();
vvvvwdi(add_css_view_vvvvwdi); vvvvwdg(add_css_view_vvvvwdg);
}); });
// #jform_add_css_views listeners for add_css_views_vvvvwdj function // #jform_add_css_views listeners for add_css_views_vvvvwdh function
jQuery('#jform_add_css_views').on('keyup',function() jQuery('#jform_add_css_views').on('keyup',function()
{ {
var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val();
vvvvwdj(add_css_views_vvvvwdj); vvvvwdh(add_css_views_vvvvwdh);
}); });
jQuery('#adminForm').on('change', '#jform_add_css_views',function (e) jQuery('#adminForm').on('change', '#jform_add_css_views',function (e)
{ {
e.preventDefault(); e.preventDefault();
var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val();
vvvvwdj(add_css_views_vvvvwdj); vvvvwdh(add_css_views_vvvvwdh);
}); });
// #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwdk function // #jform_add_javascript_view_footer listeners for add_javascript_view_footer_vvvvwdi function
jQuery('#jform_add_javascript_view_footer').on('keyup',function() jQuery('#jform_add_javascript_view_footer').on('keyup',function()
{ {
var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwdk(add_javascript_view_footer_vvvvwdk); vvvvwdi(add_javascript_view_footer_vvvvwdi);
}); });
jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e) jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e)
{ {
e.preventDefault(); e.preventDefault();
var add_javascript_view_footer_vvvvwdk = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val();
vvvvwdk(add_javascript_view_footer_vvvvwdk); vvvvwdi(add_javascript_view_footer_vvvvwdi);
}); });
// #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwdl function // #jform_add_javascript_views_footer listeners for add_javascript_views_footer_vvvvwdj function
jQuery('#jform_add_javascript_views_footer').on('keyup',function() jQuery('#jform_add_javascript_views_footer').on('keyup',function()
{ {
var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvwdl(add_javascript_views_footer_vvvvwdl); vvvvwdj(add_javascript_views_footer_vvvvwdj);
}); });
jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e) jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e)
{ {
e.preventDefault(); e.preventDefault();
var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val();
vvvvwdl(add_javascript_views_footer_vvvvwdl); vvvvwdj(add_javascript_views_footer_vvvvwdj);
}); });

View File

@ -136,71 +136,105 @@ $componentParams = $this->params; // will be removed just use $this->params inst
<script type="text/javascript"> <script type="text/javascript">
// #jform_datalenght listeners for datalenght_vvvvwdm function // #jform_datalenght listeners for datalenght_vvvvwdk function
jQuery('#jform_datalenght').on('keyup',function() jQuery('#jform_datalenght').on('keyup',function()
{ {
var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); var datalenght_vvvvwdk = jQuery("#jform_datalenght").val();
var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdk = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk);
}); });
jQuery('#adminForm').on('change', '#jform_datalenght',function (e) jQuery('#adminForm').on('change', '#jform_datalenght',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); 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);
});
// #jform_has_defaults listeners for has_defaults_vvvvwdk function
jQuery('#jform_has_defaults').on('keyup',function()
{
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);
});
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{
e.preventDefault();
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);
});
// #jform_datadefault listeners for datadefault_vvvvwdm function
jQuery('#jform_datadefault').on('keyup',function()
{
var datadefault_vvvvwdm = jQuery("#jform_datadefault").val();
var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm);
});
jQuery('#adminForm').on('change', '#jform_datadefault',function (e)
{
e.preventDefault();
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);
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdm function // #jform_has_defaults listeners for has_defaults_vvvvwdm function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_has_defaults').on('keyup',function()
{ {
var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); var datadefault_vvvvwdm = jQuery("#jform_datadefault").val();
var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); var datadefault_vvvvwdm = jQuery("#jform_datadefault").val();
var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm);
}); });
// #jform_datadefault listeners for datadefault_vvvvwdo function // #jform_datatype listeners for datatype_vvvvwdo function
jQuery('#jform_datadefault').on('keyup',function() jQuery('#jform_datatype').on('keyup',function()
{ {
var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); var datatype_vvvvwdo = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo); vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);
}); });
jQuery('#adminForm').on('change', '#jform_datadefault',function (e) jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); var datatype_vvvvwdo = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo); vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdo function // #jform_has_defaults listeners for has_defaults_vvvvwdo function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_has_defaults').on('keyup',function()
{ {
var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); var datatype_vvvvwdo = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo); vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); var datatype_vvvvwdo = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdo = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo); vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo);
}); });
@ -238,6 +272,40 @@ jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdr function
jQuery('#jform_has_defaults').on('keyup',function()
{
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);
});
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);
});
// #jform_datatype listeners for datatype_vvvvwdr function
jQuery('#jform_datatype').on('keyup',function()
{
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdr = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdr = jQuery("#jform_datatype").val();
vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr);
});
// #jform_datatype listeners for datatype_vvvvwds function // #jform_datatype listeners for datatype_vvvvwds function
jQuery('#jform_datatype').on('keyup',function() jQuery('#jform_datatype').on('keyup',function()
{ {
@ -272,257 +340,189 @@ jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdt function // #jform_store listeners for store_vvvvwdu function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_store').on('keyup',function()
{ {
var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdt = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_store',function (e)
{ {
e.preventDefault(); e.preventDefault();
var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdt = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
});
// #jform_datatype listeners for datatype_vvvvwdt function
jQuery('#jform_datatype').on('keyup',function()
{
var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdt = jQuery("#jform_datatype").val();
vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdt = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var datatype_vvvvwdt = jQuery("#jform_datatype").val();
vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt);
}); });
// #jform_datatype listeners for datatype_vvvvwdu function // #jform_datatype listeners for datatype_vvvvwdu function
jQuery('#jform_datatype').on('keyup',function() jQuery('#jform_datatype').on('keyup',function()
{ {
var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
}); });
jQuery('#adminForm').on('change', '#jform_datatype',function (e) jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{ {
e.preventDefault(); e.preventDefault();
var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdu function // #jform_has_defaults listeners for has_defaults_vvvvwdu function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_has_defaults').on('keyup',function()
{ {
var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{ {
e.preventDefault(); e.preventDefault();
var store_vvvvwdu = jQuery("#jform_store").val();
var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu);
}); });
// #jform_store listeners for store_vvvvwdw function // #jform_datatype listeners for datatype_vvvvwdv function
jQuery('#jform_store').on('keyup',function()
{
var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw);
});
// #jform_datatype listeners for datatype_vvvvwdw function
jQuery('#jform_datatype').on('keyup',function() jQuery('#jform_datatype').on('keyup',function()
{ {
var store_vvvvwdw = jQuery("#jform_store").val(); var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val(); var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw); vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
}); });
jQuery('#adminForm').on('change', '#jform_datatype',function (e) jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{ {
e.preventDefault(); e.preventDefault();
var store_vvvvwdw = jQuery("#jform_store").val(); var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val(); var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw); vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
});
// #jform_store listeners for store_vvvvwdv function
jQuery('#jform_store').on('keyup',function()
{
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
});
// #jform_has_defaults listeners for has_defaults_vvvvwdv function
jQuery('#jform_has_defaults').on('keyup',function()
{
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
});
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{
e.preventDefault();
var datatype_vvvvwdv = jQuery("#jform_datatype").val();
var store_vvvvwdv = jQuery("#jform_store").val();
var has_defaults_vvvvwdv = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv);
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdw function // #jform_has_defaults listeners for has_defaults_vvvvwdw function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_has_defaults').on('keyup',function()
{ {
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdw = jQuery("#jform_store").val(); var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{ {
e.preventDefault(); e.preventDefault();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdw = jQuery("#jform_store").val(); var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw);
}); });
// #jform_datatype listeners for datatype_vvvvwdx function // #jform_store listeners for store_vvvvwdw function
jQuery('#jform_datatype').on('keyup',function()
{
var datatype_vvvvwdx = jQuery("#jform_datatype").val();
var store_vvvvwdx = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var datatype_vvvvwdx = jQuery("#jform_datatype").val();
var store_vvvvwdx = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx);
});
// #jform_store listeners for store_vvvvwdx function
jQuery('#jform_store').on('keyup',function() jQuery('#jform_store').on('keyup',function()
{ {
var datatype_vvvvwdx = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdx = jQuery("#jform_store").val(); var store_vvvvwdw = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx); vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
}); });
jQuery('#adminForm').on('change', '#jform_store',function (e) jQuery('#adminForm').on('change', '#jform_store',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datatype_vvvvwdx = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdx = jQuery("#jform_store").val(); var store_vvvvwdw = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var datatype_vvvvwdw = jQuery("#jform_datatype").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx); vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
});
// #jform_datatype listeners for datatype_vvvvwdw function
jQuery('#jform_datatype').on('keyup',function()
{
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdw = jQuery("#jform_store").val();
var datatype_vvvvwdw = jQuery("#jform_datatype").val();
vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw);
}); });
// #jform_has_defaults listeners for has_defaults_vvvvwdx function // #jform_has_defaults listeners for has_defaults_vvvvwdx function
jQuery('#jform_has_defaults').on('keyup',function() jQuery('#jform_has_defaults').on('keyup',function()
{ {
var datatype_vvvvwdx = jQuery("#jform_datatype").val();
var store_vvvvwdx = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx); vvvvwdx(has_defaults_vvvvwdx);
}); });
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e) jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{ {
e.preventDefault(); e.preventDefault();
var datatype_vvvvwdx = jQuery("#jform_datatype").val();
var store_vvvvwdx = jQuery("#jform_store").val();
var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val(); var has_defaults_vvvvwdx = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx); vvvvwdx(has_defaults_vvvvwdx);
});
// #jform_has_defaults listeners for has_defaults_vvvvwdy function
jQuery('#jform_has_defaults').on('keyup',function()
{
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
// #jform_store listeners for store_vvvvwdy function
jQuery('#jform_store').on('keyup',function()
{
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
jQuery('#adminForm').on('change', '#jform_store',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
// #jform_datatype listeners for datatype_vvvvwdy function
jQuery('#jform_datatype').on('keyup',function()
{
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
jQuery('#adminForm').on('change', '#jform_datatype',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdy = jQuery("#jform_has_defaults input[type='radio']:checked").val();
var store_vvvvwdy = jQuery("#jform_store").val();
var datatype_vvvvwdy = jQuery("#jform_datatype").val();
vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy);
});
// #jform_has_defaults listeners for has_defaults_vvvvwdz function
jQuery('#jform_has_defaults').on('keyup',function()
{
var has_defaults_vvvvwdz = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdz(has_defaults_vvvvwdz);
});
jQuery('#adminForm').on('change', '#jform_has_defaults',function (e)
{
e.preventDefault();
var has_defaults_vvvvwdz = jQuery("#jform_has_defaults input[type='radio']:checked").val();
vvvvwdz(has_defaults_vvvvwdz);
}); });

View File

@ -57,7 +57,7 @@ class ComponentbuilderViewFieldtype extends JViewLegacy
} }
// Get Linked view data // Get Linked view data
$this->vyffields = $this->get('Vyffields'); $this->vycfields = $this->get('Vycfields');
// Set the toolbar // Set the toolbar
$this->addToolBar(); $this->addToolBar();

View File

@ -116,33 +116,63 @@ $componentParams = $this->params; // will be removed just use $this->params inst
<script type="text/javascript"> <script type="text/javascript">
// #jform_location listeners for location_vvvvwek function // #jform_location listeners for location_vvvvwei function
jQuery('#jform_location').on('keyup',function() jQuery('#jform_location').on('keyup',function()
{ {
var location_vvvvwek = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwek(location_vvvvwek); vvvvwei(location_vvvvwei);
}); });
jQuery('#adminForm').on('change', '#jform_location',function (e) jQuery('#adminForm').on('change', '#jform_location',function (e)
{ {
e.preventDefault(); e.preventDefault();
var location_vvvvwek = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwek(location_vvvvwek); vvvvwei(location_vvvvwei);
}); });
// #jform_location listeners for location_vvvvwel function // #jform_location listeners for location_vvvvwej function
jQuery('#jform_location').on('keyup',function() jQuery('#jform_location').on('keyup',function()
{ {
var location_vvvvwel = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwel(location_vvvvwel); vvvvwej(location_vvvvwej);
}); });
jQuery('#adminForm').on('change', '#jform_location',function (e) jQuery('#adminForm').on('change', '#jform_location',function (e)
{ {
e.preventDefault(); e.preventDefault();
var location_vvvvwel = jQuery("#jform_location input[type='radio']:checked").val(); var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val();
vvvvwel(location_vvvvwel); vvvvwej(location_vvvvwej);
});
// #jform_type listeners for type_vvvvwek function
jQuery('#jform_type').on('keyup',function()
{
var type_vvvvwek = jQuery("#jform_type").val();
vvvvwek(type_vvvvwek);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_vvvvwek = jQuery("#jform_type").val();
vvvvwek(type_vvvvwek);
});
// #jform_type listeners for type_vvvvwel function
jQuery('#jform_type').on('keyup',function()
{
var type_vvvvwel = jQuery("#jform_type").val();
vvvvwel(type_vvvvwel);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_vvvvwel = jQuery("#jform_type").val();
vvvvwel(type_vvvvwel);
}); });
@ -161,48 +191,18 @@ jQuery('#adminForm').on('change', '#jform_type',function (e)
}); });
// #jform_type listeners for type_vvvvwen function // #jform_target listeners for target_vvvvwen function
jQuery('#jform_type').on('keyup',function()
{
var type_vvvvwen = jQuery("#jform_type").val();
vvvvwen(type_vvvvwen);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_vvvvwen = jQuery("#jform_type").val();
vvvvwen(type_vvvvwen);
});
// #jform_type listeners for type_vvvvweo function
jQuery('#jform_type').on('keyup',function()
{
var type_vvvvweo = jQuery("#jform_type").val();
vvvvweo(type_vvvvweo);
});
jQuery('#adminForm').on('change', '#jform_type',function (e)
{
e.preventDefault();
var type_vvvvweo = jQuery("#jform_type").val();
vvvvweo(type_vvvvweo);
});
// #jform_target listeners for target_vvvvwep function
jQuery('#jform_target').on('keyup',function() jQuery('#jform_target').on('keyup',function()
{ {
var target_vvvvwep = jQuery("#jform_target input[type='radio']:checked").val(); var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwep(target_vvvvwep); vvvvwen(target_vvvvwen);
}); });
jQuery('#adminForm').on('change', '#jform_target',function (e) jQuery('#adminForm').on('change', '#jform_target',function (e)
{ {
e.preventDefault(); e.preventDefault();
var target_vvvvwep = jQuery("#jform_target input[type='radio']:checked").val(); var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val();
vvvvwep(target_vvvvwep); vvvvwen(target_vvvvwen);
}); });

View File

@ -125,33 +125,67 @@ $componentParams = $this->params; // will be removed just use $this->params inst
<script type="text/javascript"> <script type="text/javascript">
// #jform_protocol listeners for protocol_vvvvwdy function
jQuery('#jform_protocol').on('keyup',function()
{
var protocol_vvvvwdy = jQuery("#jform_protocol").val();
vvvvwdy(protocol_vvvvwdy);
});
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
{
e.preventDefault();
var protocol_vvvvwdy = jQuery("#jform_protocol").val();
vvvvwdy(protocol_vvvvwdy);
});
// #jform_protocol listeners for protocol_vvvvwdz function
jQuery('#jform_protocol').on('keyup',function()
{
var protocol_vvvvwdz = jQuery("#jform_protocol").val();
vvvvwdz(protocol_vvvvwdz);
});
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
{
e.preventDefault();
var protocol_vvvvwdz = jQuery("#jform_protocol").val();
vvvvwdz(protocol_vvvvwdz);
});
// #jform_protocol listeners for protocol_vvvvwea function // #jform_protocol listeners for protocol_vvvvwea function
jQuery('#jform_protocol').on('keyup',function() jQuery('#jform_protocol').on('keyup',function()
{ {
var protocol_vvvvwea = jQuery("#jform_protocol").val(); var protocol_vvvvwea = jQuery("#jform_protocol").val();
vvvvwea(protocol_vvvvwea); var authentication_vvvvwea = jQuery("#jform_authentication").val();
vvvvwea(protocol_vvvvwea,authentication_vvvvwea);
}); });
jQuery('#adminForm').on('change', '#jform_protocol',function (e) jQuery('#adminForm').on('change', '#jform_protocol',function (e)
{ {
e.preventDefault(); e.preventDefault();
var protocol_vvvvwea = jQuery("#jform_protocol").val(); var protocol_vvvvwea = jQuery("#jform_protocol").val();
vvvvwea(protocol_vvvvwea); var authentication_vvvvwea = jQuery("#jform_authentication").val();
vvvvwea(protocol_vvvvwea,authentication_vvvvwea);
}); });
// #jform_protocol listeners for protocol_vvvvweb function // #jform_authentication listeners for authentication_vvvvwea function
jQuery('#jform_protocol').on('keyup',function() jQuery('#jform_authentication').on('keyup',function()
{ {
var protocol_vvvvweb = jQuery("#jform_protocol").val(); var protocol_vvvvwea = jQuery("#jform_protocol").val();
vvvvweb(protocol_vvvvweb); var authentication_vvvvwea = jQuery("#jform_authentication").val();
vvvvwea(protocol_vvvvwea,authentication_vvvvwea);
}); });
jQuery('#adminForm').on('change', '#jform_protocol',function (e) jQuery('#adminForm').on('change', '#jform_authentication',function (e)
{ {
e.preventDefault(); e.preventDefault();
var protocol_vvvvweb = jQuery("#jform_protocol").val(); var protocol_vvvvwea = jQuery("#jform_protocol").val();
vvvvweb(protocol_vvvvweb); var authentication_vvvvwea = jQuery("#jform_authentication").val();
vvvvwea(protocol_vvvvwea,authentication_vvvvwea);
}); });
@ -257,38 +291,4 @@ jQuery('#adminForm').on('change', '#jform_authentication',function (e)
}); });
// #jform_protocol listeners for protocol_vvvvwei function
jQuery('#jform_protocol').on('keyup',function()
{
var protocol_vvvvwei = jQuery("#jform_protocol").val();
var authentication_vvvvwei = jQuery("#jform_authentication").val();
vvvvwei(protocol_vvvvwei,authentication_vvvvwei);
});
jQuery('#adminForm').on('change', '#jform_protocol',function (e)
{
e.preventDefault();
var protocol_vvvvwei = jQuery("#jform_protocol").val();
var authentication_vvvvwei = jQuery("#jform_authentication").val();
vvvvwei(protocol_vvvvwei,authentication_vvvvwei);
});
// #jform_authentication listeners for authentication_vvvvwei function
jQuery('#jform_authentication').on('keyup',function()
{
var protocol_vvvvwei = jQuery("#jform_protocol").val();
var authentication_vvvvwei = jQuery("#jform_authentication").val();
vvvvwei(protocol_vvvvwei,authentication_vvvvwei);
});
jQuery('#adminForm').on('change', '#jform_authentication',function (e)
{
e.preventDefault();
var protocol_vvvvwei = jQuery("#jform_protocol").val();
var authentication_vvvvwei = jQuery("#jform_authentication").val();
vvvvwei(protocol_vvvvwei,authentication_vvvvwei);
});
</script> </script>

View File

@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy
} }
// Get Linked view data // Get Linked view data
$this->vyplinked_components = $this->get('Vyplinked_components'); $this->vymlinked_components = $this->get('Vymlinked_components');
// Set the toolbar // Set the toolbar
$this->addToolBar(); $this->addToolBar();

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade"> <extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name> <name>COM_COMPONENTBUILDER</name>
<creationDate>24th June, 2020</creationDate> <creationDate>7th July, 2020</creationDate>
<author>Llewellyn van der Merwe</author> <author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail> <authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl> <authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>

View File

@ -5532,14 +5532,61 @@ abstract class ComponentbuilderHelper
* *
*/ */
public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true)
{
// build record
$record = new stdClass();
// check if user can edit
if (self::canEditItem($record, $item, $view, $views, $component))
{
// set the edit link
if ($jRoute)
{
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
}
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
}
return false;
}
/**
* Can Edit (either any, or own)
*
* @param int $item The item to edit
* @param string $view The type of item to edit
* @param string $views The list view controller name
* @param string $component The component these views belong to
*
* @return bool if user can edit returns true els
*
*/
public static function allowEdit(&$item, $view, $views, $component = 'com_componentbuilder')
{
// build record
$record = new stdClass();
return self::canEditItem($record, $item, $view, $views, $component);
}
/**
* Can Edit (either any, or own)
*
* @param int $item The item to edit
* @param string $view The type of item to edit
* @param string $views The list view controller name
* @param string $component The component these views belong to
*
* @return bool if user can edit returns true els
*
*/
protected static function canEditItem(&$record, &$item, $view, $views, $component = 'com_componentbuilder')
{ {
// make sure the user has access to view // make sure the user has access to view
if (!JFactory::getUser()->authorise($view. '.access', $component)) if (!JFactory::getUser()->authorise($view. '.access', $component))
{ {
return false; return false;
} }
// build record // we start with false.
$record = new stdClass(); $can_edit = false;
// check that we have the ID // check that we have the ID
if (self::checkObject($item) && isset($item->id)) if (self::checkObject($item) && isset($item->id))
{ {
@ -5569,26 +5616,15 @@ abstract class ComponentbuilderHelper
// get user action permission to edit // get user action permission to edit
$action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component));
// check if the view permission is set // check if the view permission is set
if (($edit = $action->get($view . '.edit', 'none-set')) === 'none-set') if (($can_edit = $action->get($view . '.edit', 'none-set')) === 'none-set')
{ {
// fall back on the core permission then // fall back on the core permission then (this can be an issue)
$edit = $action->get('core.edit', 'none-set'); $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false));
}
// can edit
if ($edit)
{
// set the edit link
if ($jRoute)
{
return JRoute::_("index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref);
}
return "index.php?option=" . $component . "&view=" . $views . "&task=" . $view . ".edit&id=" . $record->id . $ref;
} }
} }
return false; return $can_edit;
} }
/** /**
* set subform type table * set subform type table
* *
@ -5630,9 +5666,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy date * Change to nice fancy date
*/ */
public static function fancyDate($date) public static function fancyDate($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5642,9 +5678,9 @@ abstract class ComponentbuilderHelper
/** /**
* get date based in period past * get date based in period past
*/ */
public static function fancyDynamicDate($date) public static function fancyDynamicDate($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5668,9 +5704,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy day time and date * Change to nice fancy day time and date
*/ */
public static function fancyDayTimeDate($time) public static function fancyDayTimeDate($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5680,9 +5716,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice fancy time and date * Change to nice fancy time and date
*/ */
public static function fancyDateTime($time) public static function fancyDateTime($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5692,9 +5728,9 @@ abstract class ComponentbuilderHelper
/** /**
* Change to nice hour:minutes time * Change to nice hour:minutes time
*/ */
public static function fancyTime($time) public static function fancyTime($time, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($time)) if ($check_stamp && !self::isValidTimeStamp($time))
{ {
$time = strtotime($time); $time = strtotime($time);
} }
@ -5704,9 +5740,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date day as Sunday through Saturday * set the date day as Sunday through Saturday
*/ */
public static function setDayName($date) public static function setDayName($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5716,9 +5752,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date month as January through December * set the date month as January through December
*/ */
public static function setMonthName($date) public static function setMonthName($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5728,9 +5764,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date day as 1st * set the date day as 1st
*/ */
public static function setDay($date) public static function setDay($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5740,9 +5776,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date month as 5 * set the date month as 5
*/ */
public static function setMonth($date) public static function setMonth($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5752,9 +5788,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date year as 2004 (for charts) * set the date year as 2004 (for charts)
*/ */
public static function setYear($date) public static function setYear($date, $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5764,9 +5800,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 2004/05 (for charts) * set the date as 2004/05 (for charts)
*/ */
public static function setYearMonth($date, $spacer = '/') public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5776,9 +5812,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 2004/05/03 (for charts) * set the date as 2004/05/03 (for charts)
*/ */
public static function setYearMonthDay($date, $spacer = '/') public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5788,9 +5824,9 @@ abstract class ComponentbuilderHelper
/** /**
* set the date as 03/05/2004 * set the date as 03/05/2004
*/ */
public static function setDayMonthYear($date, $spacer = '/') public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
{ {
if (!self::isValidTimeStamp($date)) if ($check_stamp && !self::isValidTimeStamp($date))
{ {
$date = strtotime($date); $date = strtotime($date);
} }
@ -5807,6 +5843,16 @@ abstract class ComponentbuilderHelper
&& ($timestamp >= ~PHP_INT_MAX); && ($timestamp >= ~PHP_INT_MAX);
} }
/**
* Check if string is a valid date
* https://www.php.net/manual/en/function.checkdate.php#113205
*/
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
/** /**
* Load the Composer Vendors * Load the Composer Vendors