<p class="formstyle {if isset($collapse)}{$collapse}{/if} {if isset($row_no)}row_no{$row_no}{/if}"
    {if isset($hide) && $hide} style="display:none;"{else}style="padding-top:3px;padding-bottom:3px;"{/if}>{*
    *}{include file="r/parts/pre_field.tpl"}{*
    *}<span id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}" class="preview">{if isset($file_preview)}{$file_preview}{/if}</span>
    {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 $targettype eq 'image'}accept=".png,.jpg,.jpeg,image/*"{/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>{*
    *}<span class="dialog_make_btn16 file ui-corner-all" onclick="$('#{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}__file').attr('accept', '*/*')" 
          title="{$i.basic_type_file}" style="position:sticky; padding-top:20px; margin-left:-10px; z-index:1; opacity: 0.7;"></span>{*
    *}<span class="dialog_make_btn16 png ui-corner-all" onclick="$('#{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}__file').attr('accept', 'image/*')" 
          title="{$i.basic_type_image}" style="position:sticky; padding-top:3px; margin-left:-17px; z-index:1; opacity: 0.7;"></span>{*
    *}{if !isset($allow_delete) || $allow_delete===true}{*
        *}<span class="dialog_make_btn16 delete smallbtns ui-corner-all" onclick="usComm.upload_delete('{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}')" style="margin-left: 15px;"></span>{*
    *}{/if}{*
    *}{/if}{include file="r/parts/past_field.tpl"}
</p>