diff --git a/README.md b/README.md index ce15e3cd0..9735cf1d9 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.10) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ 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*: 19th December, 2018 -+ *Version*: 2.9.8 ++ *Last Build*: 30th January, 2019 ++ *Version*: 2.9.10 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **195562** -+ *Field count*: **1087** -+ *File count*: **1275** ++ *Line count*: **194699** ++ *Field count*: **1089** ++ *File count*: **1277** + *Folder count*: **201** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index ce15e3cd0..9735cf1d9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.10) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ 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*: 19th December, 2018 -+ *Version*: 2.9.8 ++ *Last Build*: 30th January, 2019 ++ *Version*: 2.9.10 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **195562** -+ *Field count*: **1087** -+ *File count*: **1275** ++ *Line count*: **194699** ++ *Field count*: **1089** ++ *File count*: **1277** + *Folder count*: **201** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/compiler/joomla_3/Helper_email.php b/admin/compiler/joomla_3/Helper_email.php index ea9701a30..16b52e3b1 100644 --- a/admin/compiler/joomla_3/Helper_email.php +++ b/admin/compiler/joomla_3/Helper_email.php @@ -19,6 +19,13 @@ defined('_JEXEC') or die('Restricted access'); */ abstract class ###Component###Email { + /** + * The active recipient + * + * @var activeRecipient (array) + */ + public static $active = array(); + /** * Configuraiton object * @@ -54,6 +61,44 @@ abstract class ###Component###Email return self::$config; } + /** + * Returns the global mailer object, only creating it if it doesn't already exist. + * + */ + public static function getMailerInstance() + { + if (!self::$mailer) + { + self::$mailer = self::createMailer(); + } + + return self::$mailer; + } + + /** + * Check that a string looks like an email address. + * @param string $address The email address to check + * @param string|callable $patternselect A selector for the validation pattern to use : + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * @return boolean + * @static + * @access public + */ + public static function validateAddress($address, $patternselect = null) + { + return self::getMailerInstance()->validateAddress($address, $patternselect); + } + /** * Get a mailer object. * @@ -282,13 +327,70 @@ abstract class ###Component###Email if (method_exists('###Component###Helper','storeMessage')) { - // store the massage if the method is set - ###Component###Helper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email'); + // if we have active recipient details + if (isset(self::$active[$recipient])) + { + // store the massage if the method is set + ###Component###Helper::storeMessage($sendmail, self::$active[$recipient], $subject, $body, $textonly, $mode, 'email'); + // clear memory + unset(self::$active[$recipient]); + } + else + { + // store the massage if the method is set + ###Component###Helper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email'); + } } return $sendmail; } + /** + * Set html text (in a row) and subject (as title) to a email table. + * do not use

