<?php $__env->startSection('title'); ?>
    BETLOADED | Promotions
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page'); ?>
    Email Promotion: Individual Mailer
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="col" style="min-height: 323px;;">
        <br>

        <?php if(isset($success)): ?>
            <script>
                alert('<?php echo e($success); ?>');
            </script>
        <?php endif; ?>

        <div class="row" style="margin-top: -20px;">
            <div class="col-sm-12">
                <a href="#" data-target="#demomail" data-toggle="modal"><button class="btn btn-md btn-danger pull-right">SEND DEMO MAIL</button></a><br>
            </div>
            <form method="POST" action="<?php echo e(url('/individualMail')); ?>" id="">
                <div class="col-md-12"><br>
                    <div class="form-group col-sm-12">
                        <label>MAIL RECIPIENTS <br><span class="text-danger">* TYPE RECIPIENT(S) EMAIL ADDRESS(ES) SEPARATED WITH SINGLE SPACE and not COMMA or FULL-STOP </span></label>
                        <textarea class="form-control" name="emails" required type="email"></textarea>
                    </div>
                    <div class="form-group col-sm-12">
                        <label>MAIL TITLE</label>
                        <input type="text" class="form-control" name="mailtitle" required placeholder="Title here">
                    </div>

                    <div class="form-group col-sm-12">
                        <label for="moreoption">MAIL CONTENT</label>
                        <textarea name="content" id="textarea" class="form-control textarea"></textarea>
                    </div>

                    <?php echo csrf_field(); ?>


                    <div id="bstatus" class="col-xs-6"></div>
                    <div class="form-group col-sm-12">
                        <hr style="margin: 15px;">
                        <small><strong>NB:</strong> Kindly note that sending this BC may take quite a while. Please do not refresh the page</small><br>
                        <button class="btn btn-md btn-success" name="submit" id="blogbtn">SEND MAIL</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div class="modal" id="demomail">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <a href="" data-dismiss="modal"><div class="pull-right"><span class="fa fa-times"></span></div></a>
                    <h5>SEND SAMPLE MAIL</h5>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-sm-12">
                            <?php
                            $mymail = Auth::user()->email;
                            ?>
                            <form action="#" id="demomailsender" method="post">
                                <div class="form-group col-sm-12">
                                    <input type="text" class="form-control" name="toref" required readonly value="<?php echo e($mymail); ?>">
                                </div>

                                <div class="form-group col-sm-12">
                                    <input type="text" name="title" placeholder="MAIL SUBJECT" required class="form-control">
                                </div>

                                <div class="form-group col-sm-12">
                                    <label for="moreoption">MAIL CONTENT</label>
                                    <textarea name="content" id="tetarea" class="form-control textarea"></textarea>
                                </div>

                                <div id="demostatus" class="col-xs-6"></div>

                                <?php echo e(csrf_field()); ?>

                                <div class="col-sm-12 form-group">
                                    <button class="btn btn-md btn-success" name="submit" id="demobtn">SEND DEMO</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer"></div>
            </div>
        </div>
    </div>

    <script>
        tinymce.init({
            selector:'.textarea',
            setup: function (editor) {
                editor.on('change', function () {
                    editor.save();
                });
            },
            forced_root_block : "",
            force_br_newlines : true,
            force_p_newlines : false,
            statusbar: false,
            height : 80

        });</script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>