1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Issue #36728 - Inputs inside disabled fieldset are not submited on remote: true forms

This commit is contained in:
Willian Gustavo Veiga 2019-07-25 16:07:11 -03:00
parent b1c27c059c
commit c3e786fc48

View file

@ -11,6 +11,7 @@ Rails.serializeElement = (element, additionalParam) ->
inputs.forEach (input) -> inputs.forEach (input) ->
return if !input.name || input.disabled return if !input.name || input.disabled
return if input.closest('fieldset[disabled]')
if matches(input, 'select') if matches(input, 'select')
toArray(input.options).forEach (option) -> toArray(input.options).forEach (option) ->
params.push(name: input.name, value: option.value) if option.selected params.push(name: input.name, value: option.value) if option.selected