<div class="col-lg-10 col-md-10 col-sm-10 col-xs-10 bodyitem">
    <div  class="row no-padding">
        <fieldset>
            <div class="modal-header" style="margin-top: 10px;">
                <h5>Social And App Links</h5>
            </div>
            <div style="margin: 10px 0px;">&nbsp;</div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <?php echo form_open('gkpos/online/save_footer_links', array('id' => 'footer_link_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal')); ?>
                <div class="form-group">
                    <label class="col-md-4 control-label">Apple</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-apple" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_apple" id="footer_apple" class="form-control input-sm" value="<?php print $this->config->item('footer_apple') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Android</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-android" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_android" id="footer_android" class="form-control input-sm" value="<?php print $this->config->item('footer_android') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Instagram</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_instagram" id="footer_instagram" class="form-control input-sm" value="<?php print $this->config->item('footer_instagram') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Youtube</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-youtube-square" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_youtube" id="footer_youtube" class="form-control input-sm" value="<?php print $this->config->item('footer_youtube') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Facebook</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-facebook-square" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_facebook" id="footer_facebook" class="form-control input-sm" value="<?php print $this->config->item('footer_facebook') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Pinterest</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-pinterest-square " aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_pinterest" id="footer_pinterest" class="form-control input-sm" value="<?php print $this->config->item('footer_pinterest') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Googleplus</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-google-plus-square" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_googleplus" id="footer_googleplus" class="form-control input-sm" value="<?php print $this->config->item('footer_googleplus') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-4 control-label">Twitter</label>  
                    <div class="col-md-8">
                        <div class="input-group">
                            <span class="input-group-addon"><a href="#"><i class="fa fa-twitter-square" aria-hidden="true"></i></a></span>
                            <input  type="text" name="footer_twitter" id="footer_twitter" class="form-control input-sm" value="<?php print $this->config->item('footer_twitter') ?>">
                        </div>
                    </div>
                </div>
                <div class="form-group form-group-md">	
                    <div class="col-md-offset-4 col-md-8">
                        <?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>
                <?php echo form_close() ?>
            </div>
        </fieldset>
    </div>
</div>

<script type='text/javascript'>
    //validation and submit handling
    $(document).ready(function () {
        $('#footer_link_form').validate({
            submitHandler: function () {
                var myform = document.getElementById('footer_link_form');
                var formdata = new FormData(myform);
                $.ajax({
                    url: $('#footer_link_form').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);
                        }
                    }
                });
            }
        });
    });
</script>