This commit is contained in:
Martin Edenhofer 2018-02-16 11:19:26 +01:00
parent 894afeeb42
commit faad5f9ebd
2 changed files with 5 additions and 1 deletions

View file

@ -465,12 +465,16 @@ class App.ControllerForm extends App.Controller
else
uncheckParam[name] = []
)
# verify if we have not checked radios
lookupForm.find('input[type=radio]').each( (index) ->
checked = $(@).attr('checked')
name = $(@).attr('name')
if name && !checked && !(name of param)
uncheckParam[name] = undefined
)
# apply empty checkboxes & radio values to params
for key, value of uncheckParam
if !(key of param)
param[key] = value

View file

@ -55,7 +55,7 @@ class App.ChannelForm extends App.ControllerSubContent
params = @formParam(@$('.js-paramsDesigner'))
paramString = ''
for key, value of params
if value != ''
if !_.isEmpty(value)
if paramString != ''
paramString += ",\n"
if value == 'true' || value == 'false'