<div class="tvd-modal-content">
    <div class="tve-form tve-leads-assets-preview-templates tve_leads_clearfix">
        <h4><?php echo __('Subject', 'thrive-leads') ?></h4>
        <div class="tve-leads-preview-subject">
            <#  if(post_subject) {
                    var res = post_subject.replace(/\[lead_name\]/g, ThriveLeads.objects.AssetsWizard.get('admin_name'));
                } else {
                    var res = ThriveLeads.objects.AssetsWizard.get('email_data').template_subject.replace(/\[lead_name\]/g, ThriveLeads.objects.AssetsWizard.get('admin_name'));
                }
                var res = res.replace(/\[asset_name\]/g, post_title);
            #>
            <p><#= res #></p>
        </div>
        <h4><?php echo __('Content', 'thrive-leads') ?></h4>
        <div class="tve-leads-preview-body">
            <#
                if(post_content) {
                    var res = post_content.replace(/\[lead_name\]/g, ThriveLeads.objects.AssetsWizard.get('admin_name'));
                } else {
                    var res = ThriveLeads.objects.AssetsWizard.get('email_data').template_body.replace(/\[lead_name\]/g, ThriveLeads.objects.AssetsWizard.get('admin_name'));
                }
                var res = res.replace(/\[asset_name\]/g, post_title);

                files_html = '';
                for(var k in files.models) {
                    var html = '<a target="_blank" href="' + files.models[k].get('link') + '">' + files.models[k].get('link_anchor') + '</a><br/>';
                    var files_html = files_html.concat(html);
                }

                var res = res.replace(/\[asset_download\]/g, files_html);

                #>
            <#= res #>
        </div>
    </div>
    <div class="tvd-v-spacer"></div>
</div>
<div class="tvd-modal-footer">
    <div class="tvd-row">
        <div class="tvd-col tvd-s12">
            <a href="javascript:void(0)" class="tvd-btn-flat tvd-btn-flat-secondary tvd-btn-flat-dark tvd-modal-close tvd-waves-effect" tabindex="3"><?php echo __('Close', 'thrive-leads') ?></a>
        </div>
    </div>
</div>