diff --git a/README.md b/README.md index 8ab0e94ec..f80f39c77 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 24th June, 2020 ++ *Last Build*: 7th July, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282642** ++ *Line count*: **282473** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index 8ab0e94ec..f80f39c77 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 24th June, 2020 ++ *Last Build*: 7th July, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282642** ++ *Line count*: **282473** + *Field count*: **1522** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/compiler/joomla_3/JFormFieldCustom.php b/admin/compiler/joomla_3/JFormFieldCustom.php index 85aa5469e..6ab1c0ffb 100644 --- a/admin/compiler/joomla_3/JFormFieldCustom.php +++ b/admin/compiler/joomla_3/JFormFieldCustom.php @@ -17,9 +17,7 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -// import the ###JFORM_extends### field type -jimport('joomla.form.helper'); -JFormHelper::loadFieldClass('###JFORM_extends###'); +###JFORM_TYPE_HEADER### /** * ###Type### Form Field class for the ###Component### component diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index 3f3ffa46d..5d618a1a8 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -322,8 +322,8 @@ class Get = array( 'Joomla' . '.JText._(', 'JText:' . ':script(', - 'JText:' . ':_(', - 'JText:' . ':sprintf(', + 'Text:' . ':_(', // namespace and J version will be found + 'Text:' . ':sprintf(', // namespace and J version will be found 'JustTEXT:' . ':_(' ); @@ -1201,7 +1201,7 @@ class Get array(&$this->componentContext, &$component) ); - // set upater + // set updater $updater = array( 'unique' => array( 'addadmin_views' => array('table' => 'component_admin_views', @@ -1281,7 +1281,8 @@ class Get ); // set the add targets - $addArrayF = array('files' => 'files', 'folders' => 'folders', + $addArrayF = array('files' => 'files', + 'folders' => 'folders', 'filesfullpath' => 'files', 'foldersfullpath' => 'folders'); foreach ($addArrayF as $addTarget => $targetHere) @@ -10370,7 +10371,7 @@ class Get $locker['LOCKBASE64((((' . $value . '))))'] = "base64_decode( preg_replace('/\s+/', ''," . PHP_EOL . $this->_t(2) . "'" . wordwrap(base64_encode($value), 64, PHP_EOL . $this->_t(2), true) . - "'));"; + "'))"; } // update the script return $this->setPlaceholders($script, $locker); diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index bb99927e2..e70dc64d8 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -2328,6 +2328,7 @@ class Fields extends Structure . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->"; $field .= PHP_EOL . $this->_t(2) . $taber . " $value) { if ($property != 'option') @@ -2335,8 +2336,274 @@ class Fields extends Structure $field .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . $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) + . ''; + // 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) . ''; + $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) . ''; + $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) + . ''; + $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) . ''; + } + 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) . ''; + $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) . ''; + $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) . ''; + $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) . ''; + $optionArray[$value] = $langValue; + } + } + } + } + // if options were found + if (ComponentbuilderHelper::checkString($optionSet)) + { + $field .= '>'; + $field .= PHP_EOL . $this->_t(3) . $taber . ""; + $field .= $optionSet; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; + } + // 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 . "" + . PHP_EOL; + } + else + { + $optionArray = false; + $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; } - $field .= PHP_EOL . $this->_t(2) . $taber . "/>"; // incase the field is in the config and has not been set if ('config' === $view_name_single && 'configs' === $view_name_list || (strpos($view_name_single, 'P|uG!n') !== false @@ -3083,6 +3350,244 @@ class Fields extends Structure { $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) if (('config' === $view_name_single @@ -4149,9 +4654,10 @@ class Fields extends Structure if ($target_view !== $otherView) { $target_extension = trim(explode('.', $_extension)[0]); - $correction = $target_extension . '.' . $otherView; + $correction = $target_extension . '.' . $otherView; $this->app->enqueueMessage( - JText::sprintf('

Category targeting view mismatch

