<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-envelope"></i> Email Templates</h1>
</div>
<section class="content">
    <div class="row">
        <div class="col-md-3">
            <?php echo $__env->make('settings.partials._menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">Email Templates</div>
            <div class="panel-body">
                <div class="col-md-10">
                    <?php if(count($errors) > 0): ?>
                    <?php echo form_errors($errors); ?>

                    <?php endif; ?>
                    <?php if(Session::has('flash_notification.message')): ?>
                    <?php echo message(); ?>

                    <?php endif; ?>

                    <?php if($template): ?>
                    <?php echo Form::model($template, ['route' => ['settings.templates.update', $template->id], 'method'=>'PATCH', 'files'=>true]); ?>

                    <?php else: ?>
                    <?php echo Form::open(['route' => ['settings.templates.store'], 'files'=>true]); ?>

                    <?php endif; ?>
                    <div class="form-group">
                        <?php echo Form::label('name', 'Template'); ?>

                        <?php echo Form::select('name', array('invoice' => 'Invoice Template',
                        'estimate' => 'Estimate Template'),
                        $select, ['class' => 'form-control chosen', 'id'=>'template_select']); ?>

                    </div>
                    <div class="form-group">
                    <?php echo Form::label('subject', 'Subject'); ?>

                    <?php echo Form::text('subject', null, ['class' => 'form-control']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('body', 'Email Body'); ?>

                        <?php echo Form::textarea('body', null, ['class' => 'form-control', 'id'=>'email_template', 'rows' => '20']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::submit('save',['class' => 'btn btn-success']); ?>

                    </div>
                    <?php echo Form::close(); ?>

                </div>
                <div class="col-md-2 tags">
                    <label><b>Invoice Tags</b></label><br>
                    {invoice_number}<br>
                    {invoice_amount}<br>
                    {invoice_logo}<br><br>
                    <label><b>Client Tags</b></label><br>
                    {client_name}<br>
                    {client_email}<br>
                    {client_number}<br><br>
                   <label><b>Company Tags</b></label><br>
                    {company_name}<br>
                    {company_email}<br>
                    {company_website}<br>
                    {contact_person}<br><br>
                    <label><b>Users Tags</b></label><br>
                    {username}<br>
                    {password}<br>
                    {login_link}<br>
                </div>
                </div>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script>
    $('#email_template').wysihtml5({image:false,link:false});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>