<?php $__env->startSection('content'); ?>
    <div class="col-md-12 content-header" >
        <h1><i class="fa fa-envelope"></i> <?php echo e(trans('application.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="box box-primary">
                    <div class="box-body">
                        <div class="col-md-10">
                            <?php if(count($errors) > 0): ?>
                                <?php echo form_errors($errors); ?>
                            <?php endif; ?>
                            <?php if($template): ?>
                                <?php echo Form::model($template, ['route' => ['templates.update', $template->uuid], 'method'=>'PATCH', 'files'=>true]); ?>
                            <?php else: ?>
                                <?php echo Form::open(['route' => ['templates.store'], 'files'=>true]); ?>
                            <?php endif; ?>
                            <div class="form-group">
                                <?php echo Form::label('name', trans('application.template')); ?>
                                <?php echo Form::select('name', array('invoice' => 'Invoice Template','estimate' => 'Estimate Template'),
                                $select, ['class' => 'form-control chosen  input-sm', 'id'=>'template_select']); ?>
                            </div>
                            <div class="form-group">
                                <?php echo Form::label('subject', trans('application.subject')); ?>
                                <?php echo Form::text('subject', null, ['class' => 'form-control  input-sm']); ?>
                            </div>
                            <div class="form-group">
                                <?php echo Form::label('body', trans('application.email_body')); ?>
                                <?php echo Form::textarea('body', null, ['class' => 'form-control  input-sm', 'id'=>'email_template', 'rows' => '20']); ?>
                            </div>
                            <div class="form-group">
                                <?php echo Form::submit(trans('application.save'),['class' => 'btn btn-sm btn-primary']); ?>
                            </div>
                            <?php echo Form::close(); ?>
                        </div>
                        <div class="col-md-2 tags">
                            <label><b><?php echo e(trans('application.invoice_tags')); ?></b></label><br>
                            {invoice_number}<br>
                            {invoice_amount}<br>
                            {invoice_logo}<br><br>
                            <label><b><?php echo e(trans('application.client_tags')); ?></b></label><br>
                            {client_name}<br>
                            {client_email}<br>
                            {client_number}<br><br>
                            <label><b><?php echo e(trans('application.company_tags')); ?></b></label><br>
                            {company_name}<br>
                            {company_email}<br>
                            {company_website}<br>
                            {contact_person}<br><br>
                            <label><b><?php echo e(trans('application.users_tags')); ?></b></label><br>
                            {username}<br>
                            {password}<br>
                            {login_link}<br>
                        </div>
                        <div class="clearfix"></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(); ?>