Release of v5.0.2-alpha2

Fix missing scripts and styles fields and methods in the site admin view model. Update subform field layout across JCB for cleaner look. Remove expansion feature. Fix helper area.
This commit is contained in:
2024-07-26 18:34:11 +02:00
parent 9f05fb090f
commit 0cbe573fe0
152 changed files with 350 additions and 930 deletions

View File

@ -42,24 +42,27 @@ class AdminviewsField extends ListField
*/
protected function getOptions()
{
// Get the database object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select an option');
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->id, $item->adminview_system_name);
}
}
return $options;
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = [];
if ($items)
{
if ($this->multiple === false)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
}
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->id, $item->adminview_system_name);
}
}
return $options;
}
}