Skip to content

Commit

Permalink
fixed: grouplist in element admin form; you could save the element wi…
Browse files Browse the repository at this point in the history
…thout selecting a group
  • Loading branch information
pollen8 committed Oct 23, 2013
1 parent 210df78 commit 4ca22cf
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -67,6 +67,13 @@ protected function getGroups()
$options = $db->loadObjectList();
$groups = array();

// Add please select
$sel = new stdClass;
$sel->value = '';
$sel->form = '';
$sel->text = JText::_('COM_FABRIK_PLEASE_SELECT');
array_unshift($options, $sel);

foreach ($options as $option)
{
if (!array_key_exists($option->form, $groups))
Expand All @@ -83,8 +90,6 @@ protected function getGroups()
JError::raiseWarning(500, $db->getErrorMsg());
}

array_unshift($groups, JHtml::_('select.option', '', JText::_('COM_FABRIK_PLEASE_SELECT')));

return $groups;
}
}

0 comments on commit 4ca22cf

Please sign in to comment.