<p class="formstyle {if isset($collapse)}{$collapse}{/if} {if isset($row_no)}row_no{$row_no}{/if}"
    style="{if isset($hide) && $hide}display:none;{/if} {if isset($color)}background-color:{$color}{/if}">{*
    *}{include file="r/parts/pre_field.tpl"}{*
    *}{if !isset($hide_file_preview) || $hide_file_preview===false}<span id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}" class="preview">{if isset($file_preview)}{$file_preview}{/if}</span>{/if}
    {if !isset($previewonly) || (isset($previewonly) && !$previewonly)}
        <span class="upload">
            <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}"
                    {elseif $targettype eq 'image'}
                        accept=".png,.jpg,.jpeg,image/*"                        
                    {/if} 
                    {if isset($filter_extra)}{$filter_extra}{/if}
                 >
                <button name="targetinfo" value="{"`$targettype`;`$targetdata`"|base64}">Upload</button>
                <span class="file_target">{$i.basic_upload}</span>
                <progress max="100" value="1"></progress>
            {/if}
        </span>
        {if !isset($allow_delete) || $allow_delete===true}
            <span class="dialog_make_btn16 delete smallbtns ui-corner-all file_upload_elems" onclick="usComm.upload_delete('{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}')"></span>
        {/if}{*
    *}{/if}{include file="r/parts/past_field.tpl"}
</p>
