Fixes #3712 - Core worflow perform action "select" should not make multiple values selectable.

This commit is contained in:
Rolf Schmidt 2021-08-27 09:55:48 +01:00 committed by Thorsten Eckel
parent e359dd75bb
commit 96c126aca3
2 changed files with 14 additions and 2 deletions

View file

@ -485,8 +485,7 @@ class App.UiElement.ApplicationSelector
if attribute.value && attribute.value[groupAndAttribute] if attribute.value && attribute.value[groupAndAttribute]
config['value'] = @buildValueConfigValue(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) config['value'] = @buildValueConfigValue(elementFull, elementRow, groupAndAttribute, elements, meta, attribute)
if 'multiple' of config if 'multiple' of config
config.multiple = true config = @buildValueConfigMultiple(config, meta)
config.nulloption = false
if config.relation is 'User' if config.relation is 'User'
config.multiple = false config.multiple = false
config.nulloption = false config.nulloption = false
@ -516,6 +515,11 @@ class App.UiElement.ApplicationSelector
else else
elementRow.find('.js-value').removeClass('hide') elementRow.find('.js-value').removeClass('hide')
@buildValueConfigMultiple: (config, meta) ->
config.multiple = true
config.nulloption = false
return config
@humanText: (condition) -> @humanText: (condition) ->
none = App.i18n.translateContent('No filter.') none = App.i18n.translateContent('No filter.')
return [none] if _.isEmpty(condition) return [none] if _.isEmpty(condition)

View file

@ -125,6 +125,14 @@ class App.UiElement.core_workflow_perform extends App.UiElement.ApplicationSelec
super(elementFull, elementRow, groupAndAttribute, elements, meta, attribute) super(elementFull, elementRow, groupAndAttribute, elements, meta, attribute)
@buildValueConfigMultiple: (config, meta) ->
if _.contains(['add_option', 'remove_option', 'set_fixed_to'], meta.operator)
config.multiple = true
else
config.multiple = false
config.nulloption = false
return config
@HasPreCondition: -> @HasPreCondition: ->
return false return false