Skip to content

Commit

Permalink
fixed: 2 form modules, on same page, both with checkbox elements. The…
Browse files Browse the repository at this point in the history
… second form was not loading in the checkbox file into its requirejs statement, causing js errors such as var oEl = new window[el[0]](el[1], el[2]);
  • Loading branch information
pollen8 committed Oct 23, 2015
1 parent 9d7cad1 commit 98525f4
Show file tree
Hide file tree
Showing 8 changed files with 425 additions and 426 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* @subpackage Form
* @since 3.1b
*/

class JFormFieldFabrikTemplate extends JFormFieldFolderList
{
/**
Expand All @@ -39,7 +38,6 @@ class JFormFieldFabrikTemplate extends JFormFieldFolderList
*
* @return array The field option objects.
*/

protected function getOptions()
{
$view = $this->element['view'] ? $this->element['view'] : 'list';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
* @subpackage Form
* @since 3.1
*/

class JFormFieldGroupElements extends JFormFieldGroupedList
{
/**
Expand All @@ -36,7 +35,6 @@ class JFormFieldGroupElements extends JFormFieldGroupedList
*
* @return array The field option objects as a nested array in groups.
*/

protected function getGroups()
{
$app = JFactory::getApplication();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ protected function getInput()
$formModel = false;
$filter = $this->getAttribute('filter');
$pluginFilters = trim($filter) == '' ? array() : explode('|', $filter);
$attribs = $this->element['@attributes'];
$connection = $this->getAttribute('connection');
/*
* 27/08/2011 - changed from default table-element to id - for juser form plugin - might cause havoc
Expand Down Expand Up @@ -314,6 +313,7 @@ private function _formOptions($valueFormat, $useStep, $onlyListFields, $showRaw,
return;
}

/** @var FabrikFEModelForm $formModel */
$formModel = $this->form->model;
$valField = $valueFormat == 'tableelement' ? 'name' : 'id';
$res = $formModel->getElementOptions($useStep, $valField, $onlyListFields, $showRaw, $pluginFilters, $labelMethod, $noJoins);
Expand Down Expand Up @@ -395,16 +395,15 @@ private function js($res = array())
*
* @return string Textarea GUI
*/

private function gui()
{
$attribs = $this->element['@attributes'];
$str = array();
$modeField = (string) $this->getAttribute('modefield', 'textarea');
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';

if ($modeField === 'textarea')
{
$str[] = '<textarea cols="20" row="3" id="' . $this->id . '" name="' . $this->name . '">' . $this->value . '</textarea>';
$str[] = '<textarea ' . $class. ' cols="20" row="30" id="' . $this->id . '" name="' . $this->name . '">' . $this->value . '</textarea>';
}
else
{
Expand All @@ -426,7 +425,6 @@ private function gui()
*
* @return array
*/

protected function loadFromGroupId($groupId)
{
$app = JFactory::getApplication();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
* @subpackage Form
* @since 1.6
*/

class JFormFieldSwapList extends JFormFieldList
{
/**
Expand All @@ -35,7 +34,6 @@ class JFormFieldSwapList extends JFormFieldList
*
* @return string The field input markup.
*/

protected function getInput()
{
$j3 = FabrikWorker::j3();
Expand Down Expand Up @@ -103,7 +101,6 @@ protected function getInput()
*
* @return string The field label markup.
*/

protected function getLabel()
{
return '';
Expand All @@ -114,7 +111,6 @@ protected function getLabel()
*
* @return array list of groups, html list of groups
*/

public function getGroupList()
{
$db = FabrikWorker::getDbo(true);
Expand Down Expand Up @@ -147,7 +143,6 @@ public function getGroupList()
*
* @return array list of groups, html list of groups
*/

public function getCurrentGroupList()
{
$db = FabrikWorker::getDbo(true);
Expand Down

0 comments on commit 98525f4

Please sign in to comment.