Make it easier to know destroy_field is an input
By using the input and finding it by its name, it's easier to see the difference between this input and the delete-language link.
This commit is contained in:
@@ -48,7 +48,7 @@ App.Globalize =
|
|||||||
)
|
)
|
||||||
|
|
||||||
destroy_locale_field: (locale) ->
|
destroy_locale_field: (locale) ->
|
||||||
$(".destroy-locale[data-locale=" + locale + "]")
|
$("input[id$=_destroy][data-locale=" + locale + "]")
|
||||||
|
|
||||||
site_customization_enable_locale_field: (locale) ->
|
site_customization_enable_locale_field: (locale) ->
|
||||||
$("#enabled_translations_" + locale)
|
$("#enabled_translations_" + locale)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ module TranslatableFormHelper
|
|||||||
@template.content_tag :div, translations_options(translations_form.object, locale) do
|
@template.content_tag :div, translations_options(translations_form.object, locale) do
|
||||||
@template.concat translations_form.hidden_field(
|
@template.concat translations_form.hidden_field(
|
||||||
:_destroy,
|
:_destroy,
|
||||||
class: "destroy-locale",
|
|
||||||
data: { locale: locale })
|
data: { locale: locale })
|
||||||
|
|
||||||
@template.concat translations_form.hidden_field(:locale, value: locale)
|
@template.concat translations_form.hidden_field(:locale, value: locale)
|
||||||
|
|||||||
Reference in New Issue
Block a user