<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10 bodyitem">
    <div class="row no-padding">
        <?php echo form_open('gkpos/settings/save_restaurant_setup/', array('id' => 'restaurantSetupForm', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal')); ?>
        <fieldset>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_table_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_table" id="gk_order_table1" value="yes" <?php ($this->config->item('gk_order_table') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_table" id="gk_order_table2" value="no" <?php ($this->config->item('gk_order_table') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_bar_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_bar" id="gk_order_bar1" value="yes" <?php ($this->config->item('gk_order_bar') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_bar" id="gk_order_bar2" value="no" <?php ($this->config->item('gk_order_bar') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_delivery_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_delivery" id="gk_order_delivery1" value="yes" <?php ($this->config->item('gk_order_delivery') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_delivery" id="gk_order_delivery2" value="no" <?php ($this->config->item('gk_order_delivery') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_collection_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_collection" id="gk_order_collection1" value="yes" <?php ($this->config->item('gk_order_collection') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_collection" id="gk_order_collection2" value="no" <?php ($this->config->item('gk_order_collection') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_waiting_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_waiting" id="gk_order_waiting1" value="yes" <?php ($this->config->item('gk_order_waiting') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_waiting" id="gk_order_waiting2" value="no" <?php ($this->config->item('gk_order_waiting') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase"><?php echo $this->lang->line('gkpos_run_online_app') ?></label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_online" id="gk_order_waiting1" value="yes" <?php ($this->config->item('gk_order_online') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_order_online" id="gk_order_waiting2" value="no" <?php ($this->config->item('gk_order_online') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-sm">	
                <label for="radio-inline" class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label text-uppercase">Only Online Admin</label>
                <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_only_online_admin" id="gk_order_waiting1" value="yes" <?php ($this->config->item('gk_only_online_admin') == "yes") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_yes') ?></label>
                    <label class="radio-inline text-uppercase required"><input type="radio" name="gk_only_online_admin" id="gk_order_waiting2" value="no" <?php ($this->config->item('gk_only_online_admin') == "no") ? print "checked" : '' ?> ><?php echo $this->lang->line('gkpos_no') ?></label>
                </div>
            </div>
            <div class="form-group form-group-md">	
                <div class="col-md-offset-2 col-md-7">
                    <ul id="restaurantSetupFormError" class="error_message_box"></ul>
                    <?php
                    echo form_submit(array(
                        'name' => 'submit_form',
                        'id' => 'submit_form',
                        'value' => $this->lang->line('gkpos_numpad_key_enter'),
                        'class' => 'btn btn-block btn-danger round btn-sm'));
                    ?>
                </div>
            </div>
        </fieldset>
        <?php echo form_close(); ?>
    </div>
    <script type='text/javascript'>
        $(document).ready(function () {
            $('#restaurantSetupForm').validate({
                submitHandler: function () {
                    var myform = document.getElementById('restaurantSetupForm');
                    var formdata = new FormData(myform);
                    $.ajax({
                        url: $('#restaurantSetupForm').attr('action'),
                        data: formdata,
                        cache: false,
                        processData: false,
                        contentType: false,
                        type: 'POST',
                        dataType: 'json',
                        success: function (response) {
                            if (response.success) {
                                ALERT_TITLE = "Success!";
                                alert(response.message);

                            } else {
                                ALERT_TITLE = "Error!";
                                alert(response.message);
                            }
                        },
                    });
                },
                errorClass: "has-error",
                errorLabelContainer: "#restaurantSetupFormError",
                wrapper: "li",
                highlight: function (e) {
                    $(e).closest('.form-group').addClass('has-error');
                },
                unhighlight: function (e) {
                    $(e).closest('.form-group').removeClass('has-error');
                },
                rules: {
                    gk_order_table: "required",
                    gk_order_bar: "required",
                    gk_order_delivery: "required",
                    gk_order_collection: "required",
                    gk_order_waiting: "required",
                    gk_order_online: "required",
                },
                messages: {
                    gk_order_table: "Please specify Table App status",
                    gk_order_bar: "Please specify Bar App status",
                    gk_order_delivery: "Please specify Delivery App status",
                    gk_order_collection: "Please specify Collection App status",
                    gk_order_waiting: "Please specify Waiting App status",
                    gk_order_online: "Please specify Online App status",
                }
            });
        });
    </script>
</div>