Fixed Can't easily use asset upload for options

Kirby

Well-known member
Affected version
2.3.7
In some cases it would would be quite useful if it was possible to use asset upload for an option, but unfortunately format parameter asset is not supported to Text box edit format.

Adding smth. like
Code:
<xf:elseif is="$option.edit_format == 'textbox' && $formatParams.asset && $formatParams.asset is not empty" />
    <xf:assetuploadrow name="{$inputName}" value="{$option.option_value}" class="{$formatParams.class}" rowclass="{$rowClass}" asset="{$formatParams.asset}" accept="{$formatParams.accept}">
        <xf:label>{$option.title}</xf:label>
        <xf:hint>{$hintHtml}</xf:hint>
        <xf:explain>{$explainHtml}</xf:explain>
        <xf:finalhtml>{$listedHtml}</xf:finalhtml>
    </xf:assetuploadrow>

above

Code:
<xf:elseif is="$option.edit_format == 'textbox' && $formatParams.rows && $formatParams.rows > 1" />

in option_macros seems to fix this.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.8).

Change log:
Support using asset uploader within options
There may be a delay before changes are rolled out to the XenForo Community.
 
Last edited by a moderator:
Back
Top Bottom