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) {
|
||||
// Only add create button if new languages are available
|
||||
$tab->push(
|
||||
$createButton = InlineFormAction::create(
|
||||
$createButton = FormAction::create(
|
||||
'createtranslation',
|
||||
_t('Translatable.CREATEBUTTON', 'Create')
|
||||
)->addExtraClass('createTranslationButton')
|
||||
);
|
||||
$createButton->includeDefaultJS(false); // not fluent API...
|
||||
} else {
|
||||
$tab->removeByName('NewTransLang');
|
||||
$tab->push(new LiteralField(
|
||||
@ -1889,7 +1888,7 @@ class Translatable_Transformation extends FormTransformation {
|
||||
* @param FormField $originalField The original editable field containing the translated value
|
||||
* @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();
|
||||
$fieldName = $originalField->getName();
|
||||
$value = ($this->original->$fieldName)
|
||||
|
Loading…
Reference in New Issue
Block a user