Skip to content
Permalink
Browse files

Content plugins not able to insert custom fieldsets into core forms F…

…ixes #7126
  • Loading branch information...
pollen8 authored and Kubik-Rubik committed Jun 5, 2015
1 parent 5aa629a commit 580bec7336786b8d332ac08d2154b42b6ae281d8
@@ -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">
@@ -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">

@@ -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">
@@ -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">

@@ -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');
@@ -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');
@@ -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">
@@ -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">

@@ -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); ?>


@@ -35,6 +35,8 @@
}
};
");
$this->ignore_fieldsets = array('jbasic', 'item_associations');
?>
<div class="container-popup">

@@ -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) : ?>
@@ -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">
@@ -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;
}
$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))
{
@@ -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;
}
@@ -81,7 +76,7 @@
}
else
{
$html = array();
$html = array();
$html[] = '<div style="display:none;">';
foreach ($fieldSets as $name => $fieldSet)
{

0 comments on commit 580bec7

Please sign in to comment.
You can’t perform that action at this time.