instead use
+ * in your html that you pass to this method + * since it is a table row it does not + * work well with paragraphs + * + * @return string on success + * + */ + public static function setBasicBody($html, $subject) + { + $body = array(); + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "" . $subject . ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = $html; + $body[] = ""; + $body[] = ""; + + return implode("\n", $body); + } + /** * Set html text (in a row) and subject (as title) to a email table. * do not use

instead use
diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index 60179e2b1..da24aba75 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -42,6 +42,8 @@ class ###Component###View###Views### extends JViewLegacy $this->listOrder = $this->escape($this->state->get('list.ordering')); $this->listDirn = $this->escape($this->state->get('list.direction')); $this->saveOrder = $this->listOrder == 'ordering'; + // set the return here value + $this->return_here = urlencode(base64_encode((string) JUri::getInstance())); // get global action permissions $this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO### diff --git a/admin/compiler/joomla_3/layout.php b/admin/compiler/joomla_3/layout.php index 81d525c27..5b6acbb3c 100644 --- a/admin/compiler/joomla_3/layout.php +++ b/admin/compiler/joomla_3/layout.php @@ -29,7 +29,6 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -38,20 +37,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layoutfull.php b/admin/compiler/joomla_3/layoutfull.php index 64902f2ab..bf7b64e02 100644 --- a/admin/compiler/joomla_3/layoutfull.php +++ b/admin/compiler/joomla_3/layoutfull.php @@ -23,16 +23,14 @@ $fields = $displayData->get('fields') ?: array( ###LAYOUTITEMS### ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>

- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/compiler/joomla_3/layoutitems.php b/admin/compiler/joomla_3/layoutitems.php index bf854edc6..82de7a208 100644 --- a/admin/compiler/joomla_3/layoutitems.php +++ b/admin/compiler/joomla_3/layoutitems.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layoutpublished.php b/admin/compiler/joomla_3/layoutpublished.php index c5541b68f..82de7a208 100644 --- a/admin/compiler/joomla_3/layoutpublished.php +++ b/admin/compiler/joomla_3/layoutpublished.php @@ -17,7 +17,6 @@ defined('_JEXEC') or die('Restricted access'); // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/compiler/joomla_3/layouttitle.php b/admin/compiler/joomla_3/layouttitle.php index 0152838ea..5c30a679f 100644 --- a/admin/compiler/joomla_3/layouttitle.php +++ b/admin/compiler/joomla_3/layouttitle.php @@ -19,13 +19,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( ###LAYOUTITEMS### ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/compiler/joomla_3/routeHelper.php b/admin/compiler/joomla_3/routeHelper.php index 3486c4562..6b482a4a4 100644 --- a/admin/compiler/joomla_3/routeHelper.php +++ b/admin/compiler/joomla_3/routeHelper.php @@ -108,8 +108,8 @@ abstract class ###Component###HelperRoute } } return $link; - } - + } + protected static function _findItem($needles = null,$type = null) { $app = JFactory::getApplication(); @@ -157,6 +157,10 @@ abstract class ###Component###HelperRoute self::$lookup[$language][$view][$item->query['id']] = $item->id; } } + else + { + self::$lookup[$language][$view][0] = $item->id; + } } } } @@ -167,17 +171,24 @@ abstract class ###Component###HelperRoute { if (isset(self::$lookup[$language][$view])) { - foreach ($ids as $id) + if (###Component###Helper::checkArray($ids)) { - if (isset(self::$lookup[$language][$view][(int) $id])) + foreach ($ids as $id) { - return self::$lookup[$language][$view][(int) $id]; + if (isset(self::$lookup[$language][$view][(int) $id])) + { + return self::$lookup[$language][$view][(int) $id]; + } } } + elseif (isset(self::$lookup[$language][$view][0])) + { + return self::$lookup[$language][$view][0]; + } } } } - + if ($type) { // Check if the global menu item has been set. diff --git a/admin/compiler/joomla_3/submitbutton.js b/admin/compiler/joomla_3/submitbutton.js index 84fe0dc54..f1600dba4 100644 --- a/admin/compiler/joomla_3/submitbutton.js +++ b/admin/compiler/joomla_3/submitbutton.js @@ -5,19 +5,9 @@ Joomla.submitbutton = function(task) if (task == ''){ return false; } else { - var isValid=true; var action = task.split('.'); - if (action[1] != 'cancel' && action[1] != 'close'){ - var forms = $$('form.form-validate'); - for (var i=0;i array('default' => 'MyISAM'), 'charset' => array('default' => 'utf8'), - 'collate' => array('default' => 'utf8_general_ci') + 'collate' => array('default' => 'utf8_general_ci'), + 'row_format' => array('default' => '') ); /** @@ -3007,16 +3008,26 @@ class Get switch ($result->main_source) { case 1: + // check if auto sync is set + if ($result->select_all == 1) + { + $result->view_selection = '*'; + } // set the view data - $result->main_get[0]['selection'] = $this->setDataSelection($result->key, $view_code, $result->view_selection, $result->view_table_main, 'a', '', 'view'); + $result->main_get[0]['selection'] = $this->setDataSelection($result->key, $view_code, $result->view_selection, $result->view_table_main, 'a', null, 'view'); $result->main_get[0]['as'] = 'a'; $result->main_get[0]['key'] = $result->key; $result->main_get[0]['context'] = $context; unset($result->view_selection); break; case 2: + // check if auto sync is set + if ($result->select_all == 1) + { + $result->db_selection = '*'; + } // set the database data - $result->main_get[0]['selection'] = $this->setDataSelection($result->key, $view_code, $result->db_selection, $result->db_table_main, 'a', '', 'db'); + $result->main_get[0]['selection'] = $this->setDataSelection($result->key, $view_code, $result->db_selection, $result->db_table_main, 'a', null, 'db'); $result->main_get[0]['as'] = 'a'; $result->main_get[0]['key'] = $result->key; $result->main_get[0]['context'] = $context; @@ -4198,21 +4209,42 @@ class Get { if (ComponentbuilderHelper::checkString($string)) { - $lines = explode(PHP_EOL, $string); + if ('db' === $type) + { + $table = '#__' . $asset; + $queryName = $asset; + $view = ''; + } + elseif ('view' === $type) + { + $view = $this->getViewTableName($asset); + $table = '#__' . $this->componentCodeName . '_' . $view; + $queryName = $view; + } + // just get all values from table if * is found + if ($string === '*' || strpos($string, '*') !== false) + { + if ($type == 'view') + { + $_string = ComponentbuilderHelper::getViewTableColumns($asset, $as, $row_type); + } + else + { + $_string = ComponentbuilderHelper::getDbTableColumns($asset, $as, $row_type); + } + // get only selected values + $lines = explode(PHP_EOL, $_string); + // make sure to set the string to * + $string = '*'; + } + else + { + // get only selected values + $lines = explode(PHP_EOL, $string); + } + // only continue if lines are available if (ComponentbuilderHelper::checkArray($lines)) { - if ('db' === $type) - { - $table = '#__' . $asset; - $queryName = $asset; - $view = ''; - } - elseif ('view' === $type) - { - $view = $this->getViewTableName($asset); - $table = '#__' . $this->componentCodeName . '_' . $view; - $queryName = $view; - } $gets = array(); $keys = array(); // first load all options @@ -4271,7 +4303,16 @@ class Get } if (ComponentbuilderHelper::checkArray($gets) && ComponentbuilderHelper::checkArray($keys)) { - $querySelect = '$query->select($db->quoteName(' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $gets) . '),' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $keys) . ')));'; + // single joined selection needs the prefix to the values to avoid conflict in the names + // so we most still add then AS + if ($string == '*' && 1 != $row_type) + { + $querySelect = "\$query->select('" . $as . ".*');"; + } + else + { + $querySelect = '$query->select($db->quoteName(' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $gets) . '),' . PHP_EOL . $this->_t(3) . 'array(' . implode(',', $keys) . ')));'; + } $queryFrom = '$db->quoteName(' . $this->db->quote($table) . ', ' . $this->db->quote($as) . ')'; // return the select query return array('select' => $querySelect, 'from' => $queryFrom, 'name' => $queryName, 'table' => $table, 'type' => $type, 'select_gets' => $gets, 'select_keys' => $keys); @@ -4915,7 +4956,7 @@ class Get // when the custom code is loaded if ($loaded === true) { - $string = $this->insertCustomCode($string, $debug); + $string = $this->insertCustomCode($bucket, $string, $debug); } // if debug if ($debug) @@ -4936,19 +4977,13 @@ class Get * @return string on success * */ - protected function insertCustomCode($string, $debug = 0) + protected function insertCustomCode($ids, $string, $debug = 0) { $code = array(); - // if debug - if ($debug) - { - echo '$this->customCode:'; - var_dump($this->customCode); - } // load the code - foreach ($this->customCode as $item) + foreach ($ids as $id) { - $this->buildCustomCodePlaceholders($item, $code, $debug); + $this->buildCustomCodePlaceholders($this->customCodeMemory[$id], $code, $debug); } // if debug if ($debug) diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index c45d28f8c..34f689c2d 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -1427,18 +1427,18 @@ class Fields extends Structure elseif ($typeName === 'subform') { // now add to the field set - $field .= PHP_EOL . $this->_t(2) . ""; - $field .= PHP_EOL . $this->_t(2) . "_t(2) . $taber . ""; + $field .= PHP_EOL . $this->_t(2) . $taber . " $value) { if ($property != 'fields') { - $field .= PHP_EOL . $this->_t(3) . $property . '="' . $value . '"'; + $field .= PHP_EOL . $this->_t(3) . $taber . $property . '="' . $value . '"'; } } $field .= ">"; - $field .= PHP_EOL . $this->_t(3) . '"; - $field .= PHP_EOL . $this->_t(2) . ""; + $field .= PHP_EOL . $this->_t(3) . $taber . ""; + $field .= PHP_EOL . $this->_t(2) . $taber . ""; } } elseif ($setType === 'custom') @@ -1862,6 +1880,25 @@ class Fields extends Structure // now add to the field set ComponentbuilderHelper::xmlAppend($form, $this->setField('plain', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); } + elseif ($r_typeName === 'subform') + { + // set nested depth + if (isset($fieldAttributes['nested_depth'])) + { + $r_fieldValues['nested_depth'] = ++$fieldAttributes['nested_depth']; + } + else + { + $r_fieldValues['nested_depth'] = 1; + } + // only continue if nest is bellow 20 (this should be a safe limit) + if ($r_fieldValues['nested_depth'] <= 20) + { + // now add to the field set + ComponentbuilderHelper::xmlAppend($form, $this->setField('special', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray)); + } + + } elseif (ComponentbuilderHelper::checkArray($r_fieldValues['custom'])) { // add to custom diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 53191cb53..9ec391f36 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -614,7 +614,7 @@ class Interpretation extends Fields } // give notice of this issue $this->app->enqueueMessage(JText::_('

WHMCS Error

'), 'Error'); - $this->app->enqueueMessage(JText::sprintf('The WHMCS class could not be added to this component. You will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes.', $this->libraries[$id]->name), 'Error'); + $this->app->enqueueMessage(JText::sprintf('The WHMCS class could not be added to this component. You will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes. If you have done this, then please check that you have your own Basic Encryption set in the global settings of JCB. Then open and save this component again, making sure that your WHMCS settings are still correct.', $this->libraries[$id]->name), 'Error'); return "//" . $this->setLine(__LINE__) . " The WHMCS class could not be added to this component." . PHP_EOL . "//" . $this->setLine(__LINE__) . " Please note that you will need to enable the add-on in the Joomla Component area (Add WHMCS)->Yes."; } @@ -5270,8 +5270,10 @@ class Interpretation extends Fields $routeHelper[] = $this->_t(2) . "else"; $routeHelper[] = $this->_t(2) . "{"; $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Initialize the needel array."; - $routeHelper[] = $this->_t(3) . "\$needles = array();"; - $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . "Create the link but don't add the id."; + $routeHelper[] = $this->_t(3) . "\$needles = array("; + $routeHelper[] = $this->_t(4) . "'" . $viewName_single . "' => array()"; + $routeHelper[] = $this->_t(3) . ");"; + $routeHelper[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Create the link but don't add the id."; $routeHelper[] = $this->_t(3) . "\$link = 'index.php?option=com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . "&view=" . $viewName_single . "';"; $routeHelper[] = $this->_t(2) . "}"; if ('category' != $viewName_single && 'categories' != $viewName_single) @@ -6358,7 +6360,13 @@ class Interpretation extends Fields $easy[$_mysqlTableKey] = $this->mysqlTableKeys[$_mysqlTableKey]['default']; } } - $db_ .= PHP_EOL . ") ENGINE=" . $easy['engine'] . " AUTO_INCREMENT=0 DEFAULT CHARSET=" . $easy['charset'] . " DEFAULT COLLATE=" . $easy['collate'] . ";"; + // add a little fix for the row_format + if (ComponentbuilderHelper::checkString($easy['row_format'])) + { + $easy['row_format'] = ' ROW_FORMAT=' . $easy['row_format']; + } + // now build db string + $db_ .= PHP_EOL . ") ENGINE=" . $easy['engine'] . " AUTO_INCREMENT=0 DEFAULT CHARSET=" . $easy['charset'] . " DEFAULT COLLATE=" . $easy['collate'] . $easy['row_format'] . ";"; // check if this is a new table that should be added via update SQL if (isset($this->addSQL['adminview']) && ComponentbuilderHelper::checkArray($this->addSQL['adminview']) && in_array($view, $this->addSQL['adminview'])) @@ -6366,6 +6374,12 @@ class Interpretation extends Fields // build the update array $this->updateSQLBuilder["CREATETABLEIFNOTEXISTS`#__" . $component . "_" . $view . "`"] = $db_; } + // check if the table row_format has changed + if (ComponentbuilderHelper::checkString($easy['row_format']) && isset($this->updateSQL['table_row_format']) && isset($this->updateSQL['table_row_format'][$view])) + { + // build the update array + $this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`" . trim($easy['row_format'])] = "ALTER TABLE `#__" . $component . "_" . $view . "`" . $easy['row_format'] . ";"; + } // check if the table engine has changed if (isset($this->updateSQL['table_engine']) && isset($this->updateSQL['table_engine'][$view])) { @@ -7110,7 +7124,7 @@ class Interpretation extends Fields $referal = ''; if (!$ref) { - $ref = '&ref=' . $viewName_list; + $ref = '&return=return_here; ?>'; } // in linked tab/view so must add ref to default else diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 06ada1302..7421ad656 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -1011,6 +1011,174 @@ abstract class ComponentbuilderHelper return '
'.JText::_('COM_COMPONENTBUILDER_NO_COMPONENT_DETAILS_FOUND_SO_IT_IS_NOT_SAFE_TO_CONTINUE').'
'; } + /** + * get the database table columns + **/ + public static function getDbTableColumns($tableName, $as, $type) + { + // Get a db connection. + $db = JFactory::getDbo(); + // get the columns + $columns = $db->getTableColumns("#__" . $tableName); + // set the type (multi or single) + $unique = ''; + if (1 == $type) + { + $unique = self::safeString($tableName) . '_'; + } + if (self::checkArray($columns)) + { + // build the return string + $tableColumns = array(); + foreach ($columns as $column => $typeCast) + { + $tableColumns[] = $as . "." . $column . ' AS ' . $unique . $column; + } + return implode("\n", $tableColumns); + } + return false; + } + + /** + * get the view table columns + **/ + public static function getViewTableColumns($admin_view, $as, $type) + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.addfields', 'b.name_single'))); + $query->from($db->quoteName('#__componentbuilder_admin_fields', 'a')); + $query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'b') . ' ON (' . $db->quoteName('a.admin_view') . ' = ' . $db->quoteName('b.id') . ')'); + $query->where($db->quoteName('b.published') . ' = 1'); + $query->where($db->quoteName('a.admin_view') . ' = ' . (int) $admin_view); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $result = $db->loadObject(); + $tableName = ''; + if (1 == $type) + { + $tableName = self::safeString($result->name_single) . '_'; + } + $addfields = json_decode($result->addfields, true); + if (self::checkArray($addfields)) + { + // reset all buckets + $field = array(); + $fields = array(); + // get data + foreach ($addfields as $nr => $value) + { + $tmp = self::getFieldNameAndType((int) $value['field']); + if (self::checkArray($tmp)) + { + $field[$nr] = $tmp; + } + // insure it is set to alias if needed + if (isset($value['alias']) && $value['alias'] == 1) + { + $field[$nr]['name'] = 'alias'; + } + // remove a field that is not being stored in the database + if (!isset($value['list']) || $value['list'] == 2) + { + unset($field[$nr]); + } + } + // add the basic defaults + $fields[] = $as . ".id AS " . $tableName . "id"; + $fields[] = $as . ".asset_id AS " . $tableName . "asset_id"; + // load data + foreach ($field as $n => $f) + { + if (self::checkArray($f)) + { + $fields[] = $as . "." . $f['name'] . " AS " . $tableName . $f['name']; + } + } + // add the basic defaults + $fields[] = $as . ".published AS " . $tableName . "published"; + $fields[] = $as . ".created_by AS " . $tableName . "created_by"; + $fields[] = $as . ".modified_by AS " . $tableName . "modified_by"; + $fields[] = $as . ".created AS " . $tableName . "created"; + $fields[] = $as . ".modified AS " . $tableName . "modified"; + $fields[] = $as . ".version AS " . $tableName . "version"; + $fields[] = $as . ".hits AS " . $tableName . "hits"; + if (0) // TODO access is not set here but per/view in the form linking this admin view to which these field belong to the components (boooo I know but that is the case and so we can't ever really know at this point if this view has access set) + { + $fields[] = $as . ".access AS " . $tableName . "access"; + } + $fields[] = $as . ".ordering AS " . $tableName . "ordering"; + // return the field of this view + return implode("\n", $fields); + } + } + return false; + } + + protected static function getFieldNameAndType($id) + { + // Get a db connection. + $db = JFactory::getDbo(); + + // Create a new query object. + $query = $db->getQuery(true); + + // Order it by the ordering field. + $query->select($db->quoteName(array('a.name', 'a.xml'))); + $query->select($db->quoteName(array('c.name'), array('type_name'))); + $query->from('#__componentbuilder_field AS a'); + $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'c') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('c.id') . ')'); + $query->where($db->quoteName('a.id') . ' = '. $db->quote($id)); + + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + // Load the results as a list of stdClass objects (see later for more options on retrieving data). + $field = $db->loadObject(); + // load the values form params + $field->xml = json_decode($field->xml); + $field->type_name = self::safeString($field->type_name); + $load = true; + // if category then name must be catid (only one per view) + if ($field->type_name == 'category') + { + $name = 'catid'; + } + // if tag is set then enable all tag options for this view (only one per view) + elseif ($field->type_name == 'tag') + { + $name = 'tags'; + } + // don't add spacers or notes + elseif ($field->type_name == 'spacer' || $field->type_name == 'note') + { + // make sure the name is unique + return false; + } + else + { + $name = self::safeString(self::getBetween($field->xml,'name="','"')); + } + + // use field core name only if not found in xml + if (!self::checkString($name)) + { + $name = self::safeString($field->name);; + } + return array('name' => $name, 'type' => $field->type_name); + } + return false; + } + /** * The array of dynamic content * @@ -1354,9 +1522,15 @@ abstract class ComponentbuilderHelper { $it = new RecursiveDirectoryIterator($dir); $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); + // remove ending / + $dir = rtrim($dir, '/'); + // now loop the files & folders foreach ($it as $file) { if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; + // set file dir + $file_dir = $file->getPathname(); + // check if this is a dir or a file if ($file->isDir()) { $keeper = false; @@ -1364,7 +1538,7 @@ abstract class ComponentbuilderHelper { foreach ($ignore as $keep) { - if (strpos($file->getPathname(), $dir.'/'.$keep) !== false) + if (strpos($file_dir, $dir.'/'.$keep) !== false) { $keeper = true; } @@ -1374,7 +1548,7 @@ abstract class ComponentbuilderHelper { continue; } - JFolder::delete($file->getPathname()); + JFolder::delete($file_dir); } else { @@ -1383,7 +1557,7 @@ abstract class ComponentbuilderHelper { foreach ($ignore as $keep) { - if (strpos($file->getPathname(), $dir.'/'.$keep) !== false) + if (strpos($file_dir, $dir.'/'.$keep) !== false) { $keeper = true; } @@ -1393,9 +1567,10 @@ abstract class ComponentbuilderHelper { continue; } - JFile::delete($file->getPathname()); + JFile::delete($file_dir); } } + // delete the root folder if not ignore found if (!self::checkArray($ignore)) { return JFolder::delete($dir); @@ -2356,11 +2531,12 @@ abstract class ComponentbuilderHelper * * @param string $data The base64 string * @param string $key We store the string with that suffix :) + * @param string $default The default switch * * @return string The opened string * */ - public static function openValidBase64($data, $key = '__.o0=base64=Oo.__') + public static function openValidBase64($data, $key = '__.o0=base64=Oo.__', $default = 'string') { // check that we have a string if (self::checkString($data)) @@ -2379,7 +2555,12 @@ abstract class ComponentbuilderHelper return base64_decode($data); } } - return $data; + // check if we should just return the string + if ('string' === $default) + { + return $data; + } + return $default; } @@ -3882,8 +4063,13 @@ abstract class ComponentbuilderHelper * @return string On success the edit url * */ - public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) + public static function getEditURL(&$item, $view, $views, $ref = '', $component = 'com_componentbuilder', $jRoute = true) { + // make sure the user has access to view + if (!JFactory::getUser()->authorise($view. '.access', $component)) + { + return false; + } // build record $record = new stdClass(); // check that we have the ID diff --git a/admin/helpers/componentbuilderemail.php b/admin/helpers/componentbuilderemail.php index 5d0a3d525..84ff67380 100644 --- a/admin/helpers/componentbuilderemail.php +++ b/admin/helpers/componentbuilderemail.php @@ -14,6 +14,13 @@ */ abstract class ComponentbuilderEmail { + /** + * The active recipient + * + * @var activeRecipient (array) + */ + public static $active = array(); + /** * Configuraiton object * @@ -49,6 +56,44 @@ abstract class ComponentbuilderEmail return self::$config; } + /** + * Returns the global mailer object, only creating it if it doesn't already exist. + * + */ + public static function getMailerInstance() + { + if (!self::$mailer) + { + self::$mailer = self::createMailer(); + } + + return self::$mailer; + } + + /** + * Check that a string looks like an email address. + * @param string $address The email address to check + * @param string|callable $patternselect A selector for the validation pattern to use : + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * @return boolean + * @static + * @access public + */ + public static function validateAddress($address, $patternselect = null) + { + return self::getMailerInstance()->validateAddress($address, $patternselect); + } + /** * Get a mailer object. * @@ -277,13 +322,70 @@ abstract class ComponentbuilderEmail if (method_exists('ComponentbuilderHelper','storeMessage')) { - // store the massage if the method is set - ComponentbuilderHelper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email'); + // if we have active recipient details + if (isset(self::$active[$recipient])) + { + // store the massage if the method is set + ComponentbuilderHelper::storeMessage($sendmail, self::$active[$recipient], $subject, $body, $textonly, $mode, 'email'); + // clear memory + unset(self::$active[$recipient]); + } + else + { + // store the massage if the method is set + ComponentbuilderHelper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email'); + } } return $sendmail; } + /** + * Set html text (in a row) and subject (as title) to a email table. + * do not use

instead use
+ * in your html that you pass to this method + * since it is a table row it does not + * work well with paragraphs + * + * @return string on success + * + */ + public static function setBasicBody($html, $subject) + { + $body = array(); + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = "" . $subject . ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = ""; + $body[] = $html; + $body[] = ""; + $body[] = ""; + + return implode("\n", $body); + } + /** * Set html text (in a row) and subject (as title) to a email table. * do not use

instead use
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index c469e0302..9dd6c7536 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -543,7 +543,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE="Alias Builder Type" COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION="How should the alias be build for this view" COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type" COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM" -COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="ARCHIVE" +COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_ARMSCIIEIGHT_ARMENIAN_MOST_SUITABLE_COLLATION_ARMSCIIEIGHT_GENERAL_CI="armscii8 - ARMSCII-8 Armenian (most suitable collation = armscii8_general_ci)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_BIN_CHARSET_ARMSCIIEIGHT="armscii8_bin (charset = armscii8)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_GENERAL_CI_CHARSET_ARMSCIIEIGHT="armscii8_general_ci (charset = armscii8)" @@ -610,7 +610,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_COG="Cog" COM_COMPONENTBUILDER_ADMIN_VIEW_COGS="Cogs" COM_COMPONENTBUILDER_ADMIN_VIEW_COMMENT="Comment" COM_COMPONENTBUILDER_ADMIN_VIEW_COMMENTS_TWO="Comments 2" +COM_COMPONENTBUILDER_ADMIN_VIEW_COMPACT="COMPACT" COM_COMPONENTBUILDER_ADMIN_VIEW_COMPASS="Compass" +COM_COMPONENTBUILDER_ADMIN_VIEW_COMPRESSED="COMPRESSED" COM_COMPONENTBUILDER_ADMIN_VIEW_CONTRACT="Contract" COM_COMPONENTBUILDER_ADMIN_VIEW_CONTRACT_TWO="Contract 2" COM_COMPONENTBUILDER_ADMIN_VIEW_CORECREATE="core.create" @@ -685,6 +687,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_ADMIN_VIEW_DETAILS="Details" COM_COMPONENTBUILDER_ADMIN_VIEW_DOWNLOAD="Download" COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP="Dump" +COM_COMPONENTBUILDER_ADMIN_VIEW_DYNAMIC="DYNAMIC" COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT="Editing the Admin View" COM_COMPONENTBUILDER_ADMIN_VIEW_ENTER="Enter" COM_COMPONENTBUILDER_ADMIN_VIEW_ENVELOPE="Envelope" @@ -890,6 +893,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_LABEL="mySql Table Collation COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE="Mysql Table Engine" COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_DESCRIPTION="Select the mySql Table Engine you would like to use for this admin view's table." COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_LABEL="mySql Table Engines" +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT="Mysql Table Row Format" +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_DESCRIPTION="The row format of a table determines how its rows are physically stored, which in turn can affect the performance of queries and DML operations." +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_LABEL="mySql Table Row Format" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION="Enter Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_HINT="Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LABEL="Name" @@ -1074,6 +1080,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_RADIO_UNCHECKED="Radio Unchecked" COM_COMPONENTBUILDER_ADMIN_VIEW_RAW="RAW" COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY="readonly" COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE="read/write" +COM_COMPONENTBUILDER_ADMIN_VIEW_REDUNDANT="REDUNDANT" COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE="Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_REPLY="Reply" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" @@ -3703,7 +3710,7 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_DESCRIPTION="

- + @@ -4066,6 +4073,9 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_SAVE_WARNING="Alias already existed so a number COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_DESCRIPTION="Fields to be selected from table." COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_HINT="b.field AS field" COM_COMPONENTBUILDER_DYNAMIC_GET_SELECTION_LABEL="Selection" +COM_COMPONENTBUILDER_DYNAMIC_GET_SELECT_ALL="Select All" +COM_COMPONENTBUILDER_DYNAMIC_GET_SELECT_ALL_DESCRIPTION="Should all the fields be selected, even those newly added at a later stage." +COM_COMPONENTBUILDER_DYNAMIC_GET_SELECT_ALL_LABEL="Select All" COM_COMPONENTBUILDER_DYNAMIC_GET_SINGLE="Single" COM_COMPONENTBUILDER_DYNAMIC_GET_SS="ss" COM_COMPONENTBUILDER_DYNAMIC_GET_STATE="State" @@ -4324,6 +4334,7 @@ COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL="Add JavaScript (vie COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR="base64" COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY="Basic Encryption (local-DB-key)" COM_COMPONENTBUILDER_FIELD_BIGINT="BIGINT" +COM_COMPONENTBUILDER_FIELD_BLOB="BLOB" COM_COMPONENTBUILDER_FIELD_BSB_NOT_FOUND_IN_LOCAL_DATABASE_TABLE_S_SO_IMPORTED_OF_ITS_VALUES_FAILED_PLEASE_UPDATE_YOUR_JCB_INSTALL_AND_TRY_AGAIN="Field %s not found in local database table (%s) so imported of its values failed, please update your JCB install and try again." COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION="select one of the following categories" COM_COMPONENTBUILDER_FIELD_CATID_LABEL="Category" @@ -4386,7 +4397,9 @@ COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION="Add JavaScript fo COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL="Javascript (edit view footer)" COM_COMPONENTBUILDER_FIELD_JSON="JSON" COM_COMPONENTBUILDER_FIELD_KEY="KEY" +COM_COMPONENTBUILDER_FIELD_LONGBLOB="LONGBLOB" COM_COMPONENTBUILDER_FIELD_LONGTEXT="LONGTEXT" +COM_COMPONENTBUILDER_FIELD_MEDIUMBLOB="MEDIUMBLOB" COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT="MEDIUMTEXT" COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY="Medium Encryption (local-file-key)" COM_COMPONENTBUILDER_FIELD_MODIFIED_BY_DESC="The last user that modified this Field." @@ -4526,6 +4539,7 @@ COM_COMPONENTBUILDER_FIELD_STORE_LABEL="Store Method" COM_COMPONENTBUILDER_FIELD_TEN="10" COM_COMPONENTBUILDER_FIELD_TEXT="TEXT" COM_COMPONENTBUILDER_FIELD_TIME="TIME" +COM_COMPONENTBUILDER_FIELD_TINYBLOB="TINYBLOB" COM_COMPONENTBUILDER_FIELD_TINYINT="TINYINT" COM_COMPONENTBUILDER_FIELD_TWO_HUNDRED_AND_FIFTY_FIVE="255" COM_COMPONENTBUILDER_FIELD_TWO_THOUSAND_AND_FORTY_EIGHT="2048" diff --git a/admin/layouts/admin_custom_tabs/publishing.php b/admin/layouts/admin_custom_tabs/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/admin_custom_tabs/publishing.php +++ b/admin/layouts/admin_custom_tabs/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_custom_tabs/publlshing.php b/admin/layouts/admin_custom_tabs/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/admin_custom_tabs/publlshing.php +++ b/admin/layouts/admin_custom_tabs/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_custom_tabs/tabs_above.php b/admin/layouts/admin_custom_tabs/tabs_above.php index fbbf44543..f4e6c0504 100644 --- a/admin/layouts/admin_custom_tabs/tabs_above.php +++ b/admin/layouts/admin_custom_tabs/tabs_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'admin_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_custom_tabs/tabs_fullwidth.php b/admin/layouts/admin_custom_tabs/tabs_fullwidth.php index 46a16983d..4f3464386 100644 --- a/admin/layouts/admin_custom_tabs/tabs_fullwidth.php +++ b/admin/layouts/admin_custom_tabs/tabs_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'tabs' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields/fields_above.php b/admin/layouts/admin_fields/fields_above.php index fbbf44543..f4e6c0504 100644 --- a/admin/layouts/admin_fields/fields_above.php +++ b/admin/layouts/admin_fields/fields_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'admin_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields/fields_fullwidth.php b/admin/layouts/admin_fields/fields_fullwidth.php index 64d278138..398fdcb99 100644 --- a/admin/layouts/admin_fields/fields_fullwidth.php +++ b/admin/layouts/admin_fields/fields_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addfields' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields/publishing.php b/admin/layouts/admin_fields/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/admin_fields/publishing.php +++ b/admin/layouts/admin_fields/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields/publlshing.php b/admin/layouts/admin_fields/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/admin_fields/publlshing.php +++ b/admin/layouts/admin_fields/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_conditions/conditions_above.php b/admin/layouts/admin_fields_conditions/conditions_above.php index fbbf44543..f4e6c0504 100644 --- a/admin/layouts/admin_fields_conditions/conditions_above.php +++ b/admin/layouts/admin_fields_conditions/conditions_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'admin_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php index 03724354a..1fdde5ad1 100644 --- a/admin/layouts/admin_fields_conditions/conditions_fullwidth.php +++ b/admin/layouts/admin_fields_conditions/conditions_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addconditions' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields_conditions/publishing.php b/admin/layouts/admin_fields_conditions/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/admin_fields_conditions/publishing.php +++ b/admin/layouts/admin_fields_conditions/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_conditions/publlshing.php b/admin/layouts/admin_fields_conditions/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/admin_fields_conditions/publlshing.php +++ b/admin/layouts/admin_fields_conditions/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/publishing.php b/admin/layouts/admin_fields_relations/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/admin_fields_relations/publishing.php +++ b/admin/layouts/admin_fields_relations/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/publlshing.php b/admin/layouts/admin_fields_relations/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/admin_fields_relations/publlshing.php +++ b/admin/layouts/admin_fields_relations/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_fields_relations/relations_above.php b/admin/layouts/admin_fields_relations/relations_above.php index fbbf44543..f4e6c0504 100644 --- a/admin/layouts/admin_fields_relations/relations_above.php +++ b/admin/layouts/admin_fields_relations/relations_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'admin_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_fields_relations/relations_fullwidth.php b/admin/layouts/admin_fields_relations/relations_fullwidth.php index 9f094fcf9..5a288a738 100644 --- a/admin/layouts/admin_fields_relations/relations_fullwidth.php +++ b/admin/layouts/admin_fields_relations/relations_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addrelations' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index aef643a25..ddea836f1 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'css_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index 48d680c7c..19e0e1848 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'php_model_list' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index 9a5328805..a14229d57 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index d8b9b6901..51084a105 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -27,16 +27,14 @@ $fields = $displayData->get('fields') ?: array( 'php_import_ext' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/details_above.php b/admin/layouts/admin_view/details_above.php index 674a8e6b1..eb96431d9 100644 --- a/admin/layouts/admin_view/details_above.php +++ b/admin/layouts/admin_view/details_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'system_name' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/details_fullwidth.php b/admin/layouts/admin_view/details_fullwidth.php index ee8b7fe33..7cb5eea6e 100644 --- a/admin/layouts/admin_view/details_fullwidth.php +++ b/admin/layouts/admin_view/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_linked_to_notice' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/details_left.php b/admin/layouts/admin_view/details_left.php index 2abf54dec..60410677c 100644 --- a/admin/layouts/admin_view/details_left.php +++ b/admin/layouts/admin_view/details_left.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/details_right.php b/admin/layouts/admin_view/details_right.php index 39b65203e..60d320236 100644 --- a/admin/layouts/admin_view/details_right.php +++ b/admin/layouts/admin_view/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/details_under.php b/admin/layouts/admin_view/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/admin_view/details_under.php +++ b/admin/layouts/admin_view/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_view/fields_fullwidth.php index 8893a80cc..a98603dae 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_view/fields_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_create_edit_display' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/fields_left.php b/admin/layouts/admin_view/fields_left.php index 757364bc1..2750eebab 100644 --- a/admin/layouts/admin_view/fields_left.php +++ b/admin/layouts/admin_view/fields_left.php @@ -24,20 +24,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/fields_right.php b/admin/layouts/admin_view/fields_right.php index 401ead4c5..719857277 100644 --- a/admin/layouts/admin_view/fields_right.php +++ b/admin/layouts/admin_view/fields_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index e0d523c02..2a9156ae6 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -25,16 +25,14 @@ $fields = $displayData->get('fields') ?: array( 'javascript_views_footer' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index 58abb1b85..d7279881e 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'sql' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index b722cef9a..1605a8cf4 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -18,6 +18,7 @@ $fields = $displayData->get('fields') ?: array( 'mysql_table_engine', 'mysql_table_charset', 'mysql_table_collate', + 'mysql_table_row_format', 'add_sql', 'source', 'addtables' @@ -25,20 +26,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index 8e7e3809c..76b9368ed 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -54,16 +54,14 @@ $fields = $displayData->get('fields') ?: array( 'php_document' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/admin_view/settings_fullwidth.php b/admin/layouts/admin_view/settings_fullwidth.php index 72bafba04..4c648f119 100644 --- a/admin/layouts/admin_view/settings_fullwidth.php +++ b/admin/layouts/admin_view/settings_fullwidth.php @@ -24,16 +24,14 @@ $fields = $displayData->get('fields') ?: array( 'addlinked_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_admin_views/publishing.php b/admin/layouts/component_admin_views/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_admin_views/publishing.php +++ b/admin/layouts/component_admin_views/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_admin_views/publlshing.php b/admin/layouts/component_admin_views/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_admin_views/publlshing.php +++ b/admin/layouts/component_admin_views/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_admin_views/views_above.php b/admin/layouts/component_admin_views/views_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_admin_views/views_above.php +++ b/admin/layouts/component_admin_views/views_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_admin_views/views_fullwidth.php b/admin/layouts/component_admin_views/views_fullwidth.php index 2c06f8581..646539b0a 100644 --- a/admin/layouts/component_admin_views/views_fullwidth.php +++ b/admin/layouts/component_admin_views/views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addadmin_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_config/publishing.php b/admin/layouts/component_config/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_config/publishing.php +++ b/admin/layouts/component_config/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_config/publlshing.php b/admin/layouts/component_config/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_config/publlshing.php +++ b/admin/layouts/component_config/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_config/tweaks_above.php b/admin/layouts/component_config/tweaks_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_config/tweaks_above.php +++ b/admin/layouts/component_config/tweaks_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_config/tweaks_fullwidth.php b/admin/layouts/component_config/tweaks_fullwidth.php index b96b69b35..c720f0f06 100644 --- a/admin/layouts/component_config/tweaks_fullwidth.php +++ b/admin/layouts/component_config/tweaks_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'addconfig' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_custom_admin_menus/publishing.php b/admin/layouts/component_custom_admin_menus/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_custom_admin_menus/publishing.php +++ b/admin/layouts/component_custom_admin_menus/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_menus/publlshing.php b/admin/layouts/component_custom_admin_menus/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_custom_admin_menus/publlshing.php +++ b/admin/layouts/component_custom_admin_menus/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_menus/tweaks_above.php b/admin/layouts/component_custom_admin_menus/tweaks_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_custom_admin_menus/tweaks_above.php +++ b/admin/layouts/component_custom_admin_menus/tweaks_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php index 1d53e2f5a..8bf1f4890 100644 --- a/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php +++ b/admin/layouts/component_custom_admin_menus/tweaks_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'addcustommenus' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_custom_admin_views/publishing.php b/admin/layouts/component_custom_admin_views/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_custom_admin_views/publishing.php +++ b/admin/layouts/component_custom_admin_views/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_views/publlshing.php b/admin/layouts/component_custom_admin_views/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_custom_admin_views/publlshing.php +++ b/admin/layouts/component_custom_admin_views/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_custom_admin_views/views_above.php b/admin/layouts/component_custom_admin_views/views_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_custom_admin_views/views_above.php +++ b/admin/layouts/component_custom_admin_views/views_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_custom_admin_views/views_fullwidth.php b/admin/layouts/component_custom_admin_views/views_fullwidth.php index 7b910ce6e..dbd05bfc1 100644 --- a/admin/layouts/component_custom_admin_views/views_fullwidth.php +++ b/admin/layouts/component_custom_admin_views/views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addcustom_admin_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_dashboard/dashboard_above.php b/admin/layouts/component_dashboard/dashboard_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_dashboard/dashboard_above.php +++ b/admin/layouts/component_dashboard/dashboard_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php index 1d7224665..873b0a3fb 100644 --- a/admin/layouts/component_dashboard/dashboard_fullwidth.php +++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'dashboard_tab' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_dashboard/publishing.php b/admin/layouts/component_dashboard/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_dashboard/publishing.php +++ b/admin/layouts/component_dashboard/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_dashboard/publlshing.php b/admin/layouts/component_dashboard/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_dashboard/publlshing.php +++ b/admin/layouts/component_dashboard/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_files_folders/advance_fullwidth.php b/admin/layouts/component_files_folders/advance_fullwidth.php index 508d9d18e..b733a13ed 100644 --- a/admin/layouts/component_files_folders/advance_fullwidth.php +++ b/admin/layouts/component_files_folders/advance_fullwidth.php @@ -22,16 +22,14 @@ $fields = $displayData->get('fields') ?: array( 'note_constant_paths' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_files_folders/basic_above.php b/admin/layouts/component_files_folders/basic_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_files_folders/basic_above.php +++ b/admin/layouts/component_files_folders/basic_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_files_folders/basic_fullwidth.php b/admin/layouts/component_files_folders/basic_fullwidth.php index d524507b0..5731546b2 100644 --- a/admin/layouts/component_files_folders/basic_fullwidth.php +++ b/admin/layouts/component_files_folders/basic_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'addfolders' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_files_folders/publishing.php b/admin/layouts/component_files_folders/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_files_folders/publishing.php +++ b/admin/layouts/component_files_folders/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_files_folders/publlshing.php b/admin/layouts/component_files_folders/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_files_folders/publlshing.php +++ b/admin/layouts/component_files_folders/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/publishing.php b/admin/layouts/component_mysql_tweaks/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_mysql_tweaks/publishing.php +++ b/admin/layouts/component_mysql_tweaks/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/publlshing.php b/admin/layouts/component_mysql_tweaks/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_mysql_tweaks/publlshing.php +++ b/admin/layouts/component_mysql_tweaks/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_mysql_tweaks/tweaks_above.php b/admin/layouts/component_mysql_tweaks/tweaks_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_mysql_tweaks/tweaks_above.php +++ b/admin/layouts/component_mysql_tweaks/tweaks_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php index 9a0050b0f..3415c2a85 100644 --- a/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php +++ b/admin/layouts/component_mysql_tweaks/tweaks_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'sql_tweak' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_site_views/publishing.php b/admin/layouts/component_site_views/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_site_views/publishing.php +++ b/admin/layouts/component_site_views/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_site_views/publlshing.php b/admin/layouts/component_site_views/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_site_views/publlshing.php +++ b/admin/layouts/component_site_views/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_site_views/views_above.php b/admin/layouts/component_site_views/views_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_site_views/views_above.php +++ b/admin/layouts/component_site_views/views_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_site_views/views_fullwidth.php b/admin/layouts/component_site_views/views_fullwidth.php index 247778c61..101920332 100644 --- a/admin/layouts/component_site_views/views_fullwidth.php +++ b/admin/layouts/component_site_views/views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'addsite_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_updates/publishing.php b/admin/layouts/component_updates/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/component_updates/publishing.php +++ b/admin/layouts/component_updates/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_updates/publlshing.php b/admin/layouts/component_updates/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/component_updates/publlshing.php +++ b/admin/layouts/component_updates/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/component_updates/updates_above.php b/admin/layouts/component_updates/updates_above.php index 26f5796f7..da98e936b 100644 --- a/admin/layouts/component_updates/updates_above.php +++ b/admin/layouts/component_updates/updates_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'joomla_component' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/component_updates/updates_fullwidth.php b/admin/layouts/component_updates/updates_fullwidth.php index 15019846a..b43fed4e7 100644 --- a/admin/layouts/component_updates/updates_fullwidth.php +++ b/admin/layouts/component_updates/updates_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'version_update' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index e3a7e886c..d6692df65 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'php_model' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index 9a5328805..a14229d57 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index 88bd987fd..b64cb67fa 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -14,14 +14,19 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'system_name', 'context' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index 55f1ff1c4..0fbb88446 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'default' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index 75286200a..7a15392cc 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index e29f4d14c..d66913fd4 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index cc9dc978c..667153d7d 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/javascript_css_fullwidth.php b/admin/layouts/custom_admin_view/javascript_css_fullwidth.php index 233501624..ce72b5015 100644 --- a/admin/layouts/custom_admin_view/javascript_css_fullwidth.php +++ b/admin/layouts/custom_admin_view/javascript_css_fullwidth.php @@ -25,16 +25,14 @@ $fields = $displayData->get('fields') ?: array( 'css' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index ee8b7fe33..7cb5eea6e 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_linked_to_notice' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/php_fullwidth.php b/admin/layouts/custom_admin_view/php_fullwidth.php index db7cb458f..a062c3b58 100644 --- a/admin/layouts/custom_admin_view/php_fullwidth.php +++ b/admin/layouts/custom_admin_view/php_fullwidth.php @@ -28,16 +28,14 @@ $fields = $displayData->get('fields') ?: array( 'php_jview' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index cb7fb804b..ec8faf761 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -14,15 +14,20 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'target', 'system_name', 'function_name' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index d9410fa2f..11ec40027 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'note_placeholders_explained' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index 940d16c3c..309a70068 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index cd2ef804a..8569adfe5 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index 68e3a7628..22f79a5d2 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -20,16 +20,14 @@ $fields = $displayData->get('fields') ?: array( 'php_calculation' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index cdcb433f1..4fac83779 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index 57838a88f..a0469d57a 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -29,16 +29,14 @@ $fields = $displayData->get('fields') ?: array( 'php_router_parse' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/joint_fullwidth.php b/admin/layouts/dynamic_get/joint_fullwidth.php index cc4ebb4e3..b781d3256 100644 --- a/admin/layouts/dynamic_get/joint_fullwidth.php +++ b/admin/layouts/dynamic_get/joint_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'join_db_table' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/main_above.php b/admin/layouts/dynamic_get/main_above.php index 35b1d7edd..b7c852bd6 100644 --- a/admin/layouts/dynamic_get/main_above.php +++ b/admin/layouts/dynamic_get/main_above.php @@ -14,16 +14,21 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'name', 'gettype', 'getcustom', 'pagination' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/main_fullwidth.php b/admin/layouts/dynamic_get/main_fullwidth.php index fa8ab8b6e..3d438ec7c 100644 --- a/admin/layouts/dynamic_get/main_fullwidth.php +++ b/admin/layouts/dynamic_get/main_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_linked_to_notice' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/main_left.php b/admin/layouts/dynamic_get/main_left.php index 026b9783d..202899d72 100644 --- a/admin/layouts/dynamic_get/main_left.php +++ b/admin/layouts/dynamic_get/main_left.php @@ -17,27 +17,18 @@ $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( 'main_source', 'view_table_main', - 'view_selection', 'db_table_main', + 'select_all', + 'view_selection', 'db_selection' ); $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/main_right.php b/admin/layouts/dynamic_get/main_right.php index 8097ca878..1d699661a 100644 --- a/admin/layouts/dynamic_get/main_right.php +++ b/admin/layouts/dynamic_get/main_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/main_under.php b/admin/layouts/dynamic_get/main_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/dynamic_get/main_under.php +++ b/admin/layouts/dynamic_get/main_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/dynamic_get/tweak_fullwidth.php b/admin/layouts/dynamic_get/tweak_fullwidth.php index 80d0f83e3..944766b7f 100644 --- a/admin/layouts/dynamic_get/tweak_fullwidth.php +++ b/admin/layouts/dynamic_get/tweak_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'global' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/field/data_base_fullwidth.php b/admin/layouts/field/data_base_fullwidth.php index fabb39688..0c24cf707 100644 --- a/admin/layouts/field/data_base_fullwidth.php +++ b/admin/layouts/field/data_base_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_database_settings_needed' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/field/data_base_left.php b/admin/layouts/field/data_base_left.php index d821e271b..f1ccdee4f 100644 --- a/admin/layouts/field/data_base_left.php +++ b/admin/layouts/field/data_base_left.php @@ -24,20 +24,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/data_base_right.php b/admin/layouts/field/data_base_right.php index b29f88135..d1ca97f96 100644 --- a/admin/layouts/field/data_base_right.php +++ b/admin/layouts/field/data_base_right.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 67b2df4ca..b5e14a2d4 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index 3cac69d34..24109e987 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/field/set_properties_above.php b/admin/layouts/field/set_properties_above.php index d47e6ef1a..734321a78 100644 --- a/admin/layouts/field/set_properties_above.php +++ b/admin/layouts/field/set_properties_above.php @@ -14,15 +14,20 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'fieldtype', 'name', 'catid' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/field/set_properties_fullwidth.php b/admin/layouts/field/set_properties_fullwidth.php index 20d53ee3b..4ebbe9f82 100644 --- a/admin/layouts/field/set_properties_fullwidth.php +++ b/admin/layouts/field/set_properties_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_filter_information' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/field/set_properties_under.php b/admin/layouts/field/set_properties_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/field/set_properties_under.php +++ b/admin/layouts/field/set_properties_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/field/type_info_fullwidth.php b/admin/layouts/field/type_info_fullwidth.php index 42b12952d..bf3fd84f3 100644 --- a/admin/layouts/field/type_info_fullwidth.php +++ b/admin/layouts/field/type_info_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'xml' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/fieldtype/details_fullwidth.php b/admin/layouts/fieldtype/details_fullwidth.php index ab4fd24d8..c1f685b26 100644 --- a/admin/layouts/fieldtype/details_fullwidth.php +++ b/admin/layouts/fieldtype/details_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'properties' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index 386913f1e..5c03c6482 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index bd11565e9..1e6fb9b42 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index c44b44228..397945bbb 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -14,14 +14,19 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'title', 'alias' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index e5b983f28..197943db4 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'content' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index 284564afd..2d067d828 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -24,20 +24,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index 8b7e8c982..16527245b 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index bc955789b..7ace2adea 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -25,20 +24,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index e6216c2d6..4aa1f7de4 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_display_component_admin_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index a5a777d76..b6d1a4892 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_display_component_custom_admin_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/dash_install_fullwidth.php b/admin/layouts/joomla_component/dash_install_fullwidth.php index 7e514a2ed..ef32af153 100644 --- a/admin/layouts/joomla_component/dash_install_fullwidth.php +++ b/admin/layouts/joomla_component/dash_install_fullwidth.php @@ -27,16 +27,14 @@ $fields = $displayData->get('fields') ?: array( 'php_method_uninstall' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/dash_install_left.php b/admin/layouts/joomla_component/dash_install_left.php index f0f2f3148..4c66077bf 100644 --- a/admin/layouts/joomla_component/dash_install_left.php +++ b/admin/layouts/joomla_component/dash_install_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/dash_install_right.php b/admin/layouts/joomla_component/dash_install_right.php index 4e48f6b4f..d636f1563 100644 --- a/admin/layouts/joomla_component/dash_install_right.php +++ b/admin/layouts/joomla_component/dash_install_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index 674a8e6b1..eb96431d9 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'system_name' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index 2ee9e3a41..56e1ce11d 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -31,20 +31,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index e4e43b97a..5ad3752c3 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -32,20 +32,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index 6f9975d02..be6383280 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -20,16 +20,14 @@ $fields = $displayData->get('fields') ?: array( 'buildcompsql' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index ed3387a62..d50b32c5a 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -26,16 +26,14 @@ $fields = $displayData->get('fields') ?: array( 'sales_server' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index 97b021e4d..0d876918f 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -37,16 +37,14 @@ $fields = $displayData->get('fields') ?: array( 'css_site' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index a8a1c14cc..791a25bad 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'sql_uninstall' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index b8c696d4f..f07fa6b86 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -30,20 +29,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index 8f4d41cc2..efbaab416 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index 79f2e0380..40f598d14 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/settings_fullwidth.php b/admin/layouts/joomla_component/settings_fullwidth.php index d59d370b2..5bc2363c4 100644 --- a/admin/layouts/joomla_component/settings_fullwidth.php +++ b/admin/layouts/joomla_component/settings_fullwidth.php @@ -22,16 +22,14 @@ $fields = $displayData->get('fields') ?: array( 'number' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index bb64d3daf..c3da81156 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -26,20 +26,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index 4d8a26427..5be8ad699 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -31,20 +31,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index d569e5a02..1bfcac013 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'note_display_component_site_views' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/language/details_left.php b/admin/layouts/language/details_left.php index f90d6b9da..c3075b6a1 100644 --- a/admin/layouts/language/details_left.php +++ b/admin/layouts/language/details_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/details_right.php b/admin/layouts/language/details_right.php index fa4f5c8fe..ebc53d70a 100644 --- a/admin/layouts/language/details_right.php +++ b/admin/layouts/language/details_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/publishing.php b/admin/layouts/language/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/language/publishing.php +++ b/admin/layouts/language/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language/publlshing.php b/admin/layouts/language/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/language/publlshing.php +++ b/admin/layouts/language/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language_translation/details_fullwidth.php b/admin/layouts/language_translation/details_fullwidth.php index 993163fbe..e324a8df9 100644 --- a/admin/layouts/language_translation/details_fullwidth.php +++ b/admin/layouts/language_translation/details_fullwidth.php @@ -20,16 +20,14 @@ $fields = $displayData->get('fields') ?: array( 'components' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/language_translation/publishing.php b/admin/layouts/language_translation/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/language_translation/publishing.php +++ b/admin/layouts/language_translation/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/language_translation/publlshing.php b/admin/layouts/language_translation/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/language_translation/publlshing.php +++ b/admin/layouts/language_translation/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index 7bb271168..abedc3f47 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'php_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index b5989a2c4..eb9784f06 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'layout' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index dd143b604..fe0bc542a 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index 301a0209b..e6bc68299 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index 64ff0e623..a0d9ff85f 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_above.php b/admin/layouts/library/behaviour_above.php index 1f39a9321..671176d1c 100644 --- a/admin/layouts/library/behaviour_above.php +++ b/admin/layouts/library/behaviour_above.php @@ -14,15 +14,20 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'name', 'how', 'type' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/behaviour_fullwidth.php b/admin/layouts/library/behaviour_fullwidth.php index 96d884a59..63793ddb6 100644 --- a/admin/layouts/library/behaviour_fullwidth.php +++ b/admin/layouts/library/behaviour_fullwidth.php @@ -22,16 +22,14 @@ $fields = $displayData->get('fields') ?: array( 'php_setdocument' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/behaviour_left.php b/admin/layouts/library/behaviour_left.php index b0b86b8ea..b7c0ef362 100644 --- a/admin/layouts/library/behaviour_left.php +++ b/admin/layouts/library/behaviour_left.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_right.php b/admin/layouts/library/behaviour_right.php index bd11565e9..1e6fb9b42 100644 --- a/admin/layouts/library/behaviour_right.php +++ b/admin/layouts/library/behaviour_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/behaviour_under.php b/admin/layouts/library/behaviour_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/library/behaviour_under.php +++ b/admin/layouts/library/behaviour_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/config_fullwidth.php b/admin/layouts/library/config_fullwidth.php index 8c1d19e54..33603c07c 100644 --- a/admin/layouts/library/config_fullwidth.php +++ b/admin/layouts/library/config_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'note_display_library_config' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/files_folders_urls_fullwidth.php b/admin/layouts/library/files_folders_urls_fullwidth.php index d099019e5..bd05bea89 100644 --- a/admin/layouts/library/files_folders_urls_fullwidth.php +++ b/admin/layouts/library/files_folders_urls_fullwidth.php @@ -20,16 +20,14 @@ $fields = $displayData->get('fields') ?: array( 'note_display_library_files_folders_urls' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/linked_fullwidth.php b/admin/layouts/library/linked_fullwidth.php index ee8b7fe33..7cb5eea6e 100644 --- a/admin/layouts/library/linked_fullwidth.php +++ b/admin/layouts/library/linked_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_linked_to_notice' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library/publishing.php b/admin/layouts/library/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/library/publishing.php +++ b/admin/layouts/library/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library/publlshing.php b/admin/layouts/library/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/library/publlshing.php +++ b/admin/layouts/library/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/publishing.php b/admin/layouts/library_config/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/library_config/publishing.php +++ b/admin/layouts/library_config/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/publlshing.php b/admin/layouts/library_config/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/library_config/publlshing.php +++ b/admin/layouts/library_config/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_config/tweaks_above.php b/admin/layouts/library_config/tweaks_above.php index 97769dcda..30268b84c 100644 --- a/admin/layouts/library_config/tweaks_above.php +++ b/admin/layouts/library_config/tweaks_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'library' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library_config/tweaks_fullwidth.php b/admin/layouts/library_config/tweaks_fullwidth.php index b96b69b35..c720f0f06 100644 --- a/admin/layouts/library_config/tweaks_fullwidth.php +++ b/admin/layouts/library_config/tweaks_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'addconfig' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library_files_folders_urls/advance_fullwidth.php b/admin/layouts/library_files_folders_urls/advance_fullwidth.php index 508d9d18e..b733a13ed 100644 --- a/admin/layouts/library_files_folders_urls/advance_fullwidth.php +++ b/admin/layouts/library_files_folders_urls/advance_fullwidth.php @@ -22,16 +22,14 @@ $fields = $displayData->get('fields') ?: array( 'note_constant_paths' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library_files_folders_urls/basic_above.php b/admin/layouts/library_files_folders_urls/basic_above.php index 97769dcda..30268b84c 100644 --- a/admin/layouts/library_files_folders_urls/basic_above.php +++ b/admin/layouts/library_files_folders_urls/basic_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'library' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library_files_folders_urls/basic_fullwidth.php b/admin/layouts/library_files_folders_urls/basic_fullwidth.php index a7c7b4d22..091403bb0 100644 --- a/admin/layouts/library_files_folders_urls/basic_fullwidth.php +++ b/admin/layouts/library_files_folders_urls/basic_fullwidth.php @@ -23,16 +23,14 @@ $fields = $displayData->get('fields') ?: array( 'addfolders' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/library_files_folders_urls/publishing.php b/admin/layouts/library_files_folders_urls/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/library_files_folders_urls/publishing.php +++ b/admin/layouts/library_files_folders_urls/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/library_files_folders_urls/publlshing.php b/admin/layouts/library_files_folders_urls/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/library_files_folders_urls/publlshing.php +++ b/admin/layouts/library_files_folders_urls/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/details_above.php b/admin/layouts/server/details_above.php index f927a57d3..6f1d4a330 100644 --- a/admin/layouts/server/details_above.php +++ b/admin/layouts/server/details_above.php @@ -14,14 +14,19 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'name', 'protocol' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/server/details_fullwidth.php b/admin/layouts/server/details_fullwidth.php index 74d9fa836..ff9a60a6f 100644 --- a/admin/layouts/server/details_fullwidth.php +++ b/admin/layouts/server/details_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/server/details_left.php b/admin/layouts/server/details_left.php index bb1471132..eb4658fb1 100644 --- a/admin/layouts/server/details_left.php +++ b/admin/layouts/server/details_left.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/details_right.php b/admin/layouts/server/details_right.php index 4cb738fa0..274359cdf 100644 --- a/admin/layouts/server/details_right.php +++ b/admin/layouts/server/details_right.php @@ -24,20 +24,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/publishing.php b/admin/layouts/server/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/server/publishing.php +++ b/admin/layouts/server/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/server/publlshing.php b/admin/layouts/server/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/server/publlshing.php +++ b/admin/layouts/server/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 0ef4a67c5..804056d55 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -21,16 +21,14 @@ $fields = $displayData->get('fields') ?: array( 'php_model' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 0cfdbe506..6ea4e74d3 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index df0beb10d..2979606e8 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index 88bd987fd..b64cb67fa 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -14,14 +14,19 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'system_name', 'context' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index 55f1ff1c4..0fbb88446 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'default' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index 75286200a..7a15392cc 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index 301a0209b..e6bc68299 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index cc9dc978c..667153d7d 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index fc241753c..037b2c6e1 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -25,16 +25,14 @@ $fields = $displayData->get('fields') ?: array( 'css' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index ee8b7fe33..7cb5eea6e 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_linked_to_notice' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index db7cb458f..a062c3b58 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -28,16 +28,14 @@ $fields = $displayData->get('fields') ?: array( 'php_jview' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/contributor_fullwidth.php b/admin/layouts/snippet/contributor_fullwidth.php index 330caa947..190ffd8dc 100644 --- a/admin/layouts/snippet/contributor_fullwidth.php +++ b/admin/layouts/snippet/contributor_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'note_contributor_details' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/snippet/contributor_left.php b/admin/layouts/snippet/contributor_left.php index e41f909a2..44dd48c4f 100644 --- a/admin/layouts/snippet/contributor_left.php +++ b/admin/layouts/snippet/contributor_left.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/contributor_right.php b/admin/layouts/snippet/contributor_right.php index 938f8543d..85580f251 100644 --- a/admin/layouts/snippet/contributor_right.php +++ b/admin/layouts/snippet/contributor_right.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 0d684da90..dc5515637 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -14,15 +14,20 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'name', 'url', 'library' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index 2c23d70a5..80e8ef04c 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -23,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index 7cecba8b4..fe2fc40d5 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/details_left.php b/admin/layouts/snippet_type/details_left.php index f90d6b9da..c3075b6a1 100644 --- a/admin/layouts/snippet_type/details_left.php +++ b/admin/layouts/snippet_type/details_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/details_right.php b/admin/layouts/snippet_type/details_right.php index bd11565e9..1e6fb9b42 100644 --- a/admin/layouts/snippet_type/details_right.php +++ b/admin/layouts/snippet_type/details_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/publishing.php b/admin/layouts/snippet_type/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/snippet_type/publishing.php +++ b/admin/layouts/snippet_type/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/snippet_type/publlshing.php b/admin/layouts/snippet_type/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/snippet_type/publlshing.php +++ b/admin/layouts/snippet_type/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index 7bb271168..abedc3f47 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -19,16 +19,14 @@ $fields = $displayData->get('fields') ?: array( 'php_view' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index f052853aa..24f1b1364 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'template' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index dd143b604..fe0bc542a 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -25,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index 5361d08aa..7084ac1ec 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -22,20 +22,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index 64ff0e623..a0d9ff85f 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -21,20 +21,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index 676b68504..b48f37386 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'not_required' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/extends_formrule_above.php b/admin/layouts/validation_rule/extends_formrule_above.php index 8f1aab922..8cdde7da3 100644 --- a/admin/layouts/validation_rule/extends_formrule_above.php +++ b/admin/layouts/validation_rule/extends_formrule_above.php @@ -14,13 +14,18 @@ defined('_JEXEC') or die('Restricted access'); $form = $displayData->getForm(); -$fields = array( +$fields = $displayData->get('fields') ?: array( 'inherit' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- renderField($field); - } ?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/validation_rule/extends_formrule_fullwidth.php b/admin/layouts/validation_rule/extends_formrule_fullwidth.php index db432ae1c..333fd73a7 100644 --- a/admin/layouts/validation_rule/extends_formrule_fullwidth.php +++ b/admin/layouts/validation_rule/extends_formrule_fullwidth.php @@ -18,16 +18,14 @@ $fields = $displayData->get('fields') ?: array( 'php' ); +$hiddenFields = $displayData->get('hidden_fields') ?: array(); + ?>
- -
-
- getLabel($field); ?> -
-
- getInput($field); ?> -
-
- + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> +
diff --git a/admin/layouts/validation_rule/extends_formrule_left.php b/admin/layouts/validation_rule/extends_formrule_left.php index f90d6b9da..c3075b6a1 100644 --- a/admin/layouts/validation_rule/extends_formrule_left.php +++ b/admin/layouts/validation_rule/extends_formrule_left.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/extends_formrule_right.php b/admin/layouts/validation_rule/extends_formrule_right.php index 081de8882..226a7f8c8 100644 --- a/admin/layouts/validation_rule/extends_formrule_right.php +++ b/admin/layouts/validation_rule/extends_formrule_right.php @@ -20,20 +20,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/publishing.php b/admin/layouts/validation_rule/publishing.php index ea58156d1..3ff2d0f98 100644 --- a/admin/layouts/validation_rule/publishing.php +++ b/admin/layouts/validation_rule/publishing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -24,20 +23,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/layouts/validation_rule/publlshing.php b/admin/layouts/validation_rule/publlshing.php index 7dfa73168..db19414f3 100644 --- a/admin/layouts/validation_rule/publlshing.php +++ b/admin/layouts/validation_rule/publlshing.php @@ -12,7 +12,6 @@ // No direct access to this file defined('_JEXEC') or die('Restricted access'); -$app = JFactory::getApplication(); $form = $displayData->getForm(); $fields = $displayData->get('fields') ?: array( @@ -26,20 +25,10 @@ $fields = $displayData->get('fields') ?: array( $hiddenFields = $displayData->get('hidden_fields') ?: array(); -foreach ($fields as $field) -{ - $field = is_array($field) ? $field : array($field); - foreach ($field as $f) - { - if ($form->getField($f)) - { - if (in_array($f, $hiddenFields)) - { - $form->setFieldAttribute($f, 'type', 'hidden'); - } - - echo $form->renderField($f); - break; - } - } -} +?> + + + setFieldAttribute($field, 'type', 'hidden'); ?> + + renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> + diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index ec753ce76..23d4f3099 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -86,58 +86,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_batchcopy)) + if (!empty($item->php_import_headers)) { - // base64 Decode php_batchcopy. - $item->php_batchcopy = base64_decode($item->php_batchcopy); - } - - if (!empty($item->php_allowadd)) - { - // base64 Decode php_allowadd. - $item->php_allowadd = base64_decode($item->php_allowadd); - } - - if (!empty($item->php_save)) - { - // base64 Decode php_save. - $item->php_save = base64_decode($item->php_save); - } - - if (!empty($item->php_getform)) - { - // base64 Decode php_getform. - $item->php_getform = base64_decode($item->php_getform); - } - - if (!empty($item->php_getitems_after_all)) - { - // base64 Decode php_getitems_after_all. - $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); - } - - if (!empty($item->php_import_save)) - { - // base64 Decode php_import_save. - $item->php_import_save = base64_decode($item->php_import_save); - } - - if (!empty($item->php_document)) - { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); - } - - if (!empty($item->php_before_publish)) - { - // base64 Decode php_before_publish. - $item->php_before_publish = base64_decode($item->php_before_publish); - } - - if (!empty($item->php_before_delete)) - { - // base64 Decode php_before_delete. - $item->php_before_delete = base64_decode($item->php_before_delete); + // base64 Decode php_import_headers. + $item->php_import_headers = base64_decode($item->php_import_headers); } if (!empty($item->html_import_view)) @@ -146,96 +98,144 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->html_import_view = base64_decode($item->html_import_view); } + if (!empty($item->php_import_save)) + { + // base64 Decode php_import_save. + $item->php_import_save = base64_decode($item->php_import_save); + } + if (!empty($item->php_getitems)) { // base64 Decode php_getitems. $item->php_getitems = base64_decode($item->php_getitems); } + if (!empty($item->php_getitems_after_all)) + { + // base64 Decode php_getitems_after_all. + $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); + } + if (!empty($item->php_getlistquery)) { // base64 Decode php_getlistquery. $item->php_getlistquery = base64_decode($item->php_getlistquery); } - if (!empty($item->php_before_save)) - { - // base64 Decode php_before_save. - $item->php_before_save = base64_decode($item->php_before_save); - } - - if (!empty($item->php_postsavehook)) - { - // base64 Decode php_postsavehook. - $item->php_postsavehook = base64_decode($item->php_postsavehook); - } - - if (!empty($item->php_allowedit)) - { - // base64 Decode php_allowedit. - $item->php_allowedit = base64_decode($item->php_allowedit); - } - - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); - } - - if (!empty($item->php_after_publish)) - { - // base64 Decode php_after_publish. - $item->php_after_publish = base64_decode($item->php_after_publish); - } - - if (!empty($item->php_after_delete)) - { - // base64 Decode php_after_delete. - $item->php_after_delete = base64_decode($item->php_after_delete); - } - - if (!empty($item->php_import_headers)) - { - // base64 Decode php_import_headers. - $item->php_import_headers = base64_decode($item->php_import_headers); - } - if (!empty($item->css_view)) { // base64 Decode css_view. $item->css_view = base64_decode($item->css_view); } + if (!empty($item->php_getform)) + { + // base64 Decode php_getform. + $item->php_getform = base64_decode($item->php_getform); + } + + if (!empty($item->php_before_save)) + { + // base64 Decode php_before_save. + $item->php_before_save = base64_decode($item->php_before_save); + } + if (!empty($item->css_views)) { // base64 Decode css_views. $item->css_views = base64_decode($item->css_views); } + if (!empty($item->php_save)) + { + // base64 Decode php_save. + $item->php_save = base64_decode($item->php_save); + } + + if (!empty($item->php_postsavehook)) + { + // base64 Decode php_postsavehook. + $item->php_postsavehook = base64_decode($item->php_postsavehook); + } + if (!empty($item->javascript_view_file)) { // base64 Decode javascript_view_file. $item->javascript_view_file = base64_decode($item->javascript_view_file); } + if (!empty($item->php_allowadd)) + { + // base64 Decode php_allowadd. + $item->php_allowadd = base64_decode($item->php_allowadd); + } + + if (!empty($item->php_allowedit)) + { + // base64 Decode php_allowedit. + $item->php_allowedit = base64_decode($item->php_allowedit); + } + if (!empty($item->javascript_view_footer)) { // base64 Decode javascript_view_footer. $item->javascript_view_footer = base64_decode($item->javascript_view_footer); } + if (!empty($item->php_batchcopy)) + { + // base64 Decode php_batchcopy. + $item->php_batchcopy = base64_decode($item->php_batchcopy); + } + + if (!empty($item->php_batchmove)) + { + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); + } + if (!empty($item->javascript_views_file)) { // base64 Decode javascript_views_file. $item->javascript_views_file = base64_decode($item->javascript_views_file); } + if (!empty($item->php_before_publish)) + { + // base64 Decode php_before_publish. + $item->php_before_publish = base64_decode($item->php_before_publish); + } + + if (!empty($item->php_after_publish)) + { + // base64 Decode php_after_publish. + $item->php_after_publish = base64_decode($item->php_after_publish); + } + if (!empty($item->javascript_views_footer)) { // base64 Decode javascript_views_footer. $item->javascript_views_footer = base64_decode($item->javascript_views_footer); } + if (!empty($item->php_before_delete)) + { + // base64 Decode php_before_delete. + $item->php_before_delete = base64_decode($item->php_before_delete); + } + + if (!empty($item->php_after_delete)) + { + // base64 Decode php_after_delete. + $item->php_after_delete = base64_decode($item->php_after_delete); + } + + if (!empty($item->php_document)) + { + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + if (!empty($item->php_controller)) { // base64 Decode php_controller. @@ -302,6 +302,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_ext = base64_decode($item->php_import_ext); } + if (!empty($item->addtables)) + { + // Convert the addtables field to an array. + $addtables = new Registry; + $addtables->loadString($item->addtables); + $item->addtables = $addtables->toArray(); + } + if (!empty($item->addpermissions)) { // Convert the addpermissions field to an array. @@ -326,14 +334,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } - if (!empty($item->addtables)) - { - // Convert the addtables field to an array. - $addtables = new Registry; - $addtables->loadString($item->addtables); - $item->addtables = $addtables->toArray(); - } - if (!empty($item->alias_builder)) { // Convert the alias_builder field to an array. @@ -1222,6 +1222,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['system_name'] = $data['name_single']; } + // Set the addtables items to data. + if (isset($data['addtables']) && is_array($data['addtables'])) + { + $addtables = new JRegistry; + $addtables->loadArray($data['addtables']); + $data['addtables'] = (string) $addtables; + } + elseif (!isset($data['addtables'])) + { + // Set the empty addtables to data + $data['addtables'] = ''; + } + // Set the addpermissions items to data. if (isset($data['addpermissions']) && is_array($data['addpermissions'])) { @@ -1261,19 +1274,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } - // Set the addtables items to data. - if (isset($data['addtables']) && is_array($data['addtables'])) - { - $addtables = new JRegistry; - $addtables->loadArray($data['addtables']); - $data['addtables'] = (string) $addtables; - } - elseif (!isset($data['addtables'])) - { - // Set the empty addtables to data - $data['addtables'] = ''; - } - // Set the alias_builder items to data. if (isset($data['alias_builder']) && is_array($data['alias_builder'])) { @@ -1313,58 +1313,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_batchcopy string to base64 string. - if (isset($data['php_batchcopy'])) + // Set the php_import_headers string to base64 string. + if (isset($data['php_import_headers'])) { - $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); - } - - // Set the php_allowadd string to base64 string. - if (isset($data['php_allowadd'])) - { - $data['php_allowadd'] = base64_encode($data['php_allowadd']); - } - - // Set the php_save string to base64 string. - if (isset($data['php_save'])) - { - $data['php_save'] = base64_encode($data['php_save']); - } - - // Set the php_getform string to base64 string. - if (isset($data['php_getform'])) - { - $data['php_getform'] = base64_encode($data['php_getform']); - } - - // Set the php_getitems_after_all string to base64 string. - if (isset($data['php_getitems_after_all'])) - { - $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); - } - - // Set the php_import_save string to base64 string. - if (isset($data['php_import_save'])) - { - $data['php_import_save'] = base64_encode($data['php_import_save']); - } - - // Set the php_document string to base64 string. - if (isset($data['php_document'])) - { - $data['php_document'] = base64_encode($data['php_document']); - } - - // Set the php_before_publish string to base64 string. - if (isset($data['php_before_publish'])) - { - $data['php_before_publish'] = base64_encode($data['php_before_publish']); - } - - // Set the php_before_delete string to base64 string. - if (isset($data['php_before_delete'])) - { - $data['php_before_delete'] = base64_encode($data['php_before_delete']); + $data['php_import_headers'] = base64_encode($data['php_import_headers']); } // Set the html_import_view string to base64 string. @@ -1373,96 +1325,144 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['html_import_view'] = base64_encode($data['html_import_view']); } + // Set the php_import_save string to base64 string. + if (isset($data['php_import_save'])) + { + $data['php_import_save'] = base64_encode($data['php_import_save']); + } + // Set the php_getitems string to base64 string. if (isset($data['php_getitems'])) { $data['php_getitems'] = base64_encode($data['php_getitems']); } + // Set the php_getitems_after_all string to base64 string. + if (isset($data['php_getitems_after_all'])) + { + $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); + } + // Set the php_getlistquery string to base64 string. if (isset($data['php_getlistquery'])) { $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); } - // Set the php_before_save string to base64 string. - if (isset($data['php_before_save'])) - { - $data['php_before_save'] = base64_encode($data['php_before_save']); - } - - // Set the php_postsavehook string to base64 string. - if (isset($data['php_postsavehook'])) - { - $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); - } - - // Set the php_allowedit string to base64 string. - if (isset($data['php_allowedit'])) - { - $data['php_allowedit'] = base64_encode($data['php_allowedit']); - } - - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); - } - - // Set the php_after_publish string to base64 string. - if (isset($data['php_after_publish'])) - { - $data['php_after_publish'] = base64_encode($data['php_after_publish']); - } - - // Set the php_after_delete string to base64 string. - if (isset($data['php_after_delete'])) - { - $data['php_after_delete'] = base64_encode($data['php_after_delete']); - } - - // Set the php_import_headers string to base64 string. - if (isset($data['php_import_headers'])) - { - $data['php_import_headers'] = base64_encode($data['php_import_headers']); - } - // Set the css_view string to base64 string. if (isset($data['css_view'])) { $data['css_view'] = base64_encode($data['css_view']); } + // Set the php_getform string to base64 string. + if (isset($data['php_getform'])) + { + $data['php_getform'] = base64_encode($data['php_getform']); + } + + // Set the php_before_save string to base64 string. + if (isset($data['php_before_save'])) + { + $data['php_before_save'] = base64_encode($data['php_before_save']); + } + // Set the css_views string to base64 string. if (isset($data['css_views'])) { $data['css_views'] = base64_encode($data['css_views']); } + // Set the php_save string to base64 string. + if (isset($data['php_save'])) + { + $data['php_save'] = base64_encode($data['php_save']); + } + + // Set the php_postsavehook string to base64 string. + if (isset($data['php_postsavehook'])) + { + $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); + } + // Set the javascript_view_file string to base64 string. if (isset($data['javascript_view_file'])) { $data['javascript_view_file'] = base64_encode($data['javascript_view_file']); } + // Set the php_allowadd string to base64 string. + if (isset($data['php_allowadd'])) + { + $data['php_allowadd'] = base64_encode($data['php_allowadd']); + } + + // Set the php_allowedit string to base64 string. + if (isset($data['php_allowedit'])) + { + $data['php_allowedit'] = base64_encode($data['php_allowedit']); + } + // Set the javascript_view_footer string to base64 string. if (isset($data['javascript_view_footer'])) { $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); } + // Set the php_batchcopy string to base64 string. + if (isset($data['php_batchcopy'])) + { + $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); + } + + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) + { + $data['php_batchmove'] = base64_encode($data['php_batchmove']); + } + // Set the javascript_views_file string to base64 string. if (isset($data['javascript_views_file'])) { $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); } + // Set the php_before_publish string to base64 string. + if (isset($data['php_before_publish'])) + { + $data['php_before_publish'] = base64_encode($data['php_before_publish']); + } + + // Set the php_after_publish string to base64 string. + if (isset($data['php_after_publish'])) + { + $data['php_after_publish'] = base64_encode($data['php_after_publish']); + } + // Set the javascript_views_footer string to base64 string. if (isset($data['javascript_views_footer'])) { $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); } + // Set the php_before_delete string to base64 string. + if (isset($data['php_before_delete'])) + { + $data['php_before_delete'] = base64_encode($data['php_before_delete']); + } + + // Set the php_after_delete string to base64 string. + if (isset($data['php_after_delete'])) + { + $data['php_after_delete'] = base64_encode($data['php_after_delete']); + } + + // Set the php_document string to base64 string. + if (isset($data['php_document'])) + { + $data['php_document'] = base64_encode($data['php_document']); + } + // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index b4863f8d2..7866d122f 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -376,56 +376,56 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_batchcopy - $item->php_batchcopy = base64_decode($item->php_batchcopy); - // decode php_allowadd - $item->php_allowadd = base64_decode($item->php_allowadd); - // decode php_save - $item->php_save = base64_decode($item->php_save); - // decode php_getform - $item->php_getform = base64_decode($item->php_getform); - // decode php_getitems_after_all - $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); - // decode php_import_save - $item->php_import_save = base64_decode($item->php_import_save); - // decode php_document - $item->php_document = base64_decode($item->php_document); - // decode php_before_publish - $item->php_before_publish = base64_decode($item->php_before_publish); - // decode php_before_delete - $item->php_before_delete = base64_decode($item->php_before_delete); - // decode html_import_view - $item->html_import_view = base64_decode($item->html_import_view); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); - // decode php_getlistquery - $item->php_getlistquery = base64_decode($item->php_getlistquery); - // decode php_before_save - $item->php_before_save = base64_decode($item->php_before_save); - // decode php_postsavehook - $item->php_postsavehook = base64_decode($item->php_postsavehook); - // decode php_allowedit - $item->php_allowedit = base64_decode($item->php_allowedit); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); - // decode php_after_publish - $item->php_after_publish = base64_decode($item->php_after_publish); - // decode php_after_delete - $item->php_after_delete = base64_decode($item->php_after_delete); // decode php_import_headers $item->php_import_headers = base64_decode($item->php_import_headers); + // decode html_import_view + $item->html_import_view = base64_decode($item->html_import_view); + // decode php_import_save + $item->php_import_save = base64_decode($item->php_import_save); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); + // decode php_getitems_after_all + $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); + // decode php_getlistquery + $item->php_getlistquery = base64_decode($item->php_getlistquery); // decode css_view $item->css_view = base64_decode($item->css_view); + // decode php_getform + $item->php_getform = base64_decode($item->php_getform); + // decode php_before_save + $item->php_before_save = base64_decode($item->php_before_save); // decode css_views $item->css_views = base64_decode($item->css_views); + // decode php_save + $item->php_save = base64_decode($item->php_save); + // decode php_postsavehook + $item->php_postsavehook = base64_decode($item->php_postsavehook); // decode javascript_view_file $item->javascript_view_file = base64_decode($item->javascript_view_file); + // decode php_allowadd + $item->php_allowadd = base64_decode($item->php_allowadd); + // decode php_allowedit + $item->php_allowedit = base64_decode($item->php_allowedit); // decode javascript_view_footer $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode php_batchcopy + $item->php_batchcopy = base64_decode($item->php_batchcopy); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode javascript_views_file $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode php_before_publish + $item->php_before_publish = base64_decode($item->php_before_publish); + // decode php_after_publish + $item->php_after_publish = base64_decode($item->php_after_publish); // decode javascript_views_footer $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + // decode php_before_delete + $item->php_before_delete = base64_decode($item->php_before_delete); + // decode php_after_delete + $item->php_after_delete = base64_decode($item->php_after_delete); + // decode php_document + $item->php_document = base64_decode($item->php_document); // decode php_controller $item->php_controller = base64_decode($item->php_controller); // decode php_model diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 030b35111..c43f0cfa1 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -1593,173 +1593,26 @@ class ComponentbuilderModelAjax extends JModelList // Used in dynamic_get public function getViewTableColumns($admin_view, $as, $type) { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.addfields', 'b.name_single'))); - $query->from($db->quoteName('#__componentbuilder_admin_fields', 'a')); - $query->join('LEFT', $db->quoteName('#__componentbuilder_admin_view', 'b') . ' ON (' . $db->quoteName('a.admin_view') . ' = ' . $db->quoteName('b.id') . ')'); - $query->where($db->quoteName('b.published') . ' = 1'); - $query->where($db->quoteName('a.admin_view') . ' = '. (int) $admin_view); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $result = $db->loadObject(); - $description = ''; - $tableName = ''; - if (1 == $type) - { - $tableName = ComponentbuilderHelper::safeString($result->name_single).'_'; - } - $addfields = json_decode($result->addfields,true); - if (ComponentbuilderHelper::checkArray($addfields)) - { - $fields = array(); - // get data - foreach ($addfields as $nr => $value) - { - $tmp = $this->getFieldData((int) $value['field']); - if (ComponentbuilderHelper::checkArray($tmp)) - { - $field[$nr] = $tmp; - } - // insure it is set to alias if needed - if (isset($value['alias']) && $value['alias'] == 1) - { - $field[$nr]['name'] = 'alias'; - } - } - // add the basic defaults - $fields[] = $as.".id AS ".$tableName."id"; - $fields[] = $as.".asset_id AS ".$tableName."asset_id"; - // load data - foreach ($field as $n => $f) - { - if (ComponentbuilderHelper::checkArray($f)) - { - $fields[] = $as.".".$f['name']." AS ".$tableName.$f['name']; - } - } - // add the basic defaults - $fields[] = $as.".published AS ".$tableName."published"; - $fields[] = $as.".created_by AS ".$tableName."created_by"; - $fields[] = $as.".modified_by AS ".$tableName."modified_by"; - $fields[] = $as.".created AS ".$tableName."created"; - $fields[] = $as.".modified AS ".$tableName."modified"; - $fields[] = $as.".version AS ".$tableName."version"; - $fields[] = $as.".hits AS ".$tableName."hits"; - if (0) - { - $fields[] = $as.".access AS ".$tableName."access"; - } - $fields[] = $as.".ordering AS ".$tableName."ordering"; - $viewFields = $description.implode("\n",$fields); - } - return $viewFields; - } - return false; + return ComponentbuilderHelper::getViewTableColumns($admin_view, $as, $type); } - protected function getFieldData($id) - { - // Get a db connection. - $db = JFactory::getDbo(); - - // Create a new query object. - $query = $db->getQuery(true); - - // Order it by the ordering field. - $query->select($db->quoteName(array('a.name','a.xml'))); - $query->select($db->quoteName(array('c.name'),array('type_name'))); - $query->from('#__componentbuilder_field AS a'); - $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'c') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('c.id') . ')'); - $query->where($db->quoteName('a.id') . ' = '. $db->quote($id)); - - // Reset the query using our newly populated query object. - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - // Load the results as a list of stdClass objects (see later for more options on retrieving data). - $field = $db->loadObject(); - // load the values form params - $field->xml = json_decode($field->xml); - $field->type_name = ComponentbuilderHelper::safeString($field->type_name); - $load = true; - // if category then name must be catid (only one per view) - if ($field->type_name == 'category') - { - $name = 'catid'; - - } - // if tag is set then enable all tag options for this view (only one per view) - elseif ($field->type_name == 'tag') - { - $name = 'tags'; - } - // don't add spacers or notes - elseif ($field->type_name == 'spacer' || $field->type_name == 'note') - { - // make sure the name is unique - return false; - } - else - { - $name = ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field->xml,'name="','"')); - } - - // use field core name only if not found in xml - if (!ComponentbuilderHelper::checkString($name)) - { - $name = ComponentbuilderHelper::safeString($field->name);; - } - return array('name' => $name, 'type' => $field->type_name); - } - return false; - } - public function getDbTableColumns($tableName, $as, $type) { - // Get a db connection. - $db = JFactory::getDbo(); - // get the columns - $columns = $db->getTableColumns("#__".$tableName); - // set the type (multi or single) - $unique = ''; - if (1 == $type) - { - $unique = ComponentbuilderHelper::safeString($tableName).'_'; - } - if (ComponentbuilderHelper::checkArray($columns)) - { - // build the return string - $tableColumns = array(); - foreach ($columns as $column => $typeCast) - { - $tableColumns[] = $as.".".$column . ' AS ' . $unique . $column; - } - return implode("\n",$tableColumns); - } - return false; + return ComponentbuilderHelper::getDbTableColumns($tableName, $as, $type); } public function getDynamicValues($id, $view) { // Get a db connection. $db = JFactory::getDbo(); - + // Create a new query object. $query = $db->getQuery(true); - $query->select($db->quoteName(array('getcustom', 'gettype', 'main_source', 'view_selection', 'db_selection', 'join_view_table', 'join_db_table', 'addcalculation', 'php_calculation'))); + $query->select($db->quoteName(array('getcustom', 'gettype', 'select_all', 'db_table_main', 'view_table_main', 'main_source', 'view_selection', 'db_selection', 'join_view_table', 'join_db_table', 'addcalculation', 'php_calculation'))); $query->from($db->quoteName('#__componentbuilder_dynamic_get')); $query->where($db->quoteName('published') . ' = 1'); - $query->where($db->quoteName('id') . ' = '. (int) $id); - + $query->where($db->quoteName('id') . ' = ' . (int) $id); + // Reset the query using our newly populated query object. $db->setQuery($query); $db->execute(); @@ -1772,11 +1625,19 @@ class ComponentbuilderModelAjax extends JModelList // get the main values (name) if ($result->main_source == 1) { - $selections[] = explode("\n",$result->view_selection); + if ($result->select_all == 1) + { + $result->view_selection = ComponentbuilderHelper::getViewTableColumns($result->view_table_main, 'a', $result->gettype); + } + $selections[] = explode("\n", $result->view_selection); } elseif ($result->main_source == 2) { - $selections[] = explode("\n",$result->db_selection); + if ($result->select_all == 1) + { + $result->db_selection = ComponentbuilderHelper::getDbTableColumns($result->db_table_main, 'a', $result->gettype); + } + $selections[] = explode("\n", $result->db_selection); } elseif ($result->main_source == 3) { @@ -1798,14 +1659,20 @@ class ComponentbuilderModelAjax extends JModelList { foreach ($result->join_view_table as $join_view_table) { + // check if all is selected + if (strpos($join_view_table['selection'], '*') !== false) + { + $join_view_table['selection'] = ComponentbuilderHelper::getViewTableColumns($join_view_table['view_table'], $join_view_table['as'], $join_view_table['row_type']); + } + // build selection if ($join_view_table['row_type'] == '1') { - $selections[] = explode("\n",$join_view_table['selection']); + $selections[] = explode("\n", $join_view_table['selection']); } elseif ($join_view_table['row_type'] == '2') { $names = $this->setListMethodName(array($join_view_table['on_field'],$join_view_table['join_field']),$join_view_table['view_table'],$join_view_table['as'],1); - $selectionsList[implode('',$names)] = explode("\n",$join_view_table['selection']); + $selectionsList[implode('',$names)] = explode("\n", $join_view_table['selection']); } } unset($result->join_view_table); @@ -1814,14 +1681,20 @@ class ComponentbuilderModelAjax extends JModelList { foreach ($result->join_db_table as $join_db_table) { + // check if all is selected + if (strpos($join_db_table['selection'], '*') !== false) + { + $join_db_table['selection'] = ComponentbuilderHelper::getViewTableColumns($join_db_table['view_table'], $join_db_table['as'], $join_db_table['row_type']); + } + // build selections if ($join_db_table['row_type'] == '1') { - $selections[] = explode("\n",$join_db_table['selection']); + $selections[] = explode("\n", $join_db_table['selection']); } elseif ($join_db_table['row_type'] == '2') { $names = $this->setListMethodName(array($join_db_table['on_field'],$join_db_table['join_field']),$join_db_table['db_table'],$join_db_table['as'],2); - $selectionsList[implode('',$names)] = explode("\n",$join_db_table['selection']); + $selectionsList[implode('',$names)] = explode("\n", $join_db_table['selection']); } } unset($result->join_db_table); @@ -1946,7 +1819,7 @@ class ComponentbuilderModelAjax extends JModelList } return false; } - + protected function setListMethodName($names, $table, $as, $type) { $methodNames = array(); @@ -1991,7 +1864,7 @@ class ComponentbuilderModelAjax extends JModelList $methodNames[] = ComponentbuilderHelper::safeString($as,'U'); return $methodNames; } - + protected function getViewName($id) { // Get the view name diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index a4611a277..3dab5e615 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -826,29 +826,31 @@ class ComponentbuilderModelCustom_code extends JModelAdmin } // few checks with the new option of using custom code in custom code - if (isset($data['code']) && ($placholders = ComponentbuilderHelper::getAllBetween($data['code'], '[CUSTOM' . 'CODE=', ']')) - && ComponentbuilderHelper::checkArray($placholders)) + if (isset($data['code']) && ($placeholders = ComponentbuilderHelper::getAllBetween($data['code'], '[CUSTOM' . 'CODE=', ']')) + && ComponentbuilderHelper::checkArray($placeholders)) { // make sure custom code as Hash (automation) target does not have other custom code placeholders if (isset($data['target']) && 1 == $data['target']) { - foreach ($placholders as $placholder) + foreach ($placeholders as $placeholder) { - $data['code'] = str_replace('[CUSTOM' . 'CODE=' . $placholder . ']', '', $data['code']); + $data['code'] = str_replace('[CUSTOM' . 'CODE=' . $placeholder . ']', '', $data['code']); } // set title - $title = (count($placholders) == 1) ? JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_REMOVED') : JText::_('COM_COMPONENTBUILDER_PLACEHOLDERS_REMOVED'); + $title = (count($placeholders) == 1) ? JText::_('COM_COMPONENTBUILDER_PLACEHOLDER_REMOVED') : JText::_('COM_COMPONENTBUILDER_PLACEHOLDERS_REMOVED'); // show message that we have had to remove the custom placeholders JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_COMPONENTBUILDER_HTHREESHTHREEPCUSTOM_CODE_CAN_ONLY_BE_USED_IN_OTHER_CUSTOM_CODE_IF_SET_AS_BJCB_MANUALB_YOU_CAN_NOT_ADD_THEM_TO_EMHASH_AUTOMATIONEM_CODE_AT_THIS_POINTP', $title), 'Warning'); } // make sure that the same custom code is not added to itself else { - foreach ($placholders as $placholder) + foreach ($placeholders as $placeholder) { - if (strpos($placholder, $data['function_name']) !== false) + // strip the placeholder down to just the function name + $_placeholder = (array) explode('+', $placeholder); + if ($_placeholder[0] === $data['function_name']) { - $data['code'] = str_replace('[CUSTOM' . 'CODE=' . $placholder . ']', '', $data['code']); + $data['code'] = str_replace('[CUSTOM' . 'CODE=' . $placeholder . ']', '', $data['code']); // show message that we have had to remove the custom placeholders JFactory::getApplication()->enqueueMessage(JText::_('COM_COMPONENTBUILDER_HTHREEPLACEHOLDER_REMOVEDHTHREEPBTHISB_CUSTOM_CODE_CAN_ONLY_BE_USED_IN_BOTHERB_CUSTOM_CODE_NOT_IN_IT_SELF_SINCE_THAT_WILL_CAUSE_A_INFINITE_LOOP_IN_THE_COMPILERP'), 'Warning'); // stop the loop :) diff --git a/admin/models/fields.php b/admin/models/fields.php index 8f1b91b7b..1a56973ec 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -171,6 +171,10 @@ class ComponentbuilderModelFields extends JModelList 'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT', 'MEDIUMTEXT' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT', 'LONGTEXT' => 'COM_COMPONENTBUILDER_FIELD_LONGTEXT', + 'BLOB' => 'COM_COMPONENTBUILDER_FIELD_BLOB', + 'TINYBLOB' => 'COM_COMPONENTBUILDER_FIELD_TINYBLOB', + 'MEDIUMBLOB' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMBLOB', + 'LONGBLOB' => 'COM_COMPONENTBUILDER_FIELD_LONGBLOB', 'DATETIME' => 'COM_COMPONENTBUILDER_FIELD_DATETIME', 'DATE' => 'COM_COMPONENTBUILDER_FIELD_DATE', 'TIME' => 'COM_COMPONENTBUILDER_FIELD_TIME', diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 4ebaaab40..eb099db26 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -239,6 +239,10 @@ class ComponentbuilderModelFieldtype extends JModelAdmin 'TEXT' => 'COM_COMPONENTBUILDER_FIELD_TEXT', 'MEDIUMTEXT' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT', 'LONGTEXT' => 'COM_COMPONENTBUILDER_FIELD_LONGTEXT', + 'BLOB' => 'COM_COMPONENTBUILDER_FIELD_BLOB', + 'TINYBLOB' => 'COM_COMPONENTBUILDER_FIELD_TINYBLOB', + 'MEDIUMBLOB' => 'COM_COMPONENTBUILDER_FIELD_MEDIUMBLOB', + 'LONGBLOB' => 'COM_COMPONENTBUILDER_FIELD_LONGBLOB', 'DATETIME' => 'COM_COMPONENTBUILDER_FIELD_DATETIME', 'DATE' => 'COM_COMPONENTBUILDER_FIELD_DATE', 'TIME' => 'COM_COMPONENTBUILDER_FIELD_TIME', diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index b453fd44f..28ec70746 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -1330,16 +1330,16 @@ function checkAliasField() { } function checkAliasField_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&vdm="+vastDevMod; + var getUrl = "index.php?option=com_componentbuilder&task=ajax.checkAliasField&format=json&raw=true&vdm="+vastDevMod; if(token.length > 0 && type > 0){ var request = 'token='+token+'&type=' + type; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -1354,16 +1354,16 @@ function getAjaxDisplay(type){ } function getAjaxDisplay_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&vdm="+vastDevMod; + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getAjaxDisplay&format=json&raw=true&vdm="+vastDevMod; if(token.length > 0 && type.length > 0){ var request = 'token='+token+'&type=' + type; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -1372,16 +1372,16 @@ function addData(result,where){ } function addButtonID_server(type, size){ - var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod); + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0 && size > 0){ var request = 'token='+token+'&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } function addButtonID(type, where, size){ @@ -1397,16 +1397,16 @@ function addButtonID(type, where, size){ } function addButton_server(type, size){ - var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod); + var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&raw=true&vdm="+vastDevMod); if(token.length > 0 && type.length > 0){ var request = 'token='+token+'&type='+type+'&size='+size; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } function addButton(type, where, size){ @@ -1424,16 +1424,16 @@ function addButton(type, where, size){ } function getLinked_server(type){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod; + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&raw=true&vdm="+vastDevMod; if(token.length > 0 && type > 0){ var request = 'token='+token+'&type='+type; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -1446,16 +1446,16 @@ function getLinked(){ } function getTableColumns_server(tableName){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&vdm="+vastDevMod; + var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&raw=true&vdm="+vastDevMod; if(token.length > 0 && tableName.length > 0){ var request = 'token='+token+'&table='+tableName; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } @@ -1477,16 +1477,16 @@ function getTableColumns(fieldKey, table_, nr_){ } function getDynamicScripts_server(typpe){ - var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&vdm="+vastDevMod; + var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicScripts&format=json&raw=true&vdm="+vastDevMod; if(token.length > 0 && typpe.length > 0){ var request = 'token='+token+'&type='+typpe; } return jQuery.ajax({ type: 'GET', url: getUrl, - dataType: 'jsonp', + dataType: 'json', data: request, - jsonp: 'callback' + jsonp: false }); } diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index a6ca0cccf..0088e9d61 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -129,104 +129,76 @@ message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + - + type="radio" + name="add_php_batchcopy" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_allowadd" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_save" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_getform" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - - + type="radio" + name="add_php_getitems_after_all" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_document" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + @@ -296,42 +265,542 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION" directory="" /> - + - - - + type="radio" + name="add_php_before_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + +