Added a global editor switch for all editors in JCB, the default is none. gh-305 Added two new fields to the admin view to target the getform method in the model.

This commit is contained in:
2018-07-06 15:46:30 +02:00
parent 25650efa47
commit a9a0952ff3
74 changed files with 3291 additions and 3101 deletions

View File

@ -184,6 +184,16 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
}
}
// update all editors to use this components global editor
$global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
$editors = $form->getXml()->xpath("//field[@type='editor']");
foreach ($editors as $editor)
{
$name = (string) $editor['name'];
$form->setFieldAttribute($name, 'editor', $global_editor);
}
return $form;
}