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:
Javi Martín
2018-10-15 17:56:09 +02:00
committed by decabeza
parent 9aa07e3b74
commit d10f07b0b4
2 changed files with 1 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ App.Globalize =
)
destroy_locale_field: (locale) ->
$(".destroy-locale[data-locale=" + locale + "]")
$("input[id$=_destroy][data-locale=" + locale + "]")
site_customization_enable_locale_field: (locale) ->
$("#enabled_translations_" + locale)

View File

@@ -13,7 +13,6 @@ module TranslatableFormHelper
@template.content_tag :div, translations_options(translations_form.object, locale) do
@template.concat translations_form.hidden_field(
:_destroy,
class: "destroy-locale",
data: { locale: locale })
@template.concat translations_form.hidden_field(:locale, value: locale)