Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
};
');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('jmetadata', 'item_associations');

?>

<form action="<?php echo JRoute::_('index.php?option=com_categories&extension=' . $input->getCmd('extension', 'com_content') . '&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
}
};
");

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('jmetadata', 'item_associations');
?>
<div class="container-popup">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}
};
');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details', 'item_associations', 'jmetadata');
?>

<form action="<?php echo JRoute::_('index.php?option=com_contact&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="contact-form" class="form-validate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
}
};
');

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('details', 'display', 'email', 'item_associations');
?>
<div class="container-popup">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');

$this->hiddenFieldsets = array();
$this->hiddenFieldsets[0] = 'basic-limited';
$this->configFieldsets = array();
$this->configFieldsets[0] = 'editorConfig';
$this->configFieldsets = array('editorConfig');
$this->hiddenFieldsets = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata', 'item_associations');

// Create shortcut to parameters.
$params = $this->state->get('params');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
JHtml::_('behavior.keepalive');
JHtml::_('formbehavior.chosen', 'select');

$this->hiddenFieldsets = array();
$this->hiddenFieldsets[0] = 'basic-limited';
$this->configFieldsets = array();
$this->configFieldsets[0] = 'editorConfig';
$this->configFieldsets = array('editorConfig');
$this->hiddenFieldsets = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata', 'item_associations');

// Create shortcut to parameters.
$params = $this->state->get('params');
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_menus/views/item/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
// Add the script to the document head.
JFactory::getDocument()->addScriptDeclaration($script);

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('item_associations');
?>

<form action="<?php echo JRoute::_('index.php?option=com_menus&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
}
};
");

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('images', 'jbasic', 'jmetadata', 'item_associations');

?>
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="newsfeed-form" class="form-validate">

Expand Down Expand Up @@ -77,7 +81,6 @@
<?php echo $this->loadTemplate('display'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php $this->set('ignore_fieldsets', array('jbasic')); ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
}
};
");

$this->ignore_fieldsets = array('jbasic', 'item_associations');
?>
<div class="container-popup">

Expand Down Expand Up @@ -93,7 +95,6 @@
<?php echo $this->loadTemplate('display'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php $this->set('ignore_fieldsets', array('jbasic')); ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>

<?php if ($assoc) : ?>
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_tags/views/tag/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
}
};
");

// Fieldsets to not automatically render by /layouts/joomla/edit/params.php
$this->ignore_fieldsets = array('jmetadata', 'urls');
?>

<form action="<?php echo JRoute::_('index.php?option=com_tags&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate">
Expand Down
23 changes: 9 additions & 14 deletions layouts/joomla/edit/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@

defined('_JEXEC') or die;

$app = JFactory::getApplication();
$form = $displayData->getForm();

$fieldSets = $form->getFieldsets('params');

// For BC with versions < 3.2 we need to render the attribs too
$attribsFieldSet = $form->getFieldsets('attribs');

$fieldSets = array_merge($fieldSets, $attribsFieldSet);
$app = JFactory::getApplication();
$form = $displayData->getForm();
$fieldSets = $form->getFieldsets();

if (empty($fieldSets))
{
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm are you sure you can remove that? See the comment one line above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$attribsFieldSet isn't used in the layout , so pretty sure that removing it won't change rendering

}

$ignoreFieldsets = $displayData->get('ignore_fieldsets') ?: array();
$ignoreFields = $displayData->get('ignore_fields') ?: array();
$extraFields = $displayData->get('extra_fields') ?: array();
$ignoreFields = $displayData->get('ignore_fields') ?: array();
$extraFields = $displayData->get('extra_fields') ?: array();

if (!empty($displayData->hiddenFieldsets))
{
Expand All @@ -46,8 +40,9 @@
{
// Ensure any fieldsets we don't want to show are skipped (including repeating formfield fieldsets)
if (in_array($name, $ignoreFieldsets) || (!empty($configFieldsets) && in_array($name, $configFieldsets))
|| !empty($hiddenFieldsets) && in_array($name, $hiddenFieldsets)
|| (isset($fieldSet->repeat) && $fieldSet->repeat == true))
|| !empty($hiddenFieldsets) && in_array($name, $hiddenFieldsets)
|| (isset($fieldSet->repeat) && $fieldSet->repeat == true)
)
{
continue;
}
Expand Down Expand Up @@ -81,7 +76,7 @@
}
else
{
$html = array();
$html = array();
$html[] = '<div style="display:none;">';
foreach ($fieldSets as $name => $fieldSet)
{
Expand Down