Added notice of language (tanslations) added or not added with details to compiler
Resolved gh-146 compiler error on joined db in dinamic get thanks to @mwweb & @ro-ot Resolved gh-147 by adding the sort of fields back into the save method Resolved gh-144 to ensure that the published tab (fields overwriting and adding) option is available again. Resolved gh-145 by moving the subforms to their own tab in dynamic get view Converted all repeatable fields to subform fields in Joomla component view Moved 9 subforms and other fields to their own table and view (decopuling them fom Joomla component view), that means we added 9 more views and tables to JCB Added all the ajax for buttons and display views to Joomla component view Added tmp scripts all across the new areas with subforms to ensure all repeatable fields are converted. Will be removed in v2.7.0 Added synced copy, change state and delete in Joomla components view in relation to all tables linked to it (same as with admin views)
This commit is contained in:
@ -10,8 +10,8 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version @update number 202 of this MVC
|
||||
@build 21st October, 2017
|
||||
@version @update number 228 of this MVC
|
||||
@build 26th October, 2017
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_view.php
|
||||
@ -321,25 +321,27 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
// get the state object (Joomla\CMS\Object\CMSObject)
|
||||
$state = $model->get('state');
|
||||
// if we save2copy we need to also copy admin_fields & admin_fields_conditions if found!
|
||||
$state = $model->get('state');
|
||||
// if we save2copy we need to also copy linked tables found!
|
||||
if ($state->task === 'save2copy' && $state->{'admin_view.new'})
|
||||
{
|
||||
// get new ID
|
||||
$newID = $state->{'admin_view.id'};
|
||||
// get old ID
|
||||
$oldID = $this->input->get('id', 0, 'INT');
|
||||
// get the linked ID
|
||||
if ($field = ComponentbuilderHelper::getVar('admin_fields', $oldID, 'admin_view', 'id'))
|
||||
// linked tables to update
|
||||
$_tablesArray = array(
|
||||
'admin_fields',
|
||||
'admin_fields_conditions'
|
||||
);
|
||||
foreach($_tablesArray as $_updateTable)
|
||||
{
|
||||
// copy fields to new admin view
|
||||
ComponentbuilderHelper::copyItem(/*id->*/ $field, /*table->*/ 'admin_fields', /*change->*/ array('admin_view' => $newID));
|
||||
}
|
||||
// get the linked ID
|
||||
if ($condition = ComponentbuilderHelper::getVar('admin_fields_conditions', $oldID, 'admin_view', 'id'))
|
||||
{
|
||||
// copy conditions to new admin view
|
||||
ComponentbuilderHelper::copyItem(/*id->*/ $condition, /*table->*/ 'admin_fields_conditions', /*change->*/ array('admin_view' => $newID));
|
||||
// get the linked ID
|
||||
if ($_value = ComponentbuilderHelper::getVar($_updateTable, $oldID, 'admin_view', 'id'))
|
||||
{
|
||||
// copy fields to new admin view
|
||||
ComponentbuilderHelper::copyItem(/*id->*/ $_value, /*table->*/ $_updateTable, /*change->*/ array('admin_view' => $newID));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user