<form method="post" action="{$smarty.server.PHP_SELF}?tid={$tid}&amp;c={$c}&amp;postreply=true" enctype="multipart/form-data" role="form" id="frmReply">
    <div class="tab-container">
        {if $loggedin}
            <div class="ticket-creator">
                {if $RSThemes.addonSettings.show_gravatar_image == 'displayed'}
                    <div class="creator-avatar creator-avatar-md">
                        <img class="lazyload" data-src="https://www.gravatar.com/avatar/{$loggedinuser->email|md5}{if $RSThemes.addonSettings.gravatar_placeholder && $RSThemes.addonSettings.gravatar_placeholder != "default"}?d={$RSThemes.addonSettings.gravatar_placeholder}{/if}" alt="Avatar">
                    </div>
                {/if}
                <div class="creator-details">
                    <div class="creator-details-container">
                        <p class="creator-details-name mb-0">{$replyname}</p>
                        <p class="creator-details-email mb-0 p-xs">{$replyemail}</p>
                    </div>
                </div>
            </div>
        {else}
            <div class="ticket-creator-guest">
                <div class="form-group mb-0">
                    <label class="mb-0 font-weight-medium text-heading-color" for="inputName">{$LANG.supportticketsclientname}</label>
                    <input class="form-control" type="text" name="replyname" id="inputName" placeholder="{$LANG.supportticketsclientname}" value="{$replyname}">
                </div>
                <div class="form-group mb-0">
                    <label class="mb-0 font-weight-medium text-heading-color" for="inputEmail">{$LANG.supportticketsclientemail}</label>
                    <input class="form-control" type="text" name="replyemail" id="inputEmail" placeholder="{$LANG.enteremail}" value="{$replyemail}">
                </div>
            </div>
        {/if}
        {if isset($sensitiveDataEnabled) && $sensitiveDataEnabled && (isset($sensitiveDataOptions) && $sensitiveDataOptions == "new") && $loggedin && (is_array($sensitiveDataSupportDepartmentsEnabled) && $sensitiveDataSupportDepartmentsEnabled[$departmentid] == 1)}
            <div class="alert alert-sm alert-danger mb-0" data-message-tab-alert><i class="ls ls-denial mr-2"></i><span>{$sensitiveDataTranslations->getClientTranslation("open_ticket.alert_message_tab")|unescape:'html'}</span></div>
        {/if}
        <div class="form-group mb-0">
            <label for="inputMessage" class="sr-only">{$rslang->trans('support.continue_editing')}</label>
            <textarea data-md-lang-continue="{$rslang->trans('support.continue_editing')}" name="replymessage" id="inputMessage" rows="7" class="form-control markdown-editor" data-auto-save-name="client_ticket_reply_{$tid}">{$replymessage}</textarea>
        </div>
        <div class="form-group mb-0">
            <div class="attachements-container">
                <div tabindex="0" role="button" class="add add-extra-attachement" data-nofiletext="{$rslang->trans('support.no_file_selected')}" data-selectfiletext="{$rslang->trans('support.select_file')}" data-removetext="{$LANG.orderForm.remove}">
                    <i>{include file="$template/assets/img/attachments-icon.svg"}</i>
                    <span>{$rslang->trans('support.attachements_tab.add')}</span>
                </div>
                <div tabindex="0" role="button" class="attachements-uploads hidden" id="fileUploadsContainer">
                    <i>{include file="$template/assets/img/attachments-icon.svg"}</i>
                    <button tabindex="0" type="button" class="btn btn-xs btn-primary-faded add-extra-attachement" data-nofiletext="{$rslang->trans('support.no_file_selected')}" data-selectfiletext="{$rslang->trans('support.select_file')}" data-removetext="{$LANG.orderForm.remove}">{$LANG.addmore}</button>
                </div>
            </div>
            <p class="ticket-attachments-message">
                {include file="$template/assets/img/help-icon-ticket.svg"}
                {$LANG.supportticketsallowedextensions}: {$allowedfiletypes} ({lang key="maxFileSize" fileSize="$uploadMaxFileSize"})
            </p>
        </div>
    </div> 
    <div class="tab-actions">
        <input class="btn btn-primary" type="submit" name="save" value="{$rslang->trans('support.support_ticket_send')}" />
        <input class="btn btn-default" type="reset" value="{$LANG.cancel}" onclick="jQuery('#ticketReply').click()" />
    </div>
</form>