-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TranslatableCatalogExtension - LanguageForm action is not allowed #43
Comments
We haven't used this part of the catalog manager for almost 2 years - is there a fix that you can think of for it? |
Not at the moment, but if I find a fix i'll let you know |
Update However I can not remove the function ImportForm(){
return $this->LangForm();
} And then removing the Also it is weird that the language switching works, but it still says ?Locale=en_US in the URL. Update 2 On my ModelAdmin: public function BaseCSSClasses() {
// add CMSMain class because otherwise the JavaScript for the language select dropdown wont work
return $this->CSSClasses('Controller') . ' CMSMain';
} |
@sanderha can you confirm the work from @Tom-Alexander fixes this issue? If it does, I will tag a new release from master. |
@stevie-mayhew It seems to work nicely. Would be better to change a few lines so that in the ModelAdmin_Tools.ss template we put the $LanguageSelectorForm in a div with the class "CMSMain". public function getLanguageSelectorForm()
{
$fields = FieldList::create($this->getLanguageField());
return Form::create(
$this->owner,
'LangForm',
$fields,
FieldList::create(FormAction::create(
'language',
'Go'
))
);
} These changes make sure that the JavaScript form the Translatable module works as it normally does. Also, would you mind using the "old" array syntax when declaring the Besides these changes, @Tom-Alexander did an amazing job! |
Could you make a change and do a PR for that @sanderha ? I'd be happy to merge it. |
Cool, I've done the PR. #46 |
I've added the TranslatableCatalogExtension to my modeladmin, which then shows a language select dropdown in my modeladmin area. When I try to use it to select a language, it throws the following error:
Action 'LangForm' isn't available on class ProductsAdmin.
The text was updated successfully, but these errors were encountered: