<?php $__env->startSection('content'); ?>

<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1 class="pull-left">Settings</h1>
        <br>
        <br>
        <?php echo $__env->make('includes.messages', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box">
                    <div class="box-body">
                        <table id="userdetail" class="table table-bordered table-striped">
                            <thead>
                            <tr>

                                <th>Auto Accept Membership Program Request</th>
                                <th style='width:150px'>Action</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <?php if($merchant->outlet_mode =='Auto'): ?>
                                <td>
                                    <strong>ON</strong>
                                </td>
                                <?php else: ?>
                                <td>
                                    <strong>OFF</strong>
                                </td>
                                <?php endif; ?>
                                <td>
                                    <a href="<?php echo url('merchant/loyaltyedit'); ?>"><i class="fa fa-edit" ></i>Edit</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>


                    </div><!-- /.box -->
                </div>
            </div>
            </div><!--row ends for auto accept program-->
            <br><br>
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <center> <h3 class="box-title">Feedback Receipt Text To Display </h3></center>
                        </div>
                        <div class="box-body">
                            <?php echo Form::open(array('url'=>'merchant/referralText','method'=>'POST','role'=>"form",
                            'files'=>true,'id'=>'adds-add-form')); ?>

                            <div class="row">
                                <div class="col-md-8">
                                    <?php echo Form::textarea('feedback_text',$merchant->feedback_disply_text, ['size' => '80x3']); ?>

                                </div>
                                <div class="col-md-4">
                                </div>
                                <?php echo Form::submit('Update',array('class'=>'btn btn-primary','id'=>'submitbtn','style'=>'width: 150px;')); ?>

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

                        </div>
                    </div>
                </div>
            </div>
            <br>
            <br>
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <center> <h3 class="box-title">Text To Display on Card Details </h3></center>
                        </div>
                        <div class="box-body">
                            <?php echo Form::open(array('url'=>'merchant/carddisplay_text','method'=>'POST','role'=>"form",
                            'files'=>true,'id'=>'adds-add-form')); ?>

                            <div class="row">
                                <div class="col-md-8">
                                    <?php echo Form::textarea('cards_display_text',$merchant->credit_details_text, ['size' => '80x3']); ?>

                                </div>
                                <div class="col-md-4">
                                </div>
                                <?php echo Form::submit('Update',array('class'=>'btn btn-primary','id'=>'submitbtn','style'=>'width: 150px;')); ?>

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

                        </div>
                    </div>
                </div>
            </div>
            <br>
            <br>
            <?php echo Form::open(array('url'=>'merchant/updateSetting','method'=>'POST','role'=>"form",
            'files'=>true,'id'=>'adds-add-form')); ?>

            <div class="form-group">
                <div class="row">
                    <div class="col-md-6">
                        <div class="box box-primary">
                            <div class="box-header with-border">
                                <center> <h3 class="box-title">Add Credits </h3></center>
                            </div>
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-md-12">
                                        <?php echo Form::label('title', '1.Generate Bill Number Automatically',['style' => 'font-weight: 00;']); ?>

                                        <br> <br>
                                        &emsp;&emsp;&emsp;
                                        <?php if($merchant->auto_bill=='Yes'): ?>
                                        <?php echo Form::radio('autobill', 'Yes',True); ?>

                                        <?php else: ?>
                                        <?php echo Form::radio('autobill', 'Yes'); ?>

                                        <?php endif; ?>
                                        <?php echo Form::label('YES'); ?>

                                        &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;

                                        <?php if($merchant->auto_bill=='No'): ?>
                                        <?php echo Form::radio('autobill' , 'No',true); ?>

                                        <?php else: ?>
                                        <?php echo Form::radio('autobill' , 'No'); ?>


                                        <?php endif; ?>
                                        <?php echo Form::label('NO'); ?>


                                    </div>
                                </div>
                                <br>
                                <div class="row">
                                    <div class="col-md-12">
                                        <?php echo Form::label('title', '2.Allow edit to % for awarding credits on Merchant App',['class' => 'box-title']); ?>

                                        <br> <br>
                                        &emsp;&emsp;&emsp;
                                        <?php if($merchant->edit_award=='Yes'): ?>
                                        <?php echo Form::radio('edit_award', 'Yes',True); ?>

                                        <?php else: ?>
                                        <?php echo Form::radio('edit_award', 'Yes'); ?>

                                        <?php endif; ?>
                                        <?php echo Form::label('YES'); ?>

                                        &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;

                                        <?php if($merchant->edit_award=='No'): ?>
                                        <?php echo Form::radio('edit_award' , 'No',true); ?>

                                        <?php else: ?>
                                        <?php echo Form::radio('edit_award' , 'No'); ?>


                                        <?php endif; ?>
                                        <?php echo Form::label('NO'); ?>


                                    </div>
                                </div>
                                <br>
                                <div class="row">
                                    <div class="col-md-12">
                                        <?php echo Form::label('title', '3.Maximum %  allowed to be awarded in one transaction',['class' => 'box-title']); ?>

                                        <br>  &emsp;&emsp;&emsp;
                                        <?php echo Form::text('maxallow_award',$merchant->maxallow_award_trans,array('class' => 'required numericOnly form-control','id'=>'maxallow_award' ,'style'=>'width: 48px; margin-left: 47px;')); ?>


                                    </div>
                                </div>
                            </div><!--box-body-->
                        </div><!--box box-primar-->

                    </div>

                    <div class="col-md-6">
                        <div class="box box-primary">
                            <div class="box-header with-border">
                                <center> <h3 class="box-title">Redeem Credits </h3></center>
                            </div>
                            <div class="box-body">
                                <div class="row">
                                    <div class="col-md-12">
                                        <?php echo Form::label('title', '1.Minimum Balance required to redeem',['class' => 'box-title']); ?>

                                        <br>  &emsp;&emsp;&emsp;
                                        <?php echo Form::text('mimrequired_bal',$merchant->mim_balance_redeem,array('class' => 'required numericOnly form-control','id'=>'mimrequired_bal' ,'style'=>'width: 127px; margin-left: 47px;')); ?>



                                    </div>
                                </div>
                                <br>
                                <div class="row">
                                    <div class="col-md-12">
                                        <?php echo Form::label('title', '2.Maximum % of Bill amount allowed to be Redeemed ',['class' => 'box-title']); ?>

                                        <br>  &emsp;&emsp;&emsp;
                                        <?php echo Form::text('max_redeem_gbill',$merchant->max_redeem_gbill,array('class' => 'required numericOnly form-control','id'=>'max_redeem_gbill' ,'style'=>'width: 48px; margin-left: 47px;')); ?>



                                    </div>
                                </div>
                                <br>
                                <div class="row">

                                    <div class="col-md-12">


                                        <?php $__env->startSection('scripts'); ?>


                                        <script type="text/javascript">
                                            function myhides() {
                                                var x = document.getElementById('hideshow');
                                                if (x.style.display === 'block') {
                                                    x.style.display = 'none';
                                                    // document.getElementById('maxallow_redeem_trans').value = "";
                                                } else {
                                                    x.style.display = 'none';
                                                    // document.getElementById('maxallow_redeem_trans').value = "";
                                                }
                                            }
                                        </script>
                                        <script type="text/javascript">
                                            function ShowHideDiv() {
                                                var dvPassport = document.getElementById("hideshow");
                                                //document.getElementById('maxallow_redeem_trans').value =maxallow_redeem_trans.defaultValue;
                                                dvPassport.style.display = 'block';

                                            }
                                        </script>
                                        <?php $__env->stopSection(); ?>


                                        <?php echo Form::label('title', '3.Limit credits that can be redeemed in a single transaction',['class' => 'box-title']); ?>

                                        <br>
                                        &emsp;&emsp;&emsp;
                                        <?php if($merchant->limit_max_redeem =='Yes'): ?>
                                        <input type="radio" name="limit_max_redeem" checked="checked" value="Yes" onclick="ShowHideDiv()" />
                                        <?php else: ?>
                                        <input type="radio" name="limit_max_redeem" value="Yes" onclick="ShowHideDiv()" />
                                        <?php endif; ?>
                                        <?php echo Form::label('YES'); ?>

                                        &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;

                                        <?php if($merchant->limit_max_redeem=='No'): ?>
                                        <input type="radio" name="limit_max_redeem" checked="checked" value="No" onclick="myhides()" />
                                        <?php else: ?>
                                        <input type="radio" name="limit_max_redeem" value="No" onclick="myhides()" />

                                        <?php endif; ?>
                                        <?php echo Form::label('NO'); ?>




                                    </div>
                                </div>
                                <?php if($merchant->limit_max_redeem =='Yes'): ?>

                                <div id="hideshow">
                                    <div class="row">
                                        <div class="col-md-12">
                                            &emsp;&emsp;&emsp;

                                            <?php echo Form::text('maxallow_redeem_trans',$merchant->maxallow_redeem_trans,array('class' => 'required numericOnly form-control','id'=>'maxallow_redeem_trans' ,'style'=>'width: 127px; margin-left: 47px;')); ?>


                                        </div>
                                    </div>
                                </div>
                                <?php else: ?>
                                <div id="hideshow" style="display:none;">
                                    <div class="row">
                                        <div class="col-md-12">
                                            &emsp;&emsp;&emsp;

                                            <?php echo Form::text('maxallow_redeem_trans',$merchant->maxallow_redeem_trans,array('class' => 'required numericOnly form-control','id'=>'maxallow_redeem_trans' ,'style'=>'width: 127px; margin-left: 47px;')); ?>


                                        </div>
                                    </div>
                                </div>
                                <?php endif; ?>


                            </div><!--box-body-->
                        </div><!--box box-primar-->

                    </div>
                </div><!--row close for permission-->
                <br>
                <div class="row">
                    <div class="col-md-12" >


                        <center>  <?php echo Form::submit('Submit',array('class'=>'btn btn-primary','id'=>'submitbtn','style'=>'width: 317px;')); ?>  </center>
                    </div>
                </div>
           
            <?php echo Form::close(); ?>

            </div>

    </section><!-- /.content -->
</div><!--content wrapper-->

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