mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX Setting 'Locale' as HiddenField in CMSMain->getEditForm() to support translatable SiteConfig records (see r97370, #4770) (from r97472)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102715 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
52d067ead4
commit
af2f81e37a
@ -333,7 +333,11 @@ JS;
|
|||||||
}
|
}
|
||||||
} elseif ($id == 0) {
|
} elseif ($id == 0) {
|
||||||
$siteConfig = SiteConfig::current_site_config();
|
$siteConfig = SiteConfig::current_site_config();
|
||||||
$form = new Form($this, "EditForm", $siteConfig->getFormFields(), $siteConfig->getFormActions());
|
$fields = $siteConfig->getFormFields();
|
||||||
|
if(Object::has_extension('SiteConfig',"Translatable")){
|
||||||
|
$fields->push(new HiddenField('Locale','', $siteConfig->Locale ));
|
||||||
|
}
|
||||||
|
$form = new Form($this, "EditForm", $fields, $siteConfig->getFormActions());
|
||||||
$form->loadDataFrom($siteConfig);
|
$form->loadDataFrom($siteConfig);
|
||||||
return $form;
|
return $form;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user