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 else
uncheckParam[name] = [] uncheckParam[name] = []
) )
# verify if we have not checked radios
lookupForm.find('input[type=radio]').each( (index) -> lookupForm.find('input[type=radio]').each( (index) ->
checked = $(@).attr('checked') checked = $(@).attr('checked')
name = $(@).attr('name') name = $(@).attr('name')
if name && !checked && !(name of param) if name && !checked && !(name of param)
uncheckParam[name] = undefined uncheckParam[name] = undefined
) )
# apply empty checkboxes & radio values to params
for key, value of uncheckParam for key, value of uncheckParam
if !(key of param) if !(key of param)
param[key] = value param[key] = value

View file

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