Override translations _destroy value depending of our translations managment logic
During any translatable resource edit, if you remove all translations you will be redirected to same form with errors showing you one of persisted but marked to destroy translations, without this patch _destroy field value wil be true and you will no able to persist without re-addding the same language through translation interface.
This commit is contained in:
@@ -38,6 +38,7 @@ module TranslatableFormHelper
|
||||
@template.content_tag :div, translations_options(translations_form.object, locale) do
|
||||
@template.concat translations_form.hidden_field(
|
||||
:_destroy,
|
||||
value: !@template.enabled_locale?(translations_form.object.globalized_model, locale),
|
||||
data: { locale: locale }
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user