<p class="formstyle {if isset($collapse)}{$collapse}{/if} {if isset($row_no)}row_no{$row_no}{/if}"
    {if isset($hide) && $hide} style="display:none;"{/if} id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}__p">
    <span class="upload {if isset($multiple) && $multiple} multiple_upload{/if}" {if isset($main_style)}style="{$main_style}"{/if}>
        <input type="hidden" name="{$name}"
            value="{if isset($default)}{$default}{/if}"
            id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}__hidden" {if isset($class)}class="{$class}"{/if} />
        {if !isset($readonly) || (isset($readonly) && !$readonly)}
            <input type="file" name="file" id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}__file" class="upload_input" {if isset($mime_restriction)}accept="{$mime_restriction}"{/if} {if isset($multiple) && $multiple} multiple{/if}>
            <button name="targetinfo" value="{"`$targettype`;`$targetdata`"|base64}">Upload</button>
            <span class="file_target">{if isset($extra_title)}{$extra_title} - {/if}{$i.basic_upload}</span>
            <progress max="100" value="1"></progress>
        {/if}
    </span>
</p>