+ JText::sprintf( + '

Category targeting view mismatch

The category field in (%s) admin view has a mismatching target view.
To correct the mismatch, the extension value %s in the @@ -4160,7 +4666,10 @@ class Fields extends Structure best category integration with Joomla.
Please watch this tutorial before proceeding!!!, - code fix

', $field['field'], $view_name_single, $_extension, $field['field'], $correction), 'Error' + code fix

', + $field['field'], $view_name_single, $_extension, + $field['field'], $correction + ), 'Error' ); } } @@ -4369,15 +4878,15 @@ class Fields extends Structure && $typeName != 'repeatable' && $typeName != 'subform')) { - $this->filterBuilder[$view_name_list][] = array('type' => $typeName, - 'code' => $name, - 'lang' => $listLangName, - 'database' => $view_name_single, - 'function' => ComponentbuilderHelper::safeString( + $this->filterBuilder[$view_name_list][] = array('type' => $typeName, + 'code' => $name, + 'lang' => $listLangName, + 'database' => $view_name_single, + 'function' => ComponentbuilderHelper::safeString( $name, 'F' ), - 'custom' => $custom, - 'options' => $options); + 'custom' => $custom, + 'options' => $options); } // build the layout @@ -4442,21 +4951,21 @@ class Fields extends Structure ); // set the [[[PLACEHOLDER]]] options $replace = array( - $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, + $this->bbb . 'JPREFIX' . $this->ddd => $jprefix, $this->bbb . 'TABLE' - . $this->ddd => $data['custom']['table'], + . $this->ddd => $data['custom']['table'], $this->bbb . 'ID' - . $this->ddd => $data['custom']['id'], + . $this->ddd => $data['custom']['id'], $this->bbb . 'TEXT' - . $this->ddd => $data['custom']['text'], - $this->bbb . 'CODE_TEXT' . $this->ddd => $data['code'] . '_' + . $this->ddd => $data['custom']['text'], + $this->bbb . 'CODE_TEXT' . $this->ddd => $data['code'] . '_' . $data['custom']['text'], - $this->bbb . 'CODE' . $this->ddd => $data['code'], - $this->bbb . 'view_type' . $this->ddd => $view_name_single + $this->bbb . 'CODE' . $this->ddd => $data['code'], + $this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'], - $this->bbb . 'type' . $this->ddd => $data['type'], + $this->bbb . 'type' . $this->ddd => $data['type'], $this->bbb . 'com_component' - . $this->ddd => (isset($data['custom']['component']) + . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString( $data['custom']['component'] )) ? ComponentbuilderHelper::safeString( @@ -4464,19 +4973,19 @@ class Fields extends Structure ) : 'com_' . $this->componentCodeName, // set the generic values $this->bbb . 'component' - . $this->ddd => $this->componentCodeName, + . $this->ddd => $this->componentCodeName, $this->bbb . 'Component' - . $this->ddd => $this->fileContentStatic[$this->hhh + . $this->ddd => $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh], $this->bbb . 'view' - . $this->ddd => (isset($data['custom']['view']) + . $this->ddd => (isset($data['custom']['view']) && ComponentbuilderHelper::checkString( $data['custom']['view'] )) ? ComponentbuilderHelper::safeString( $data['custom']['view'] ) : $view_name_single, $this->bbb . 'views' - . $this->ddd => (isset($data['custom']['views']) + . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString( $data['custom']['views'] )) ? ComponentbuilderHelper::safeString( @@ -4544,12 +5053,21 @@ class Fields extends Structure $this->buildDynamique( $target, 'fieldcustom', $data['custom']['type'] ); + // get the extends name + $JFORM_extends = ComponentbuilderHelper::safeString( + $data['custom']['extends'] + ); + // JFORM_TYPE_HEADER <<>> + $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 <<>> $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JFORM_extends' . $this->hhh] - = ComponentbuilderHelper::safeString( - $data['custom']['extends'] - ); + = $JFORM_extends; // JFORM_EXTENDS <<>> $this->fileContentDynamic['customfield_' . $data['type']][$this->hhh . 'JFORM_EXTENDS' . $this->hhh] @@ -4582,15 +5100,56 @@ class Fields extends Structure ); } } - // JFORM_TYPE_PHP <<>> - $this->fileContentDynamic['customfield_' - . $data['type']][$this->hhh . 'JFORM_TYPE_PHP' - . $this->hhh] - .= PHP_EOL . $this->setPlaceholders( - $phpBucket, $replace - ); + // 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 <<>> + $this->fileContentDynamic['customfield_' + . $data['type']][$this->hhh . 'JFORM_TYPE_PHP' + . $this->hhh] + .= PHP_EOL . $this->setPlaceholders( + $phpBucket, $replace + ); + } } } + // 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 { diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 14f012682..c1bd7ea1e 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1849,9 +1849,20 @@ class Interpretation extends Fields $method = array(); $method[] = PHP_EOL . PHP_EOL . $this->_t(1) . "/**"; $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) - . "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(2) . "//" . $this->setLine(__LINE__) . " load the user component language files if there is an error."; @@ -1864,75 +1875,144 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "\$lang->load(\$extension, \$base_dir, \$language_tag, \$reload);"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " load the user regestration model"; - $method[] = $this->_t(2) - . "\$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']))"; + . " Load the correct user model."; + $method[] = $this->_t(2) . "if (\$mode == 1)"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Use the users passwords"; - $method[] = $this->_t(3) . "\$password = \$new['password'];"; - $method[] = $this->_t(3) . "\$password2 = \$new['password2'];"; + . " Load the backend-user model"; + $method[] = $this->_t(3) + . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "else"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Set random password"; - $method[] = $this->_t(3) . "\$password = self::randomkey(8);"; - $method[] = $this->_t(3) . "\$password2 = \$password;"; + . " Load the user site-registration model"; + $method[] = $this->_t(3) + . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; $method[] = $this->_t(2) . "}"; $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) - . "if (!isset(\$new['username']) || !self::checkString(\$new['username']))"; + . "if (!isset(\$credentials['username']) || !self::checkString(\$credentials['username']))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['name']);"; + . "\$credentials['username'] = \$credentials['email'];"; $method[] = $this->_t(2) . "}"; $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(3) . "'username' => \$new['username'],"; - $method[] = $this->_t(3) . "'name' => \$new['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) . "'username' => \$credentials['username'],"; + $method[] = $this->_t(3) . "'name' => \$credentials['name']"; $method[] = $this->_t(3) . "'block' => 0 );"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) - . " register the new user"; - $method[] = $this->_t(2) . "\$userId = \$model->register(\$data);"; + . " Added details based on mode"; + $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__) - . " set activation back to default"; + . " Check if password was set"; $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__) - . " set send password back to default"; + . " Now Add password if set"; $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__) . " if user is created"; $method[] = $this->_t(2) . "if (\$userId > 0)"; $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(2) . "}"; $method[] = $this->_t(2) . "return \$model->getError();"; $method[] = $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(2) . "//" . $this->setLine(__LINE__) . " Get the params and set the new values"; @@ -5663,10 +5743,16 @@ class Interpretation extends Fields // return buttons if they were build if (ComponentbuilderHelper::checkArray($buttons)) { - // set the custom get form method JAVASCRIPT_FOR_BUTTONS - $this->fileContentDynamic[$view['settings']->code][$this->hhh - . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh] - = $this->setJavaScriptForButtons(); + // 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 + $this->fileContentDynamic[$view['settings']->code][$this->hhh + . $TARGET . '_JAVASCRIPT_FOR_BUTTONS' . $this->hhh] + = $this->setJavaScriptForButtons(); + } // insure the form is added (only if no form exist) if (isset($view['settings']->default) && strpos( @@ -26396,10 +26482,10 @@ function vdm_dkim() { $xml .= PHP_EOL . $this->_t(1) . '_t(2) . 'addrulepath="/administrator/components/com_' - . $this->componentCodeName . '/modules/rules"'; + . $this->componentCodeName . '/models/rules"'; $xml .= PHP_EOL . $this->_t(2) . 'addfieldpath="/administrator/components/com_' - . $this->componentCodeName . '/modules/fields"'; + . $this->componentCodeName . '/models/fields"'; $xml .= PHP_EOL . $this->_t(1) . '>'; } else @@ -26432,12 +26518,24 @@ function vdm_dkim() { . $fieldset . ' fieldset points to the module -->'; $xml .= PHP_EOL . $this->_t(1) . '
_t(2) - . 'addrulepath="/modules/' . $module->file_name - . '/rules"'; - $xml .= PHP_EOL . $this->_t(2) - . 'addfieldpath="/modules/' . $module->file_name - . '/fields"'; + 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) + . 'addrulepath="/modules/' . $module->file_name + . '/rules"'; + $xml .= PHP_EOL . $this->_t(2) + . 'addfieldpath="/modules/' . $module->file_name + . '/fields"'; + } $xml .= PHP_EOL . $this->_t(1) . '>'; } else diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 7656d19ca..0454e54b1 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -5535,14 +5535,61 @@ abstract class ComponentbuilderHelper * */ 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 if (!JFactory::getUser()->authorise($view. '.access', $component)) { return false; } - // build record - $record = new stdClass(); + // we start with false. + $can_edit = false; // check that we have the ID if (self::checkObject($item) && isset($item->id)) { @@ -5572,25 +5619,14 @@ abstract class ComponentbuilderHelper // get user action permission to edit $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); // 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 - $edit = $action->get('core.edit', 'none-set'); - } - // 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; + // fall back on the core permission then (this can be an issue) + $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false)); } } - return false; + return $can_edit; } - /** * set subform type table @@ -5633,9 +5669,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5645,9 +5681,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5671,9 +5707,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5683,9 +5719,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5695,9 +5731,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5707,9 +5743,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5719,9 +5755,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5731,9 +5767,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5743,9 +5779,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5755,9 +5791,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5767,9 +5803,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5779,9 +5815,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5791,9 +5827,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5810,6 +5846,16 @@ abstract class ComponentbuilderHelper && ($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 diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index b8fba47f6..3a4179ca2 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyffields; +$items = $displayData->vycfields; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/layouts/server/linked_components_fullwidth.php b/admin/layouts/server/linked_components_fullwidth.php index 6c2657c4a..daa8d8f7c 100644 --- a/admin/layouts/server/linked_components_fullwidth.php +++ b/admin/layouts/server/linked_components_fullwidth.php @@ -13,7 +13,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyplinked_components; +$items = $displayData->vymlinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; // set the edit URL diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 1693a7b6d..d129cd98b 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -249,7 +249,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyffields() + public function getVycfields() { // Get the user object. $user = JFactory::getUser(); @@ -337,13 +337,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVyffields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVycfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVyffields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVycfields($item->indexes, 'indexes'); // 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 - $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 */ - public function selectionTranslationVyffields($value,$name) + public function selectionTranslationVycfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 140839784..963e061c9 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -13,11 +13,8 @@ jform_vvvvwczvxo_required = false; jform_vvvvwdavxp_required = false; jform_vvvvwdbvxq_required = false; jform_vvvvwdcvxr_required = false; -jform_vvvvwddvxs_required = false; -jform_vvvvwdgvxt_required = false; -jform_vvvvwdgvxu_required = false; -jform_vvvvwdhvxv_required = false; -jform_vvvvwdhvxw_required = false; +jform_vvvvwdfvxs_required = false; +jform_vvvvwdfvxt_required = false; // Initial Script jQuery(document).ready(function() @@ -34,32 +31,24 @@ jQuery(document).ready(function() var datatype_vvvvwdc = jQuery("#jform_datatype").val(); vvvvwdc(datatype_vvvvwdc); + var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); - vvvvwdd(datatype_vvvvwdd); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); - var store_vvvvwdg = jQuery("#jform_store").val(); - var datatype_vvvvwdg = jQuery("#jform_datatype").val(); - vvvvwdg(store_vvvvwdg,datatype_vvvvwdg); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwdg(add_css_view_vvvvwdg); - var datatype_vvvvwdh = jQuery("#jform_datatype").val(); - var store_vvvvwdh = jQuery("#jform_store").val(); - vvvvwdh(datatype_vvvvwdh,store_vvvvwdh); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwdh(add_css_views_vvvvwdh); - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_javascript_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwdi(add_javascript_view_footer_vvvvwdi); - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_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); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); // the vvvvwcz function @@ -289,8 +278,20 @@ function datatype_vvvvwdc_SomeFunc(datatype_vvvvwdc) } // 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) { var temp_vvvvwdd = datatype_vvvvwdd; @@ -305,34 +306,27 @@ function vvvvwdd(datatype_vvvvwdd) // set this function logic - if (datatype) + if (store && datatype) { - jQuery('#jform_store').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; - } + jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwddvxs_required) - { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwddvxs_required = true; - } + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } +// the vvvvwdd Some function +function store_vvvvwdd_SomeFunc(store_vvvvwdd) +{ + // set the function logic + if (store_vvvvwdd == 4) + { + return true; + } + return false; +} + // the vvvvwdd Some function function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd) { @@ -344,61 +338,82 @@ function datatype_vvvvwdd_SomeFunc(datatype_vvvvwdd) return false; } -// the vvvvwde function -function vvvvwde(store_vvvvwde,datatype_vvvvwde) +// the vvvvwdf function +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 store_vvvvwde = []; - store_vvvvwde.push(temp_vvvvwde); + var temp_vvvvwdf = store_vvvvwdf; + var store_vvvvwdf = []; + 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); - - 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); + var store = store_vvvvwdf.some(store_vvvvwdf_SomeFunc); // 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 { - 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(); + // remove required attribute from on_get_model_field field + if (!jform_vvvvwdfvxs_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_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; + } } } -// the vvvvwde Some function -function store_vvvvwde_SomeFunc(store_vvvvwde) +// the vvvvwdf Some function +function store_vvvvwdf_SomeFunc(store_vvvvwdf) { // set the function logic - if (store_vvvvwde == 4) - { - return true; - } - return false; -} - -// the vvvvwde Some function -function datatype_vvvvwde_SomeFunc(datatype_vvvvwde) -{ - // 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; } @@ -406,220 +421,10 @@ function datatype_vvvvwde_SomeFunc(datatype_vvvvwde) } // the vvvvwdg function -function vvvvwdg(store_vvvvwdg,datatype_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) +function vvvvwdg(add_css_view_vvvvwdg) { // set the function logic - if (store_vvvvwdg == 6) - { - 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) + if (add_css_view_vvvvwdg == 1) { jQuery('#jform_css_view-lbl').closest('.control-group').show(); } @@ -629,11 +434,11 @@ function vvvvwdi(add_css_view_vvvvwdi) } } -// the vvvvwdj function -function vvvvwdj(add_css_views_vvvvwdj) +// the vvvvwdh function +function vvvvwdh(add_css_views_vvvvwdh) { // 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(); } @@ -643,11 +448,11 @@ function vvvvwdj(add_css_views_vvvvwdj) } } -// the vvvvwdk function -function vvvvwdk(add_javascript_view_footer_vvvvwdk) +// the vvvvwdi function +function vvvvwdi(add_javascript_view_footer_vvvvwdi) { // 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(); } @@ -657,11 +462,11 @@ function vvvvwdk(add_javascript_view_footer_vvvvwdk) } } -// the vvvvwdl function -function vvvvwdl(add_javascript_views_footer_vvvvwdl) +// the vvvvwdj function +function vvvvwdj(add_javascript_views_footer_vvvvwdj) { // 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(); } diff --git a/admin/models/forms/fieldtype.js b/admin/models/forms/fieldtype.js index 7db12fdef..e4c46f1d3 100644 --- a/admin/models/forms/fieldtype.js +++ b/admin/models/forms/fieldtype.js @@ -9,75 +9,154 @@ */ // Some Global Values -jform_vvvvwdmvxx_required = false; -jform_vvvvwdovxy_required = false; -jform_vvvvwdqvxz_required = false; -jform_vvvvwdsvya_required = false; -jform_vvvvwdtvyb_required = false; -jform_vvvvwduvyc_required = false; -jform_vvvvwdzvyd_required = false; -jform_vvvvwdzvye_required = false; +jform_vvvvwdkvxu_required = false; +jform_vvvvwdmvxv_required = false; +jform_vvvvwdovxw_required = false; +jform_vvvvwdqvxx_required = false; +jform_vvvvwdrvxy_required = false; +jform_vvvvwdsvxz_required = false; +jform_vvvvwdxvya_required = false; +jform_vvvvwdxvyb_required = false; // Initial Script jQuery(document).ready(function() { - var datalenght_vvvvwdm = jQuery("#jform_datalenght").val(); - var has_defaults_vvvvwdm = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm); + 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); - var datadefault_vvvvwdo = jQuery("#jform_datadefault").val(); + 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); + + var datatype_vvvvwdo = jQuery("#jform_datatype").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); var datatype_vvvvwdq = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdq = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq); + 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); + var datatype_vvvvwds = jQuery("#jform_datatype").val(); var has_defaults_vvvvwds = jQuery("#jform_has_defaults input[type='radio']:checked").val(); vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds); - 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); - + var store_vvvvwdu = jQuery("#jform_store").val(); var datatype_vvvvwdu = jQuery("#jform_datatype").val(); var has_defaults_vvvvwdu = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu); + vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu); + 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); + + 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(); - var has_defaults_vvvvwdw = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw); + vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw); - 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); - - 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); - - var has_defaults_vvvvwdz = jQuery("#jform_has_defaults input[type='radio']:checked").val(); - vvvvwdz(has_defaults_vvvvwdz); + vvvvwdx(has_defaults_vvvvwdx); }); -// the vvvvwdm function -function vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm) +// the vvvvwdk function +function vvvvwdk(datalenght_vvvvwdk,has_defaults_vvvvwdk) { - if (isSet(datalenght_vvvvwdm) && datalenght_vvvvwdm.constructor !== Array) + if (isSet(datalenght_vvvvwdk) && datalenght_vvvvwdk.constructor !== Array) { - var temp_vvvvwdm = datalenght_vvvvwdm; - var datalenght_vvvvwdm = []; - datalenght_vvvvwdm.push(temp_vvvvwdm); + var temp_vvvvwdk = datalenght_vvvvwdk; + var datalenght_vvvvwdk = []; + datalenght_vvvvwdk.push(temp_vvvvwdk); } - else if (!isSet(datalenght_vvvvwdm)) + else if (!isSet(datalenght_vvvvwdk)) { - var datalenght_vvvvwdm = []; + var datalenght_vvvvwdk = []; } - var datalenght = datalenght_vvvvwdm.some(datalenght_vvvvwdm_SomeFunc); + var datalenght = datalenght_vvvvwdk.some(datalenght_vvvvwdk_SomeFunc); + + if (isSet(has_defaults_vvvvwdk) && has_defaults_vvvvwdk.constructor !== Array) + { + var temp_vvvvwdk = has_defaults_vvvvwdk; + var has_defaults_vvvvwdk = []; + has_defaults_vvvvwdk.push(temp_vvvvwdk); + } + else if (!isSet(has_defaults_vvvvwdk)) + { + var has_defaults_vvvvwdk = []; + } + var has_defaults = has_defaults_vvvvwdk.some(has_defaults_vvvvwdk_SomeFunc); + + + // set this function logic + if (datalenght && has_defaults) + { + jQuery('#jform_datalenght_other').closest('.control-group').show(); + // add required attribute to datalenght_other field + if (jform_vvvvwdkvxu_required) + { + updateFieldRequired('datalenght_other',0); + jQuery('#jform_datalenght_other').prop('required','required'); + jQuery('#jform_datalenght_other').attr('aria-required',true); + jQuery('#jform_datalenght_other').addClass('required'); + jform_vvvvwdkvxu_required = false; + } + } + else + { + jQuery('#jform_datalenght_other').closest('.control-group').hide(); + // remove required attribute from datalenght_other field + if (!jform_vvvvwdkvxu_required) + { + updateFieldRequired('datalenght_other',1); + jQuery('#jform_datalenght_other').removeAttr('required'); + jQuery('#jform_datalenght_other').removeAttr('aria-required'); + jQuery('#jform_datalenght_other').removeClass('required'); + jform_vvvvwdkvxu_required = true; + } + } +} + +// the vvvvwdk Some function +function datalenght_vvvvwdk_SomeFunc(datalenght_vvvvwdk) +{ + // set the function logic + if (datalenght_vvvvwdk == 'Other') + { + return true; + } + return false; +} + +// the vvvvwdk Some function +function has_defaults_vvvvwdk_SomeFunc(has_defaults_vvvvwdk) +{ + // set the function logic + if (has_defaults_vvvvwdk == 1) + { + return true; + } + return false; +} + +// the vvvvwdm function +function vvvvwdm(datadefault_vvvvwdm,has_defaults_vvvvwdm) +{ + if (isSet(datadefault_vvvvwdm) && datadefault_vvvvwdm.constructor !== Array) + { + var temp_vvvvwdm = datadefault_vvvvwdm; + var datadefault_vvvvwdm = []; + datadefault_vvvvwdm.push(temp_vvvvwdm); + } + else if (!isSet(datadefault_vvvvwdm)) + { + var datadefault_vvvvwdm = []; + } + var datadefault = datadefault_vvvvwdm.some(datadefault_vvvvwdm_SomeFunc); if (isSet(has_defaults_vvvvwdm) && has_defaults_vvvvwdm.constructor !== Array) { @@ -93,39 +172,39 @@ function vvvvwdm(datalenght_vvvvwdm,has_defaults_vvvvwdm) // set this function logic - if (datalenght && has_defaults) + if (datadefault && has_defaults) { - jQuery('#jform_datalenght_other').closest('.control-group').show(); - // add required attribute to datalenght_other field - if (jform_vvvvwdmvxx_required) + jQuery('#jform_datadefault_other').closest('.control-group').show(); + // add required attribute to datadefault_other field + if (jform_vvvvwdmvxv_required) { - updateFieldRequired('datalenght_other',0); - jQuery('#jform_datalenght_other').prop('required','required'); - jQuery('#jform_datalenght_other').attr('aria-required',true); - jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvwdmvxx_required = false; + updateFieldRequired('datadefault_other',0); + jQuery('#jform_datadefault_other').prop('required','required'); + jQuery('#jform_datadefault_other').attr('aria-required',true); + jQuery('#jform_datadefault_other').addClass('required'); + jform_vvvvwdmvxv_required = false; } } else { - jQuery('#jform_datalenght_other').closest('.control-group').hide(); - // remove required attribute from datalenght_other field - if (!jform_vvvvwdmvxx_required) + jQuery('#jform_datadefault_other').closest('.control-group').hide(); + // remove required attribute from datadefault_other field + if (!jform_vvvvwdmvxv_required) { - updateFieldRequired('datalenght_other',1); - jQuery('#jform_datalenght_other').removeAttr('required'); - jQuery('#jform_datalenght_other').removeAttr('aria-required'); - jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvwdmvxx_required = true; + updateFieldRequired('datadefault_other',1); + jQuery('#jform_datadefault_other').removeAttr('required'); + jQuery('#jform_datadefault_other').removeAttr('aria-required'); + jQuery('#jform_datadefault_other').removeClass('required'); + jform_vvvvwdmvxv_required = true; } } } // the vvvvwdm Some function -function datalenght_vvvvwdm_SomeFunc(datalenght_vvvvwdm) +function datadefault_vvvvwdm_SomeFunc(datadefault_vvvvwdm) { // set the function logic - if (datalenght_vvvvwdm == 'Other') + if (datadefault_vvvvwdm == 'Other') { return true; } @@ -144,19 +223,19 @@ function has_defaults_vvvvwdm_SomeFunc(has_defaults_vvvvwdm) } // the vvvvwdo function -function vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo) +function vvvvwdo(datatype_vvvvwdo,has_defaults_vvvvwdo) { - if (isSet(datadefault_vvvvwdo) && datadefault_vvvvwdo.constructor !== Array) + if (isSet(datatype_vvvvwdo) && datatype_vvvvwdo.constructor !== Array) { - var temp_vvvvwdo = datadefault_vvvvwdo; - var datadefault_vvvvwdo = []; - datadefault_vvvvwdo.push(temp_vvvvwdo); + var temp_vvvvwdo = datatype_vvvvwdo; + var datatype_vvvvwdo = []; + datatype_vvvvwdo.push(temp_vvvvwdo); } - else if (!isSet(datadefault_vvvvwdo)) + else if (!isSet(datatype_vvvvwdo)) { - var datadefault_vvvvwdo = []; + var datatype_vvvvwdo = []; } - var datadefault = datadefault_vvvvwdo.some(datadefault_vvvvwdo_SomeFunc); + var datatype = datatype_vvvvwdo.some(datatype_vvvvwdo_SomeFunc); if (isSet(has_defaults_vvvvwdo) && has_defaults_vvvvwdo.constructor !== Array) { @@ -172,39 +251,39 @@ function vvvvwdo(datadefault_vvvvwdo,has_defaults_vvvvwdo) // set this function logic - if (datadefault && has_defaults) + if (datatype && has_defaults) { - jQuery('#jform_datadefault_other').closest('.control-group').show(); - // add required attribute to datadefault_other field - if (jform_vvvvwdovxy_required) + jQuery('#jform_datalenght').closest('.control-group').show(); + // add required attribute to datalenght field + if (jform_vvvvwdovxw_required) { - updateFieldRequired('datadefault_other',0); - jQuery('#jform_datadefault_other').prop('required','required'); - jQuery('#jform_datadefault_other').attr('aria-required',true); - jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvwdovxy_required = false; + updateFieldRequired('datalenght',0); + jQuery('#jform_datalenght').prop('required','required'); + jQuery('#jform_datalenght').attr('aria-required',true); + jQuery('#jform_datalenght').addClass('required'); + jform_vvvvwdovxw_required = false; } } else { - jQuery('#jform_datadefault_other').closest('.control-group').hide(); - // remove required attribute from datadefault_other field - if (!jform_vvvvwdovxy_required) + jQuery('#jform_datalenght').closest('.control-group').hide(); + // remove required attribute from datalenght field + if (!jform_vvvvwdovxw_required) { - updateFieldRequired('datadefault_other',1); - jQuery('#jform_datadefault_other').removeAttr('required'); - jQuery('#jform_datadefault_other').removeAttr('aria-required'); - jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvwdovxy_required = true; + updateFieldRequired('datalenght',1); + jQuery('#jform_datalenght').removeAttr('required'); + jQuery('#jform_datalenght').removeAttr('aria-required'); + jQuery('#jform_datalenght').removeClass('required'); + jform_vvvvwdovxw_required = true; } } } // the vvvvwdo Some function -function datadefault_vvvvwdo_SomeFunc(datadefault_vvvvwdo) +function datatype_vvvvwdo_SomeFunc(datatype_vvvvwdo) { // set the function logic - if (datadefault_vvvvwdo == 'Other') + if (datatype_vvvvwdo == 'CHAR' || datatype_vvvvwdo == 'VARCHAR' || datatype_vvvvwdo == 'INT' || datatype_vvvvwdo == 'TINYINT' || datatype_vvvvwdo == 'BIGINT' || datatype_vvvvwdo == 'FLOAT' || datatype_vvvvwdo == 'DECIMAL' || datatype_vvvvwdo == 'DOUBLE') { return true; } @@ -253,28 +332,30 @@ function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq) // set this function logic if (datatype && has_defaults) { - jQuery('#jform_datalenght').closest('.control-group').show(); - // add required attribute to datalenght field - if (jform_vvvvwdqvxz_required) + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwdqvxx_required) { - updateFieldRequired('datalenght',0); - jQuery('#jform_datalenght').prop('required','required'); - jQuery('#jform_datalenght').attr('aria-required',true); - jQuery('#jform_datalenght').addClass('required'); - jform_vvvvwdqvxz_required = false; + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwdqvxx_required = false; } } else { - jQuery('#jform_datalenght').closest('.control-group').hide(); - // remove required attribute from datalenght field - if (!jform_vvvvwdqvxz_required) + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwdqvxx_required) { - updateFieldRequired('datalenght',1); - jQuery('#jform_datalenght').removeAttr('required'); - jQuery('#jform_datalenght').removeAttr('aria-required'); - jQuery('#jform_datalenght').removeClass('required'); - jform_vvvvwdqvxz_required = true; + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwdqvxx_required = true; } } } @@ -283,7 +364,7 @@ function vvvvwdq(datatype_vvvvwdq,has_defaults_vvvvwdq) function datatype_vvvvwdq_SomeFunc(datatype_vvvvwdq) { // set the function logic - if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE') + if (datatype_vvvvwdq == 'CHAR' || datatype_vvvvwdq == 'VARCHAR' || datatype_vvvvwdq == 'DATETIME' || datatype_vvvvwdq == 'DATE' || datatype_vvvvwdq == 'TIME' || datatype_vvvvwdq == 'INT' || datatype_vvvvwdq == 'TINYINT' || datatype_vvvvwdq == 'BIGINT' || datatype_vvvvwdq == 'FLOAT' || datatype_vvvvwdq == 'DECIMAL' || datatype_vvvvwdq == 'DOUBLE') { return true; } @@ -301,6 +382,87 @@ function has_defaults_vvvvwdq_SomeFunc(has_defaults_vvvvwdq) return false; } +// the vvvvwdr function +function vvvvwdr(has_defaults_vvvvwdr,datatype_vvvvwdr) +{ + if (isSet(has_defaults_vvvvwdr) && has_defaults_vvvvwdr.constructor !== Array) + { + var temp_vvvvwdr = has_defaults_vvvvwdr; + var has_defaults_vvvvwdr = []; + has_defaults_vvvvwdr.push(temp_vvvvwdr); + } + else if (!isSet(has_defaults_vvvvwdr)) + { + var has_defaults_vvvvwdr = []; + } + var has_defaults = has_defaults_vvvvwdr.some(has_defaults_vvvvwdr_SomeFunc); + + if (isSet(datatype_vvvvwdr) && datatype_vvvvwdr.constructor !== Array) + { + var temp_vvvvwdr = datatype_vvvvwdr; + var datatype_vvvvwdr = []; + datatype_vvvvwdr.push(temp_vvvvwdr); + } + else if (!isSet(datatype_vvvvwdr)) + { + var datatype_vvvvwdr = []; + } + var datatype = datatype_vvvvwdr.some(datatype_vvvvwdr_SomeFunc); + + + // set this function logic + if (has_defaults && datatype) + { + jQuery('#jform_datadefault').closest('.control-group').show(); + jQuery('#jform_indexes').closest('.control-group').show(); + // add required attribute to indexes field + if (jform_vvvvwdrvxy_required) + { + updateFieldRequired('indexes',0); + jQuery('#jform_indexes').prop('required','required'); + jQuery('#jform_indexes').attr('aria-required',true); + jQuery('#jform_indexes').addClass('required'); + jform_vvvvwdrvxy_required = false; + } + } + else + { + jQuery('#jform_datadefault').closest('.control-group').hide(); + jQuery('#jform_indexes').closest('.control-group').hide(); + // remove required attribute from indexes field + if (!jform_vvvvwdrvxy_required) + { + updateFieldRequired('indexes',1); + jQuery('#jform_indexes').removeAttr('required'); + jQuery('#jform_indexes').removeAttr('aria-required'); + jQuery('#jform_indexes').removeClass('required'); + jform_vvvvwdrvxy_required = true; + } + } +} + +// the vvvvwdr Some function +function has_defaults_vvvvwdr_SomeFunc(has_defaults_vvvvwdr) +{ + // set the function logic + if (has_defaults_vvvvwdr == 1) + { + return true; + } + return false; +} + +// the vvvvwdr Some function +function datatype_vvvvwdr_SomeFunc(datatype_vvvvwdr) +{ + // set the function logic + if (datatype_vvvvwdr == 'CHAR' || datatype_vvvvwdr == 'VARCHAR' || datatype_vvvvwdr == 'DATETIME' || datatype_vvvvwdr == 'DATE' || datatype_vvvvwdr == 'TIME' || datatype_vvvvwdr == 'INT' || datatype_vvvvwdr == 'TINYINT' || datatype_vvvvwdr == 'BIGINT' || datatype_vvvvwdr == 'FLOAT' || datatype_vvvvwdr == 'DECIMAL' || datatype_vvvvwdr == 'DOUBLE') + { + return true; + } + return false; +} + // the vvvvwds function function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) { @@ -332,30 +494,28 @@ function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) // set this function logic if (datatype && has_defaults) { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwdsvya_required) + jQuery('#jform_store').closest('.control-group').show(); + // add required attribute to store field + if (jform_vvvvwdsvxz_required) { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwdsvya_required = false; + updateFieldRequired('store',0); + jQuery('#jform_store').prop('required','required'); + jQuery('#jform_store').attr('aria-required',true); + jQuery('#jform_store').addClass('required'); + jform_vvvvwdsvxz_required = false; } } else { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwdsvya_required) + jQuery('#jform_store').closest('.control-group').hide(); + // remove required attribute from store field + if (!jform_vvvvwdsvxz_required) { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwdsvya_required = true; + updateFieldRequired('store',1); + jQuery('#jform_store').removeAttr('required'); + jQuery('#jform_store').removeAttr('aria-required'); + jQuery('#jform_store').removeClass('required'); + jform_vvvvwdsvxz_required = true; } } } @@ -364,7 +524,7 @@ function vvvvwds(datatype_vvvvwds,has_defaults_vvvvwds) function datatype_vvvvwds_SomeFunc(datatype_vvvvwds) { // set the function logic - if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'DATETIME' || datatype_vvvvwds == 'DATE' || datatype_vvvvwds == 'TIME' || datatype_vvvvwds == 'INT' || datatype_vvvvwds == 'TINYINT' || datatype_vvvvwds == 'BIGINT' || datatype_vvvvwds == 'FLOAT' || datatype_vvvvwds == 'DECIMAL' || datatype_vvvvwds == 'DOUBLE') + if (datatype_vvvvwds == 'CHAR' || datatype_vvvvwds == 'VARCHAR' || datatype_vvvvwds == 'TEXT' || datatype_vvvvwds == 'MEDIUMTEXT' || datatype_vvvvwds == 'LONGTEXT' || datatype_vvvvwds == 'BLOB' || datatype_vvvvwds == 'TINYBLOB' || datatype_vvvvwds == 'MEDIUMBLOB' || datatype_vvvvwds == 'LONGBLOB') { return true; } @@ -382,90 +542,21 @@ function has_defaults_vvvvwds_SomeFunc(has_defaults_vvvvwds) return false; } -// the vvvvwdt function -function vvvvwdt(has_defaults_vvvvwdt,datatype_vvvvwdt) -{ - if (isSet(has_defaults_vvvvwdt) && has_defaults_vvvvwdt.constructor !== Array) - { - var temp_vvvvwdt = has_defaults_vvvvwdt; - var has_defaults_vvvvwdt = []; - has_defaults_vvvvwdt.push(temp_vvvvwdt); - } - else if (!isSet(has_defaults_vvvvwdt)) - { - var has_defaults_vvvvwdt = []; - } - var has_defaults = has_defaults_vvvvwdt.some(has_defaults_vvvvwdt_SomeFunc); - - if (isSet(datatype_vvvvwdt) && datatype_vvvvwdt.constructor !== Array) - { - var temp_vvvvwdt = datatype_vvvvwdt; - var datatype_vvvvwdt = []; - datatype_vvvvwdt.push(temp_vvvvwdt); - } - else if (!isSet(datatype_vvvvwdt)) - { - var datatype_vvvvwdt = []; - } - var datatype = datatype_vvvvwdt.some(datatype_vvvvwdt_SomeFunc); - - - // set this function logic - if (has_defaults && datatype) - { - jQuery('#jform_datadefault').closest('.control-group').show(); - jQuery('#jform_indexes').closest('.control-group').show(); - // add required attribute to indexes field - if (jform_vvvvwdtvyb_required) - { - updateFieldRequired('indexes',0); - jQuery('#jform_indexes').prop('required','required'); - jQuery('#jform_indexes').attr('aria-required',true); - jQuery('#jform_indexes').addClass('required'); - jform_vvvvwdtvyb_required = false; - } - } - else - { - jQuery('#jform_datadefault').closest('.control-group').hide(); - jQuery('#jform_indexes').closest('.control-group').hide(); - // remove required attribute from indexes field - if (!jform_vvvvwdtvyb_required) - { - updateFieldRequired('indexes',1); - jQuery('#jform_indexes').removeAttr('required'); - jQuery('#jform_indexes').removeAttr('aria-required'); - jQuery('#jform_indexes').removeClass('required'); - jform_vvvvwdtvyb_required = true; - } - } -} - -// the vvvvwdt Some function -function has_defaults_vvvvwdt_SomeFunc(has_defaults_vvvvwdt) -{ - // set the function logic - if (has_defaults_vvvvwdt == 1) - { - return true; - } - return false; -} - -// the vvvvwdt Some function -function datatype_vvvvwdt_SomeFunc(datatype_vvvvwdt) -{ - // set the function logic - if (datatype_vvvvwdt == 'CHAR' || datatype_vvvvwdt == 'VARCHAR' || datatype_vvvvwdt == 'DATETIME' || datatype_vvvvwdt == 'DATE' || datatype_vvvvwdt == 'TIME' || datatype_vvvvwdt == 'INT' || datatype_vvvvwdt == 'TINYINT' || datatype_vvvvwdt == 'BIGINT' || datatype_vvvvwdt == 'FLOAT' || datatype_vvvvwdt == 'DECIMAL' || datatype_vvvvwdt == 'DOUBLE') - { - return true; - } - return false; -} - // the vvvvwdu function -function vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu) +function vvvvwdu(store_vvvvwdu,datatype_vvvvwdu,has_defaults_vvvvwdu) { + if (isSet(store_vvvvwdu) && store_vvvvwdu.constructor !== Array) + { + var temp_vvvvwdu = store_vvvvwdu; + var store_vvvvwdu = []; + store_vvvvwdu.push(temp_vvvvwdu); + } + else if (!isSet(store_vvvvwdu)) + { + var store_vvvvwdu = []; + } + var store = store_vvvvwdu.some(store_vvvvwdu_SomeFunc); + if (isSet(datatype_vvvvwdu) && datatype_vvvvwdu.constructor !== Array) { var temp_vvvvwdu = datatype_vvvvwdu; @@ -492,34 +583,27 @@ function vvvvwdu(datatype_vvvvwdu,has_defaults_vvvvwdu) // set this function logic - if (datatype && has_defaults) + if (store && datatype && has_defaults) { - jQuery('#jform_store').closest('.control-group').show(); - // add required attribute to store field - if (jform_vvvvwduvyc_required) - { - updateFieldRequired('store',0); - jQuery('#jform_store').prop('required','required'); - jQuery('#jform_store').attr('aria-required',true); - jQuery('#jform_store').addClass('required'); - jform_vvvvwduvyc_required = false; - } + jQuery('.note_whmcs_encryption').closest('.control-group').show(); } else { - jQuery('#jform_store').closest('.control-group').hide(); - // remove required attribute from store field - if (!jform_vvvvwduvyc_required) - { - updateFieldRequired('store',1); - jQuery('#jform_store').removeAttr('required'); - jQuery('#jform_store').removeAttr('aria-required'); - jQuery('#jform_store').removeClass('required'); - jform_vvvvwduvyc_required = true; - } + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); } } +// the vvvvwdu Some function +function store_vvvvwdu_SomeFunc(store_vvvvwdu) +{ + // set the function logic + if (store_vvvvwdu == 4) + { + return true; + } + return false; +} + // the vvvvwdu Some function function datatype_vvvvwdu_SomeFunc(datatype_vvvvwdu) { @@ -542,9 +626,105 @@ function has_defaults_vvvvwdu_SomeFunc(has_defaults_vvvvwdu) return false; } -// the vvvvwdw function -function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) +// the vvvvwdv function +function vvvvwdv(datatype_vvvvwdv,store_vvvvwdv,has_defaults_vvvvwdv) { + if (isSet(datatype_vvvvwdv) && datatype_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = datatype_vvvvwdv; + var datatype_vvvvwdv = []; + datatype_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(datatype_vvvvwdv)) + { + var datatype_vvvvwdv = []; + } + var datatype = datatype_vvvvwdv.some(datatype_vvvvwdv_SomeFunc); + + if (isSet(store_vvvvwdv) && store_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = store_vvvvwdv; + var store_vvvvwdv = []; + store_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(store_vvvvwdv)) + { + var store_vvvvwdv = []; + } + var store = store_vvvvwdv.some(store_vvvvwdv_SomeFunc); + + if (isSet(has_defaults_vvvvwdv) && has_defaults_vvvvwdv.constructor !== Array) + { + var temp_vvvvwdv = has_defaults_vvvvwdv; + var has_defaults_vvvvwdv = []; + has_defaults_vvvvwdv.push(temp_vvvvwdv); + } + else if (!isSet(has_defaults_vvvvwdv)) + { + var has_defaults_vvvvwdv = []; + } + var has_defaults = has_defaults_vvvvwdv.some(has_defaults_vvvvwdv_SomeFunc); + + + // set this function logic + if (datatype && store && has_defaults) + { + jQuery('.note_whmcs_encryption').closest('.control-group').show(); + } + else + { + jQuery('.note_whmcs_encryption').closest('.control-group').hide(); + } +} + +// the vvvvwdv Some function +function datatype_vvvvwdv_SomeFunc(datatype_vvvvwdv) +{ + // set the function logic + if (datatype_vvvvwdv == 'CHAR' || datatype_vvvvwdv == 'VARCHAR' || datatype_vvvvwdv == 'TEXT' || datatype_vvvvwdv == 'MEDIUMTEXT' || datatype_vvvvwdv == 'LONGTEXT' || datatype_vvvvwdv == 'BLOB' || datatype_vvvvwdv == 'TINYBLOB' || datatype_vvvvwdv == 'MEDIUMBLOB' || datatype_vvvvwdv == 'LONGBLOB') + { + return true; + } + return false; +} + +// the vvvvwdv Some function +function store_vvvvwdv_SomeFunc(store_vvvvwdv) +{ + // set the function logic + if (store_vvvvwdv == 4) + { + return true; + } + return false; +} + +// the vvvvwdv Some function +function has_defaults_vvvvwdv_SomeFunc(has_defaults_vvvvwdv) +{ + // set the function logic + if (has_defaults_vvvvwdv == 1) + { + return true; + } + return false; +} + +// the vvvvwdw function +function vvvvwdw(has_defaults_vvvvwdw,store_vvvvwdw,datatype_vvvvwdw) +{ + if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array) + { + var temp_vvvvwdw = has_defaults_vvvvwdw; + var has_defaults_vvvvwdw = []; + has_defaults_vvvvwdw.push(temp_vvvvwdw); + } + else if (!isSet(has_defaults_vvvvwdw)) + { + var has_defaults_vvvvwdw = []; + } + var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc); + if (isSet(store_vvvvwdw) && store_vvvvwdw.constructor !== Array) { var temp_vvvvwdw = store_vvvvwdw; @@ -569,21 +749,9 @@ function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) } var datatype = datatype_vvvvwdw.some(datatype_vvvvwdw_SomeFunc); - if (isSet(has_defaults_vvvvwdw) && has_defaults_vvvvwdw.constructor !== Array) - { - var temp_vvvvwdw = has_defaults_vvvvwdw; - var has_defaults_vvvvwdw = []; - has_defaults_vvvvwdw.push(temp_vvvvwdw); - } - else if (!isSet(has_defaults_vvvvwdw)) - { - var has_defaults_vvvvwdw = []; - } - var has_defaults = has_defaults_vvvvwdw.some(has_defaults_vvvvwdw_SomeFunc); - // set this function logic - if (store && datatype && has_defaults) + if (has_defaults && store && datatype) { jQuery('.note_whmcs_encryption').closest('.control-group').show(); } @@ -593,6 +761,17 @@ function vvvvwdw(store_vvvvwdw,datatype_vvvvwdw,has_defaults_vvvvwdw) } } +// the vvvvwdw Some function +function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw) +{ + // set the function logic + if (has_defaults_vvvvwdw == 1) + { + return true; + } + return false; +} + // the vvvvwdw Some function function store_vvvvwdw_SomeFunc(store_vvvvwdw) { @@ -615,233 +794,54 @@ function datatype_vvvvwdw_SomeFunc(datatype_vvvvwdw) return false; } -// the vvvvwdw Some function -function has_defaults_vvvvwdw_SomeFunc(has_defaults_vvvvwdw) -{ - // set the function logic - if (has_defaults_vvvvwdw == 1) - { - return true; - } - return false; -} - // the vvvvwdx function -function vvvvwdx(datatype_vvvvwdx,store_vvvvwdx,has_defaults_vvvvwdx) -{ - if (isSet(datatype_vvvvwdx) && datatype_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = datatype_vvvvwdx; - var datatype_vvvvwdx = []; - datatype_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(datatype_vvvvwdx)) - { - var datatype_vvvvwdx = []; - } - var datatype = datatype_vvvvwdx.some(datatype_vvvvwdx_SomeFunc); - - if (isSet(store_vvvvwdx) && store_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = store_vvvvwdx; - var store_vvvvwdx = []; - store_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(store_vvvvwdx)) - { - var store_vvvvwdx = []; - } - var store = store_vvvvwdx.some(store_vvvvwdx_SomeFunc); - - if (isSet(has_defaults_vvvvwdx) && has_defaults_vvvvwdx.constructor !== Array) - { - var temp_vvvvwdx = has_defaults_vvvvwdx; - var has_defaults_vvvvwdx = []; - has_defaults_vvvvwdx.push(temp_vvvvwdx); - } - else if (!isSet(has_defaults_vvvvwdx)) - { - var has_defaults_vvvvwdx = []; - } - var has_defaults = has_defaults_vvvvwdx.some(has_defaults_vvvvwdx_SomeFunc); - - - // set this function logic - if (datatype && store && has_defaults) - { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); - } -} - -// the vvvvwdx Some function -function datatype_vvvvwdx_SomeFunc(datatype_vvvvwdx) -{ - // set the function logic - if (datatype_vvvvwdx == 'CHAR' || datatype_vvvvwdx == 'VARCHAR' || datatype_vvvvwdx == 'TEXT' || datatype_vvvvwdx == 'MEDIUMTEXT' || datatype_vvvvwdx == 'LONGTEXT' || datatype_vvvvwdx == 'BLOB' || datatype_vvvvwdx == 'TINYBLOB' || datatype_vvvvwdx == 'MEDIUMBLOB' || datatype_vvvvwdx == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdx Some function -function store_vvvvwdx_SomeFunc(store_vvvvwdx) -{ - // set the function logic - if (store_vvvvwdx == 4) - { - return true; - } - return false; -} - -// the vvvvwdx Some function -function has_defaults_vvvvwdx_SomeFunc(has_defaults_vvvvwdx) +function vvvvwdx(has_defaults_vvvvwdx) { // set the function logic if (has_defaults_vvvvwdx == 1) - { - return true; - } - return false; -} - -// the vvvvwdy function -function vvvvwdy(has_defaults_vvvvwdy,store_vvvvwdy,datatype_vvvvwdy) -{ - if (isSet(has_defaults_vvvvwdy) && has_defaults_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = has_defaults_vvvvwdy; - var has_defaults_vvvvwdy = []; - has_defaults_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(has_defaults_vvvvwdy)) - { - var has_defaults_vvvvwdy = []; - } - var has_defaults = has_defaults_vvvvwdy.some(has_defaults_vvvvwdy_SomeFunc); - - if (isSet(store_vvvvwdy) && store_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = store_vvvvwdy; - var store_vvvvwdy = []; - store_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(store_vvvvwdy)) - { - var store_vvvvwdy = []; - } - var store = store_vvvvwdy.some(store_vvvvwdy_SomeFunc); - - if (isSet(datatype_vvvvwdy) && datatype_vvvvwdy.constructor !== Array) - { - var temp_vvvvwdy = datatype_vvvvwdy; - var datatype_vvvvwdy = []; - datatype_vvvvwdy.push(temp_vvvvwdy); - } - else if (!isSet(datatype_vvvvwdy)) - { - var datatype_vvvvwdy = []; - } - var datatype = datatype_vvvvwdy.some(datatype_vvvvwdy_SomeFunc); - - - // set this function logic - if (has_defaults && store && datatype) - { - jQuery('.note_whmcs_encryption').closest('.control-group').show(); - } - else - { - jQuery('.note_whmcs_encryption').closest('.control-group').hide(); - } -} - -// the vvvvwdy Some function -function has_defaults_vvvvwdy_SomeFunc(has_defaults_vvvvwdy) -{ - // set the function logic - if (has_defaults_vvvvwdy == 1) - { - return true; - } - return false; -} - -// the vvvvwdy Some function -function store_vvvvwdy_SomeFunc(store_vvvvwdy) -{ - // set the function logic - if (store_vvvvwdy == 4) - { - return true; - } - return false; -} - -// the vvvvwdy Some function -function datatype_vvvvwdy_SomeFunc(datatype_vvvvwdy) -{ - // set the function logic - if (datatype_vvvvwdy == 'CHAR' || datatype_vvvvwdy == 'VARCHAR' || datatype_vvvvwdy == 'TEXT' || datatype_vvvvwdy == 'MEDIUMTEXT' || datatype_vvvvwdy == 'LONGTEXT' || datatype_vvvvwdy == 'BLOB' || datatype_vvvvwdy == 'TINYBLOB' || datatype_vvvvwdy == 'MEDIUMBLOB' || datatype_vvvvwdy == 'LONGBLOB') - { - return true; - } - return false; -} - -// the vvvvwdz function -function vvvvwdz(has_defaults_vvvvwdz) -{ - // set the function logic - if (has_defaults_vvvvwdz == 1) { jQuery('#jform_datatype').closest('.control-group').show(); // add required attribute to datatype field - if (jform_vvvvwdzvyd_required) + if (jform_vvvvwdxvya_required) { updateFieldRequired('datatype',0); jQuery('#jform_datatype').prop('required','required'); jQuery('#jform_datatype').attr('aria-required',true); jQuery('#jform_datatype').addClass('required'); - jform_vvvvwdzvyd_required = false; + jform_vvvvwdxvya_required = false; } jQuery('#jform_null_switch').closest('.control-group').show(); // add required attribute to null_switch field - if (jform_vvvvwdzvye_required) + if (jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',0); jQuery('#jform_null_switch').prop('required','required'); jQuery('#jform_null_switch').attr('aria-required',true); jQuery('#jform_null_switch').addClass('required'); - jform_vvvvwdzvye_required = false; + jform_vvvvwdxvyb_required = false; } } else { jQuery('#jform_datatype').closest('.control-group').hide(); // remove required attribute from datatype field - if (!jform_vvvvwdzvyd_required) + if (!jform_vvvvwdxvya_required) { updateFieldRequired('datatype',1); jQuery('#jform_datatype').removeAttr('required'); jQuery('#jform_datatype').removeAttr('aria-required'); jQuery('#jform_datatype').removeClass('required'); - jform_vvvvwdzvyd_required = true; + jform_vvvvwdxvya_required = true; } jQuery('#jform_null_switch').closest('.control-group').hide(); // remove required attribute from null_switch field - if (!jform_vvvvwdzvye_required) + if (!jform_vvvvwdxvyb_required) { updateFieldRequired('null_switch',1); jQuery('#jform_null_switch').removeAttr('required'); jQuery('#jform_null_switch').removeAttr('aria-required'); jQuery('#jform_null_switch').removeClass('required'); - jform_vvvvwdzvye_required = true; + jform_vvvvwdxvyb_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 172e0ac98..0b1d12134 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -9,98 +9,210 @@ */ // Some Global Values -jform_vvvvwekvyq_required = false; -jform_vvvvwelvyr_required = false; -jform_vvvvwemvys_required = false; -jform_vvvvwenvyt_required = false; -jform_vvvvwepvyu_required = false; +jform_vvvvweivyn_required = false; +jform_vvvvwejvyo_required = false; +jform_vvvvwekvyp_required = false; +jform_vvvvwelvyq_required = false; +jform_vvvvwenvyr_required = false; // Initial Script jQuery(document).ready(function() { - var location_vvvvwek = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwek(location_vvvvwek); + var location_vvvvwei = jQuery("#jform_location input[type='radio']:checked").val(); + vvvvwei(location_vvvvwei); - var location_vvvvwel = jQuery("#jform_location input[type='radio']:checked").val(); - vvvvwel(location_vvvvwel); + var location_vvvvwej = jQuery("#jform_location input[type='radio']:checked").val(); + 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(); vvvvwem(type_vvvvwem); - var type_vvvvwen = jQuery("#jform_type").val(); - vvvvwen(type_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); + var target_vvvvwen = jQuery("#jform_target input[type='radio']:checked").val(); + vvvvwen(target_vvvvwen); }); -// the vvvvwek function -function vvvvwek(location_vvvvwek) +// the vvvvwei function +function vvvvwei(location_vvvvwei) { // set the function logic - if (location_vvvvwek == 1) + if (location_vvvvwei == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); // add required attribute to admin_view field - if (jform_vvvvwekvyq_required) + if (jform_vvvvweivyn_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwekvyq_required = false; + jform_vvvvweivyn_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); // remove required attribute from admin_view field - if (!jform_vvvvwekvyq_required) + if (!jform_vvvvweivyn_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwekvyq_required = true; + jform_vvvvweivyn_required = true; } } } -// the vvvvwel function -function vvvvwel(location_vvvvwel) +// the vvvvwej function +function vvvvwej(location_vvvvwej) { // set the function logic - if (location_vvvvwel == 2) + if (location_vvvvwej == 2) { jQuery('#jform_site_view').closest('.control-group').show(); // add required attribute to site_view field - if (jform_vvvvwelvyr_required) + if (jform_vvvvwejvyo_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwelvyr_required = false; + jform_vvvvwejvyo_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); // remove required attribute from site_view field - if (!jform_vvvvwelvyr_required) + if (!jform_vvvvwejvyo_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-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 function vvvvwem(type_vvvvwem) { @@ -117,118 +229,6 @@ function vvvvwem(type_vvvvwem) 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 if (type) { @@ -240,45 +240,45 @@ function vvvvweo(type_vvvvweo) } } -// the vvvvweo Some function -function type_vvvvweo_SomeFunc(type_vvvvweo) +// the vvvvwem Some function +function type_vvvvwem_SomeFunc(type_vvvvwem) { // set the function logic - if (type_vvvvweo == 2) + if (type_vvvvwem == 2) { return true; } return false; } -// the vvvvwep function -function vvvvwep(target_vvvvwep) +// the vvvvwen function +function vvvvwen(target_vvvvwen) { // set the function logic - if (target_vvvvwep == 1) + if (target_vvvvwen == 1) { jQuery('#jform_groups').closest('.control-group').show(); // add required attribute to groups field - if (jform_vvvvwepvyu_required) + if (jform_vvvvwenvyr_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwepvyu_required = false; + jform_vvvvwenvyr_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); // remove required attribute from groups field - if (!jform_vvvvwepvyu_required) + if (!jform_vvvvwenvyr_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwepvyu_required = true; + jform_vvvvwenvyr_required = true; } } } diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js index 0e8d5c6a4..603cace0d 100644 --- a/admin/models/forms/server.js +++ b/admin/models/forms/server.js @@ -9,24 +9,28 @@ */ // Some Global Values -jform_vvvvweavyg_required = false; -jform_vvvvweavyh_required = false; -jform_vvvvweavyi_required = false; +jform_vvvvwdyvyd_required = false; +jform_vvvvwdyvye_required = false; +jform_vvvvwdyvyf_required = false; +jform_vvvvwdyvyg_required = false; +jform_vvvvwdyvyh_required = false; +jform_vvvvwdzvyi_required = false; jform_vvvvweavyj_required = false; -jform_vvvvweavyk_required = false; -jform_vvvvwebvyl_required = false; -jform_vvvvwecvym_required = false; -jform_vvvvweevyn_required = false; -jform_vvvvwegvyo_required = false; +jform_vvvvwecvyk_required = false; +jform_vvvvweevyl_required = false; // Initial Script jQuery(document).ready(function() { - var protocol_vvvvwea = jQuery("#jform_protocol").val(); - vvvvwea(protocol_vvvvwea); + var protocol_vvvvwdy = jQuery("#jform_protocol").val(); + vvvvwdy(protocol_vvvvwdy); - var protocol_vvvvweb = jQuery("#jform_protocol").val(); - vvvvweb(protocol_vvvvweb); + var protocol_vvvvwdz = jQuery("#jform_protocol").val(); + 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 authentication_vvvvwec = jQuery("#jform_authentication").val(); @@ -39,14 +43,206 @@ jQuery(document).ready(function() var protocol_vvvvweg = jQuery("#jform_protocol").val(); var authentication_vvvvweg = jQuery("#jform_authentication").val(); 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 -function vvvvwea(protocol_vvvvwea) +function vvvvwea(protocol_vvvvwea,authentication_vvvvwea) { if (isSet(protocol_vvvvwea) && protocol_vvvvwea.constructor !== Array) { @@ -60,115 +256,45 @@ function vvvvwea(protocol_vvvvwea) } 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 - if (protocol) + if (protocol && authentication) { - jQuery('#jform_authentication').closest('.control-group').show(); - // add required attribute to authentication 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 + jQuery('#jform_password').closest('.control-group').show(); + // add required attribute to password field if (jform_vvvvweavyj_required) { - updateFieldRequired('path',0); - jQuery('#jform_path').prop('required','required'); - jQuery('#jform_path').attr('aria-required',true); - jQuery('#jform_path').addClass('required'); + updateFieldRequired('password',0); + jQuery('#jform_password').prop('required','required'); + jQuery('#jform_password').attr('aria-required',true); + jQuery('#jform_password').addClass('required'); 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 { - jQuery('#jform_authentication').closest('.control-group').hide(); - // remove required attribute from authentication 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 + jQuery('#jform_password').closest('.control-group').hide(); + // remove required attribute from password field if (!jform_vvvvweavyj_required) { - updateFieldRequired('path',1); - jQuery('#jform_path').removeAttr('required'); - jQuery('#jform_path').removeAttr('aria-required'); - jQuery('#jform_path').removeClass('required'); + updateFieldRequired('password',1); + jQuery('#jform_password').removeAttr('required'); + jQuery('#jform_password').removeAttr('aria-required'); + jQuery('#jform_password').removeClass('required'); 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; } -// the vvvvweb function -function vvvvweb(protocol_vvvvweb) -{ - 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) +// the vvvvwea Some function +function authentication_vvvvwea_SomeFunc(authentication_vvvvwea) { // set the function logic - if (protocol_vvvvweb == 1) + if (authentication_vvvvwea == 1 || authentication_vvvvwea == 3 || authentication_vvvvwea == 5) { return true; } @@ -272,28 +351,28 @@ function vvvvwec(protocol_vvvvwec,authentication_vvvvwec) // set this function logic if (protocol && authentication) { - jQuery('#jform_password').closest('.control-group').show(); - // add required attribute to password field - if (jform_vvvvwecvym_required) + jQuery('#jform_private').closest('.control-group').show(); + // add required attribute to private field + if (jform_vvvvwecvyk_required) { - updateFieldRequired('password',0); - jQuery('#jform_password').prop('required','required'); - jQuery('#jform_password').attr('aria-required',true); - jQuery('#jform_password').addClass('required'); - jform_vvvvwecvym_required = false; + updateFieldRequired('private',0); + jQuery('#jform_private').prop('required','required'); + jQuery('#jform_private').attr('aria-required',true); + jQuery('#jform_private').addClass('required'); + jform_vvvvwecvyk_required = false; } } else { - jQuery('#jform_password').closest('.control-group').hide(); - // remove required attribute from password field - if (!jform_vvvvwecvym_required) + jQuery('#jform_private').closest('.control-group').hide(); + // remove required attribute from private field + if (!jform_vvvvwecvyk_required) { - updateFieldRequired('password',1); - jQuery('#jform_password').removeAttr('required'); - jQuery('#jform_password').removeAttr('aria-required'); - jQuery('#jform_password').removeClass('required'); - jform_vvvvwecvym_required = true; + updateFieldRequired('private',1); + jQuery('#jform_private').removeAttr('required'); + jQuery('#jform_private').removeAttr('aria-required'); + jQuery('#jform_private').removeClass('required'); + jform_vvvvwecvyk_required = true; } } } @@ -313,7 +392,7 @@ function protocol_vvvvwec_SomeFunc(protocol_vvvvwec) function authentication_vvvvwec_SomeFunc(authentication_vvvvwec) { // set the function logic - if (authentication_vvvvwec == 1 || authentication_vvvvwec == 3 || authentication_vvvvwec == 5) + if (authentication_vvvvwec == 2 || authentication_vvvvwec == 3) { return true; } @@ -351,28 +430,28 @@ function vvvvwee(protocol_vvvvwee,authentication_vvvvwee) // set this function logic if (protocol && authentication) { - jQuery('#jform_private').closest('.control-group').show(); - // add required attribute to private field - if (jform_vvvvweevyn_required) + jQuery('#jform_private_key').closest('.control-group').show(); + // add required attribute to private_key field + if (jform_vvvvweevyl_required) { - updateFieldRequired('private',0); - jQuery('#jform_private').prop('required','required'); - jQuery('#jform_private').attr('aria-required',true); - jQuery('#jform_private').addClass('required'); - jform_vvvvweevyn_required = false; + 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_vvvvweevyl_required = false; } } else { - jQuery('#jform_private').closest('.control-group').hide(); - // remove required attribute from private field - if (!jform_vvvvweevyn_required) + jQuery('#jform_private_key').closest('.control-group').hide(); + // remove required attribute from private_key field + if (!jform_vvvvweevyl_required) { - updateFieldRequired('private',1); - jQuery('#jform_private').removeAttr('required'); - jQuery('#jform_private').removeAttr('aria-required'); - jQuery('#jform_private').removeClass('required'); - jform_vvvvweevyn_required = true; + updateFieldRequired('private_key',1); + jQuery('#jform_private_key').removeAttr('required'); + jQuery('#jform_private_key').removeAttr('aria-required'); + jQuery('#jform_private_key').removeClass('required'); + jform_vvvvweevyl_required = true; } } } @@ -392,7 +471,7 @@ function protocol_vvvvwee_SomeFunc(protocol_vvvvwee) function authentication_vvvvwee_SomeFunc(authentication_vvvvwee) { // set the function logic - if (authentication_vvvvwee == 2 || authentication_vvvvwee == 3) + if (authentication_vvvvwee == 4 || authentication_vvvvwee == 5) { return true; } @@ -430,29 +509,11 @@ function vvvvweg(protocol_vvvvweg,authentication_vvvvweg) // set this function logic if (protocol && authentication) { - jQuery('#jform_private_key').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; - } + jQuery('#jform_secret').closest('.control-group').show(); } else { - jQuery('#jform_private_key').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; - } + jQuery('#jform_secret').closest('.control-group').hide(); } } @@ -471,68 +532,7 @@ function protocol_vvvvweg_SomeFunc(protocol_vvvvweg) function authentication_vvvvweg_SomeFunc(authentication_vvvvweg) { // set the function logic - if (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) + if (authentication_vvvvweg == 2 || authentication_vvvvweg == 3 || authentication_vvvvweg == 4 || authentication_vvvvweg == 5) { return true; } diff --git a/admin/models/server.php b/admin/models/server.php index e81331f46..7411bbbb8 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -191,7 +191,7 @@ class ComponentbuilderModelServer extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyplinked_components() + public function getVymlinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 737375ae9..6f7d3298f 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -2129,7 +2129,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`, -- INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name`, `properties`, `short_description`, `params`, `published`, `version`, `hits`, `ordering`, `guid`) VALUES -(1, '', 'The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwis', 'Calendar', '{\"properties0\":{\"name\":\"type\",\"example\":\"calendar\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be calendar.\"},\"properties1\":{\"name\":\"name\",\"example\":\"date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"NOW\",\"adjustable\":\"1\",\"description\":\"(optional) is the default date. This must be given in the same format as specified by the format argument. You can put \\\"NOW\\\" to have current time.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the text box.\"},\"properties5\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is read-only (true or false). If the text box is read-only, the date cannot be changed, but can be selected and copied. No calendar icon will be shown.\"},\"properties6\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is disabled (true or false). If the text box is disabled, the date cannot be changed, selected or copied.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"format\",\"example\":\"%d-%m-%Y\",\"adjustable\":\"1\",\"description\":\"(optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, \'%Y-%m-%d\' is assumed (giving dates like \'2008-04-16\').\"},\"properties9\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is time zone to be used. There are two values; server_utc and user_utc. The first one is server time zone and the later is user time zone as configured in global configuration and user information respectively.\"},\"properties10\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional)\"},\"properties11\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"translateformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true, the calendar will use a language string to determine the format. The `format` attribute is ignored. If false, the `format` attribute is used (same behaviour as today). (starting with 3.7.0)\"},\"properties14\":{\"name\":\"showtime\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true and translateformat is true, the language key DATE_FORMAT_CALENDAR_DATETIME is used, otherwise DATE_FORMAT_CALENDAR_DATE. (starting with 3.7.0)\"},\"properties15\":{\"name\":\"timeformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): can be set to 12 (and specify AM or PM) or 24 (starting with 3.7.0)\"},\"properties16\":{\"name\":\"singleheader\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to false, the year and the month selection will be set on two separates lines, with independant selection (starting with 3.7.0)\"},\"properties17\":{\"name\":\"todaybutton\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a button is added at the bottom of the datePicker to select the date of the current day (starting with 3.7.0)\"},\"properties18\":{\"name\":\"weeknumbers\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a column is added at the left of the datePicker to display the number of the week in the current year (starting with 3.7.0)\"},\"properties19\":{\"name\":\"filltable\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, dates of the previous and next month is added at the top and the bottom of the current month to fill the grid (starting with 3.7.0)\"},\"properties20\":{\"name\":\"minyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative lower limit for the year selection. The user could not select a year before your limit (starting with 3.7.0)\"},\"properties21\":{\"name\":\"maxyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative upper limit for the year selection. The user could not select a year after your limit (starting with 3.7.0)\"}}', 'provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.', '', 1, 7, '', '', '6cf5a33f-cb25-4a58-bfec-7e1511896402'), +(1, '', 'The calendar form field type provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value. If the field has a saved value this is shown in the text box. Otherwis', 'Calendar', '{\"properties0\":{\"name\":\"type\",\"example\":\"calendar\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be calendar.\"},\"properties1\":{\"name\":\"name\",\"example\":\"date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a date\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"NOW\",\"adjustable\":\"1\",\"description\":\"(optional) is the default date. This must be given in the same format as specified by the format argument. You can put \\\"NOW\\\" to have current time.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the text box.\"},\"properties5\":{\"name\":\"readonly\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is read-only (true or false). If the text box is read-only, the date cannot be changed, but can be selected and copied. No calendar icon will be shown.\"},\"properties6\":{\"name\":\"disabled\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is whether the text box is disabled (true or false). If the text box is disabled, the date cannot be changed, selected or copied.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"},\"properties8\":{\"name\":\"format\",\"example\":\"%d-%m-%Y\",\"adjustable\":\"1\",\"description\":\"(optional) is the date format to be used. This is in the format used by PHP to specify date string formats (see below). If no format argument is given, \'%Y-%m-%d\' is assumed (giving dates like \'2008-04-16\').\"},\"properties9\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is time zone to be used. There are two values; server_utc and user_utc. The first one is server time zone and the later is user time zone as configured in global configuration and user information respectively.\"},\"properties10\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties23\":{\"name\":\"message\",\"example\":\"Error! Please add some text here.\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties11\":{\"name\":\"size\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional)\"},\"properties12\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties14\":{\"name\":\"translateformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true, the calendar will use a language string to determine the format. The `format` attribute is ignored. If false, the `format` attribute is used (same behaviour as today). (starting with 3.7.0)\"},\"properties15\":{\"name\":\"showtime\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): If set to true and translateformat is true, the language key DATE_FORMAT_CALENDAR_DATETIME is used, otherwise DATE_FORMAT_CALENDAR_DATE. (starting with 3.7.0)\"},\"properties16\":{\"name\":\"timeformat\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): can be set to 12 (and specify AM or PM) or 24 (starting with 3.7.0)\"},\"properties17\":{\"name\":\"singleheader\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to false, the year and the month selection will be set on two separates lines, with independant selection (starting with 3.7.0)\"},\"properties18\":{\"name\":\"todaybutton\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a button is added at the bottom of the datePicker to select the date of the current day (starting with 3.7.0)\"},\"properties19\":{\"name\":\"weeknumbers\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, a column is added at the left of the datePicker to display the number of the week in the current year (starting with 3.7.0)\"},\"properties20\":{\"name\":\"filltable\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): if set to true, dates of the previous and next month is added at the top and the bottom of the current month to fill the grid (starting with 3.7.0)\"},\"properties21\":{\"name\":\"minyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative lower limit for the year selection. The user could not select a year before your limit (starting with 3.7.0)\"},\"properties22\":{\"name\":\"maxyear\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional): set a signed integer for a number of years (-10, -2, 0, 7, 12, ...) to define the relative upper limit for the year selection. The user could not select a year after your limit (starting with 3.7.0)\"}}', 'provides a text box for entry of a date. An icon next to the text box provides a link to a pop-up calendar, which can also be used to enter the date value.', '', 1, 9, '', '', '6cf5a33f-cb25-4a58-bfec-7e1511896402'), (2, '', 'The category form field type provides a drop down list of all published categories for a certain extension. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected. If the show_root', 'Category', '{\"properties0\":{\"name\":\"type\",\"example\":\"category\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be category.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mycategory\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select a category\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"extension\",\"example\":\"com_content\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the name of the extension for which the categories will be retrieved. For example, to list content categories, use the value \'com_content\'. You can add also target one view, use the value \'com_component.view\'.\"},\"properties4\":{\"name\":\"scope\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is an alias for extension.\"},\"properties5\":{\"name\":\"required\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"show_root\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) is whether a choice representing the root category will be shown. Remove completely if it is not to be shown.\"},\"properties7\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default category ID number.\"},\"properties8\":{\"name\":\"description\",\"example\":\"select one of the following categories\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties10\":{\"name\":\"published\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) (1\\/0\\/2\\/-2) is whether the drop down will show only published (1), unpublished (0), archived (2) or trashed (-2) categories. It is possible to combine different publishing status by entering the list of the corresponding numbers separated by comma (e.g. \\\"0,2,-2\\\" will display only unpublished, archived and trashed categories in the drop-down).\"},\"properties11\":{\"name\":\"multiple\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) is whether multiple items can be selected at the same time (true or false).\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides a drop down list of categories for an extension.', '', 1, 11, '', '', 'f70346b3-2096-4f44-8b26-01ab87da7d1e'), (3, '', 'The checkbox form field type provides a single checkbox. If the parameter has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Checkbox', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkbox\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkbox\"},\"properties1\":{\"name\":\"name\",\"example\":\"show_title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Show title\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"value\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) is the value of the parameter if this checkbox is set (usually 1).\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value (usually 0 or 1).\"},\"properties5\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties6\":{\"name\":\"description\",\"example\":\"Show the title of the item\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties7\":{\"name\":\"class\",\"example\":\"inputbox\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (JavaScript use)\"}}', 'provides a single checkbox to be checked or unchecked', '', 1, 7, '', '', '10066262-b6e3-4f82-941e-cbe4f61ddd6c'), (4, '', 'The checkboxes form field type provides a set of checkboxes. Note: unlike most standard form field types, such as textfield or checkbox, this field is not an \"out of the box\" solution. It will create checkboxes for you, and submit their values in form of ', 'Checkboxes', '{\"properties0\":{\"name\":\"type\",\"example\":\"checkboxes\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be checkboxs\"},\"properties1\":{\"name\":\"name\",\"example\":\"toppings\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select Toppings\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"option\",\"example\":\"anch|Anchovies,chor|Chorizo,on|Onions,mush|Mushrooms\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties5\":{\"name\":\"description\",\"example\":\"Select the topping of your choice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the label.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'inputbox\'.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'provides unlimited checkboxes that can be used for multi-select.', '', 1, 4, '', '', 'ac10859b-58da-4584-9682-36a6c2c8d04d'), @@ -2144,7 +2144,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name (13, '', 'Provides a meter to show value in a range, updated with jQuery if needed or simply a fixed value.', 'Meter', '{\"properties0\":{\"name\":\"type\",\"example\":\"meter\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be meter.\"},\"properties1\":{\"name\":\"name\",\"example\":\"meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Meter\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"width\",\"example\":\"330px\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of meter box\"},\"properties4\":{\"name\":\"color\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The background color\"},\"properties5\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties6\":{\"name\":\"animated\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the bar have strips\"},\"properties7\":{\"name\":\"active\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(optional) lets the strips on the bar move\"},\"properties8\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties9\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties10\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties11\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties12\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a meter to show value in a range.', '', 1, 3, '', '', '81668284-e572-4e17-927b-ba697fc64bd0'), (14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without having to rely on the tooltips). Or adding any other text you want.', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'supports a one line text field.', '', 1, 5, '', '', 'f9ecacd0-8481-4157-8c71-d7aaefc2b7c3'), (15, '', 'Provides a one line text box with up-down handles to set a number in the field.', 'Number', '{\"properties0\":{\"name\":\"type\",\"example\":\"number\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be number.\"},\"properties1\":{\"name\":\"name\",\"example\":\"number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"max\",\"example\":\"40\",\"mandatory\":\"1\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Javascript that should run on changing of the value.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a one line text box with up-down handles to set a number in the field.', '', 1, 4, '', '', '5abd2b73-643b-4273-841a-787991aad968'), -(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties13\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"autocomplete\",\"example\":\"off\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties17\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 9, '', '', '0022598d-0ee1-44f2-aa94-c2eb47595f73'), +(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties6\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties7\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties8\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties9\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"field\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) used in validation of \\\"equals\\\" to link the field to match.\"},\"properties13\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties14\":{\"name\":\"hint\",\"example\":\"Password Here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties15\":{\"name\":\"autocomplete\",\"example\":\"off\",\"adjustable\":\"1\",\"description\":\"(optional) The autocomplete state for the form field. If \'off\' element will not be automatically completed by browser.\"},\"properties16\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties17\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 10, '', '', '0022598d-0ee1-44f2-aa94-c2eb47595f73'), (17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties7\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties11\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+ https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"},\"properties13\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 18, '', '', 'b868ed59-4208-4206-8504-95a35a74a11c'), (18, '', 'Provides a horizontal scroll bar to specify a value in a range.', 'Range', '{\"properties0\":{\"name\":\"type\",\"example\":\"range\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be range.\"},\"properties1\":{\"name\":\"name\",\"example\":\"range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties8\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties9\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties12\":{\"name\":\"onchange\",\"example\":\"jQuery(\'#jform_range\').closest(\'.controls\').find(\'span\').remove(); var value = jQuery(\'#jform_range\').val();jQuery(\'#jform_range\').closest(\'.controls\').append(\' \'+value+\'\');\",\"adjustable\":\"1\",\"description\":\"(optional) javascript to run when the range is changed\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Provides a horizontal scroll bar to specify a value in a range.', '', 1, 5, '', '', '627d3845-7273-4f75-8e63-7b3a319a42c8'), (19, '', 'Provides a modal with rows of formfields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Repeatable', '{\"properties0\":{\"name\":\"type\",\"example\":\"repeatable\",\"adjustable\":\"1\",\"description\":\"(mandatory) must be repeatable.\"},\"properties1\":{\"name\":\"name\",\"example\":\"repeatable_list\",\"adjustable\":\"1\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Repeatable List\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties5\":{\"name\":\"id\",\"example\":\"aid\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) id of the hidden from field. (the modal will have this id with an added suffix of \\\"_modal\\\" and the table within the modal will have this id with a suffix of _modal_table\\\")\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) class of the table.\"},\"properties7\":{\"name\":\"select\",\"example\":\"Click here\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) The text to show on the modal button.\"},\"properties8\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties9\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties10\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field. https:\\/\\/joomla.stackexchange.com\\/a\\/17682\\/2166\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 5, '', '', '05bf68d4-52f9-4705-8ae7-cba137fce0ad'), @@ -2415,7 +2415,9 @@ INSERT INTO `#__componentbuilder_library_files_folders_urls` (`id`, `addfiles`, (4, '{}', '{\"addfolders0\":{\"folder\":\"file_icon_vectors\",\"path\":\"\\/media\\/vector\",\"rename\":\"1\"}}', '{}', 7, '', 1, '2019-10-03 09:24:30', '2019-10-03 09:25:39', 2, '', 4), (5, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/css\\/grapes.min.css\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/grapesjs\\/0.14.15\\/grapes.min.js\",\"type\":2}}', 8, '', 1, '2020-02-10 21:34:33', '2020-02-18 21:12:35', 5, '', 5), (6, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.css\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/raw.githubusercontent.com\\/artf\\/grapesjs-preset-webpage\\/master\\/dist\\/grapesjs-preset-webpage.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/static.filestackapi.com\\/v3\\/filestack-0.1.10.js\",\"type\":2}}', 9, '', 1, '2020-02-18 21:13:16', '2020-02-18 21:14:11', 2, '', 5), -(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6); +(7, '{}', '{}', '{\"addurls0\":{\"url\":\"https:\\/\\/cdn.jsdelivr.net\\/npm\\/vue\",\"type\":3}}', 10, '', 1, '2020-06-05 13:11:54', '0000-00-00 00:00:00', 1, '', 6), +(8, '{}', '{}', '{\"addurls2\":{\"url\":\"https:\\/\\/cdn.datatables.net\\/1.10.21\\/js\\/jquery.dataTables.min.js\",\"type\":2},\"addurls1\":{\"url\":\"https:\\/\\/cdn.datatables.net\\/1.10.21\\/css\\/dataTables.uikit.min.css\",\"type\":2}}', 11, '', 1, '2020-06-27 21:34:44', '0000-00-00 00:00:00', 1, '', 7), +(9, '{}', '{}', '{\"addurls3\":{\"url\":\"http:\\/\\/code.jquery.com\\/ui\\/1.11.1\\/themes\\/smoothness\\/jquery-ui.css\",\"type\":2},\"addurls0\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/jquery-ui-timepicker-addon\\/1.6.3\\/jquery-ui-timepicker-addon.min.css\",\"type\":2},\"addurls1\":{\"url\":\"http:\\/\\/code.jquery.com\\/ui\\/1.11.1\\/jquery-ui.min.js\",\"type\":2},\"addurls2\":{\"url\":\"https:\\/\\/cdnjs.cloudflare.com\\/ajax\\/libs\\/jquery-ui-timepicker-addon\\/1.6.3\\/jquery-ui-timepicker-addon.min.js\",\"type\":2}}', 12, '', 1, '2020-06-29 00:00:44', '2020-06-29 04:32:57', 4, '', 8); CREATE TABLE IF NOT EXISTS `#__componentbuilder_external_code` ( diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index 30641b09a..ad01f1828 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -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 jQuery('#jform_datatype').on('keyup',function() { + var store_vvvvwdd = jQuery("#jform_store").val(); var datatype_vvvvwdd = jQuery("#jform_datatype").val(); - vvvvwdd(datatype_vvvvwdd); + vvvvwdd(store_vvvvwdd,datatype_vvvvwdd); }); jQuery('#adminForm').on('change', '#jform_datatype',function (e) { e.preventDefault(); + var store_vvvvwdd = jQuery("#jform_store").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() { - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); }); jQuery('#adminForm').on('change', '#jform_store',function (e) { e.preventDefault(); - var store_vvvvwde = jQuery("#jform_store").val(); - var datatype_vvvvwde = jQuery("#jform_datatype").val(); - vvvvwde(store_vvvvwde,datatype_vvvvwde); + var store_vvvvwdf = jQuery("#jform_store").val(); + vvvvwdf(store_vvvvwdf); }); -// #jform_datatype listeners for datatype_vvvvwde 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 +// #jform_add_css_view listeners for add_css_view_vvvvwdg function jQuery('#jform_add_css_view').on('keyup',function() { - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + vvvvwdg(add_css_view_vvvvwdg); }); jQuery('#adminForm').on('change', '#jform_add_css_view',function (e) { e.preventDefault(); - var add_css_view_vvvvwdi = jQuery("#jform_add_css_view input[type='radio']:checked").val(); - vvvvwdi(add_css_view_vvvvwdi); + var add_css_view_vvvvwdg = jQuery("#jform_add_css_view input[type='radio']:checked").val(); + 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() { - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_vvvvwdj); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + vvvvwdh(add_css_views_vvvvwdh); }); jQuery('#adminForm').on('change', '#jform_add_css_views',function (e) { e.preventDefault(); - var add_css_views_vvvvwdj = jQuery("#jform_add_css_views input[type='radio']:checked").val(); - vvvvwdj(add_css_views_vvvvwdj); + var add_css_views_vvvvwdh = jQuery("#jform_add_css_views input[type='radio']:checked").val(); + 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() { - 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_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + vvvvwdi(add_javascript_view_footer_vvvvwdi); }); jQuery('#adminForm').on('change', '#jform_add_javascript_view_footer',function (e) { e.preventDefault(); - 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_view_footer_vvvvwdi = jQuery("#jform_add_javascript_view_footer input[type='radio']:checked").val(); + 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() { - var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwdl(add_javascript_views_footer_vvvvwdl); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); jQuery('#adminForm').on('change', '#jform_add_javascript_views_footer',function (e) { e.preventDefault(); - var add_javascript_views_footer_vvvvwdl = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); - vvvvwdl(add_javascript_views_footer_vvvvwdl); + var add_javascript_views_footer_vvvvwdj = jQuery("#jform_add_javascript_views_footer input[type='radio']:checked").val(); + vvvvwdj(add_javascript_views_footer_vvvvwdj); }); diff --git a/admin/views/fieldtype/tmpl/edit.php b/admin/views/fieldtype/tmpl/edit.php index 2096e9020..39f606a97 100644 --- a/admin/views/fieldtype/tmpl/edit.php +++ b/admin/views/fieldtype/tmpl/edit.php @@ -136,71 +136,105 @@ $componentParams = $this->params; // will be removed just use $this->params inst diff --git a/admin/views/server/view.html.php b/admin/views/server/view.html.php index 2cfef1666..6284eda18 100644 --- a/admin/views/server/view.html.php +++ b/admin/views/server/view.html.php @@ -57,7 +57,7 @@ class ComponentbuilderViewServer extends JViewLegacy } // Get Linked view data - $this->vyplinked_components = $this->get('Vyplinked_components'); + $this->vymlinked_components = $this->get('Vymlinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/componentbuilder.xml b/componentbuilder.xml index 4c3480fa0..39bd367af 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 24th June, 2020 + 7th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com diff --git a/site/helpers/componentbuilder.php b/site/helpers/componentbuilder.php index 0bb18a7b9..81594fcb7 100644 --- a/site/helpers/componentbuilder.php +++ b/site/helpers/componentbuilder.php @@ -5532,14 +5532,61 @@ abstract class ComponentbuilderHelper * */ 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 if (!JFactory::getUser()->authorise($view. '.access', $component)) { return false; } - // build record - $record = new stdClass(); + // we start with false. + $can_edit = false; // check that we have the ID if (self::checkObject($item) && isset($item->id)) { @@ -5569,25 +5616,14 @@ abstract class ComponentbuilderHelper // get user action permission to edit $action = self::getActions($view, $record, $views, 'edit', str_replace('com_', '', $component)); // 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 - $edit = $action->get('core.edit', 'none-set'); - } - // 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; + // fall back on the core permission then (this can be an issue) + $can_edit = ($action->get('core.edit', false) || $action->get('core.edit.own', false)); } } - return false; + return $can_edit; } - /** * set subform type table @@ -5630,9 +5666,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5642,9 +5678,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5668,9 +5704,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5680,9 +5716,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5692,9 +5728,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5704,9 +5740,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5716,9 +5752,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5728,9 +5764,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5740,9 +5776,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5752,9 +5788,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5764,9 +5800,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5776,9 +5812,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5788,9 +5824,9 @@ abstract class ComponentbuilderHelper /** * 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); } @@ -5807,6 +5843,16 @@ abstract class ComponentbuilderHelper && ($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