mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Compatibility issue with SS 3.2.0
This commit is contained in:
parent
e3a91c3506
commit
4d35939461
@ -1074,12 +1074,11 @@ class Translatable extends DataExtension implements PermissionProvider {
|
|||||||
if($canAddLocale) {
|
if($canAddLocale) {
|
||||||
// Only add create button if new languages are available
|
// Only add create button if new languages are available
|
||||||
$tab->push(
|
$tab->push(
|
||||||
$createButton = InlineFormAction::create(
|
$createButton = FormAction::create(
|
||||||
'createtranslation',
|
'createtranslation',
|
||||||
_t('Translatable.CREATEBUTTON', 'Create')
|
_t('Translatable.CREATEBUTTON', 'Create')
|
||||||
)->addExtraClass('createTranslationButton')
|
)->addExtraClass('createTranslationButton')
|
||||||
);
|
);
|
||||||
$createButton->includeDefaultJS(false); // not fluent API...
|
|
||||||
} else {
|
} else {
|
||||||
$tab->removeByName('NewTransLang');
|
$tab->removeByName('NewTransLang');
|
||||||
$tab->push(new LiteralField(
|
$tab->push(new LiteralField(
|
||||||
@ -1889,7 +1888,7 @@ class Translatable_Transformation extends FormTransformation {
|
|||||||
* @param FormField $originalField The original editable field containing the translated value
|
* @param FormField $originalField The original editable field containing the translated value
|
||||||
* @return CheckboxField The field with a modified label
|
* @return CheckboxField The field with a modified label
|
||||||
*/
|
*/
|
||||||
protected function transformCheckboxField(CheckboxField $nonEditableField, CheckboxField $originalField) {
|
protected function transformCheckboxField(FormField $nonEditableField, FormField $originalField) {
|
||||||
$label = $originalField->Title();
|
$label = $originalField->Title();
|
||||||
$fieldName = $originalField->getName();
|
$fieldName = $originalField->getName();
|
||||||
$value = ($this->original->$fieldName)
|
$value = ($this->original->$fieldName)
|
||||||
|
Loading…
Reference in New Issue
Block a user