Skip to content
Snippets Groups Projects
Commit f72a4eb2 authored by Prasad's avatar Prasad
Browse files

Merge branch '158347788' into 'master'

Fixes: The default selection of download file type field based on user's choice to upload either file url or document

See merge request !1035
parents 5ba56dff 011667e3
No related branches found
No related tags found
1 merge request!1035Fixes: The default selection of download file type field based on user's choice to upload either file url or document
......@@ -11,9 +11,17 @@
-->*}
{strip}
{assign var=FIELD_VALUES value=$FIELD_MODEL->getFileLocationType()}
<select class="select2" name="{$FIELD_MODEL->getFieldName()}">
{* The options displayed based on the file location type received on request *}
<select class="select2" name="{$FIELD_MODEL->getFieldName()}" {if $FILE_LOCATION_TYPE eq 'I' OR $FILE_LOCATION_TYPE eq 'E'} disabled {/if}>
{foreach item=TYPE key=KEY from=$FIELD_VALUES}
<option value="{$KEY}" {if $FIELD_MODEL->get('fieldvalue') eq $KEY} selected {/if}>{vtranslate($TYPE, $MODULE)}</option>
{if $FILE_LOCATION_TYPE eq 'I'}
{assign var=SELECTED value='I'}
{elseif $FILE_LOCATION_TYPE eq 'E'}
{assign var=SELECTED value='E'}
{else}
{assign var=SELECTED value=$FIELD_MODEL->get('fieldvalue')}
{/if}
<option value="{$KEY}" {if $SELECTED eq $KEY} selected {/if}>{vtranslate($TYPE, $MODULE)}</option>
{/foreach}
</select>
{/strip}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment