Skip to content
Merged
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
@@ -0,0 +1 @@
ALTER TABLE `#__fields_groups` ADD `params` TEXT NOT NULL AFTER `ordering`;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "#__fields_groups" ADD "params" TEXT NOT NULL ;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE [#__fields_groups] ADD [params] [text] NOT NULL DEFAULT '';
26 changes: 25 additions & 1 deletion administrator/components/com_fields/models/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,34 @@ protected function preprocessForm(JForm $form, $data, $group = 'content')

$parts = FieldsHelper::extract($this->state->get('filter.context'));

// Extract the component name
$component = $parts[0];

// Extract the optional section name
$section = (count($parts) > 1) ? $parts[1] : null;

if ($parts)
{
// Set the access control rules field component value.
$form->setFieldAttribute('rules', 'component', $parts[0]);
$form->setFieldAttribute('rules', 'component', $component);
}

if ($section !== null)
{
// Looking first in the component models/forms folder
$path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fieldgroup/' . $section . '.xml');

if (file_exists($path))
{
$lang = JFactory::getLanguage();
$lang->load($component, JPATH_BASE, null, false, true);
$lang->load($component, JPATH_BASE . '/components/' . $component, null, false, true);

if (!$form->loadFile($path, false))
{
throw new Exception(JText::_('JERROR_LOADFILE_FAILED'));
}
}
}
}

Expand Down
1 change: 1 addition & 0 deletions installation/sql/mysql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ CREATE TABLE IF NOT EXISTS `#__fields_groups` (
`checked_out` int(11) NOT NULL DEFAULT '0',
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ordering` int(11) NOT NULL DEFAULT '0',
`params` text NOT NULL,
`language` char(7) NOT NULL DEFAULT '',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(10) unsigned NOT NULL DEFAULT '0',
Expand Down
1 change: 1 addition & 0 deletions installation/sql/postgresql/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ CREATE TABLE "#__fields_groups" (
"checked_out" integer DEFAULT '0' NOT NULL,
"checked_out_time" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"ordering" integer DEFAULT '0' NOT NULL,
"params" text DEFAULT '' NOT NULL,
"language" varchar(7) DEFAULT '' NOT NULL,
"created" timestamp without time zone DEFAULT '1970-01-01 00:00:00' NOT NULL,
"created_by" bigint DEFAULT '0' NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions installation/sql/sqlazure/joomla.sql
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ CREATE TABLE "#__fields_groups" (
"checked_out" bigint NOT NULL DEFAULT 0,
"checked_out_time" datetime2(0) NOT NULL DEFAULT '1900-01-01 00:00:00',
"ordering" int NOT NULL DEFAULT 0,
"params" nvarchar(max) NOT NULL DEFAULT '',
"language" nvarchar(7) NOT NULL DEFAULT '',
"created" datetime2(0) NOT NULL DEFAULT '1900-01-01 00:00:00',
"created_by" bigint NOT NULL DEFAULT 0,
Expand Down