Server IP : 1.179.227.78 / Your IP : 10.104.4.41 Web Server : Apache System : Linux afdc-mdu34 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 User : www ( 1001) PHP Version : 7.4.30 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/afdc-mdu34.rtarf.mi.th/joomla/layouts/joomla/edit/ |
Upload File : |
<?php /** * @package Joomla.Site * @subpackage Layout * * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; $app = JFactory::getApplication(); $form = $displayData->getForm(); $fieldSets = $form->getFieldsets(); if (empty($fieldSets)) { return; } $ignoreFieldsets = $displayData->get('ignore_fieldsets') ?: array(); $ignoreFields = $displayData->get('ignore_fields') ?: array(); $extraFields = $displayData->get('extra_fields') ?: array(); $tabName = $displayData->get('tab_name') ?: 'myTab'; // These are required to preserve data on save when fields are not displayed. $hiddenFieldsets = $displayData->get('hiddenFieldsets') ?: array(); // These are required to configure showing and hiding fields in the editor. $configFieldsets = $displayData->get('configFieldsets') ?: array(); // Handle the hidden fieldsets when show_options is set false if (!$displayData->get('show_options', 1)) { // The HTML buffer $html = array(); // Hide the whole buffer $html[] = '<div style="display:none;">'; // Loop over the fieldsets foreach ($fieldSets as $name => $fieldSet) { // Check if the fieldset should be ignored if (in_array($name, $ignoreFieldsets, true)) { continue; } // If it is a hidden fieldset, render the inputs if (in_array($name, $hiddenFieldsets)) { // Loop over the fields foreach ($form->getFieldset($name) as $field) { // Add only the input on the buffer $html[] = $field->input; } // Make sure the fieldset is not rendered twice $ignoreFieldsets[] = $name; } // Check if it is the correct fieldset to ignore if (strpos($name, 'basic') === 0) { // Ignore only the fieldsets which are defined by the options not the custom fields ones $ignoreFieldsets[] = $name; } } // Close the container $html[] = '</div>'; // Echo the hidden fieldsets echo implode('', $html); } // Loop again over the fieldsets foreach ($fieldSets as $name => $fieldSet) { // Ensure any fieldsets we don't want to show are skipped (including repeating formfield fieldsets) if ((isset($fieldSet->repeat) && $fieldSet->repeat === true) || in_array($name, $ignoreFieldsets) || (!empty($configFieldsets) && in_array($name, $configFieldsets, true)) || (!empty($hiddenFieldsets) && in_array($name, $hiddenFieldsets, true)) ) { continue; } // Determine the label if (!empty($fieldSet->label)) { $label = JText::_($fieldSet->label); } else { $label = strtoupper('JGLOBAL_FIELDSET_' . $name); if (JText::_($label) === $label) { $label = strtoupper($app->input->get('option') . '_' . $name . '_FIELDSET_LABEL'); } $label = JText::_($label); } // Start the tab echo JHtml::_('bootstrap.addTab', $tabName, 'attrib-' . $name, $label); // Include the description when available if (isset($fieldSet->description) && trim($fieldSet->description)) { echo '<p class="alert alert-info">' . $this->escape(JText::_($fieldSet->description)) . '</p>'; } // The name of the fieldset to render $displayData->fieldset = $name; // Force to show the options $displayData->showOptions = true; // Render the fieldset echo JLayoutHelper::render('joomla.edit.fieldset', $displayData); // End the tab echo JHtml::_('bootstrap.endTab'); }