Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Configuration] Fix saving of values when no previous value present #7507

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions modules/configuration/templates/form_configuration.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,29 @@
<div class="config-form-group" id="{$node['ID']}">
{foreach from=$node['Value'] key=k item=v}
{if $node['AllowMultiple'] == 1}<div class="input-group entry">{/if}

{if $k == 0}
{assign var=id value={"add-"|cat:$node['ID']} }
{else}
{assign var=id value=$k}
{/if}

{if $node['DataType'] eq 'boolean'}
{call createRadio k=$k v=$v d=$node['Disabled']}
{call createRadio k=$id v=$v d=$node['Disabled']}
{elseif $node['DataType'] eq 'instrument'}
{call createInstrument k=$k v=$v d=$node['Disabled']}
{call createInstrument k=$id v=$v d=$node['Disabled']}
{elseif $node['DataType'] eq 'scan_type'}
{call createScanType k=$k v=$v d=$node['Disabled']}
{call createScanType k=$id v=$v d=$node['Disabled']}
{elseif $node['DataType'] eq 'date_format'}
{call createDateFormat k=$id v=$v d=$node['Disabled']}
{elseif $node['DataType'] eq 'email'}
{call createEmail k=$k v=$v d=$node['Disabled']}
{call createEmail k=$id v=$id d=$node['Disabled']}
{elseif $node['DataType'] eq 'textarea'}
{call createTextArea k=$k v=$v d=$node['Disabled']}
{call createTextArea k=$id v=$v d=$node['Disabled']}
{elseif $node['DataType'] eq 'lookup_center'}
{call createLookUpCenterNameUsing k=$k v=$v d=$node['Disabled']}
{call createLookUpCenterNameUsing k=$id v=$v d=$node['Disabled']}
{else}
{call createText k=$k v=$v d=$node['Disabled']}
{call createText k=$id v=$v d=$node['Disabled']}
{/if}
{if $node['AllowMultiple'] == 1}
<div class="input-group-btn">
Expand Down