<?php $this->view("includes/Inc_pagehead");?>
<!-- Page Styles Goes Here-->

<?php $this->view("includes/Inc_navigation");?>
<div class="m-grid__item m-grid__item--fluid m-wrapper">
  <!-- BEGIN: Subheader -->
  <div class="m-subheader ">
    <div class="d-flex align-items-center">
      <div class="mr-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          App Configuration
        </h3>
        <ul class="m-subheader__breadcrumbs m-nav m-nav--inline">
          <li class="m-nav__item m-nav__item--home">
            <a href="#" class="m-nav__link m-nav__link--icon">
              <i class="m-nav__link-icon la la-home"></i>
            </a>
          </li>
          <li class="m-nav__separator">
            -
          </li>
          <li class="m-nav__item">
            <a href="<?php echo $this->session->userdata("dashboard_link")?>" class="m-nav__link">
              <span class="m-nav__link-text">
                Home
              </span>
            </a>
          </li>
          <li class="m-nav__separator">
            -
            <li class="m-nav__item">
              <a href="#" class="m-nav__link">
                <span class="m-nav__link-text">
                  Settings
                </span>
              </a>
            </li>
            <li class="m-nav__separator">
              -
            </li>
            <li class="m-nav__item">
              <a href="#" class="m-nav__link">
                <span class="m-nav__link-text">
                  App Configuration
                </span>
              </a>
            </li>


          </ul>
        </div>
        <div>

        </div>
      </div>
    </div>
    <!-- END: Subheader -->
    <div class="m-content" id="form_div">
      <div class="row">
        <div class="col-lg-12">
          <!--begin::Portlet-->
          <div class="m-portlet">
            <div class="m-portlet__head">
              <div class="m-portlet__head-caption">
                <div class="m-portlet__head-title">
                  <span class="m-portlet__head-icon m--hide">
                    <i class="la la-gear"></i>
                  </span>
                  <h3 class="m-portlet__head-text">
                  App Configurations
                  </h3>
                </div>
              </div>
            </div>
            <!--begin::Form-->
            <form autocomplete="off" class="m-form m-form--label-align-right" action="<?php echo base_url().'settings/update' ?>" method="post">
              <div class="m-portlet__body">
                <div class="m-form__section m-form__section--first">
                  <div class="m-form__heading">
                    <h3 class="m-form__heading-title">

                    </h3>
                  </div>
                  <div class="form-group m-form__group row">
                    <label class="col-lg-4 col-form-label">
                      Calendar Date Selection Restriction:
                    </label>
                    <div class="col-lg-6">
                      <div >
                        <span style="width: 400px" class="m-bootstrap-switch m-bootstrap-switch--pill m-bootstrap-switch--air">
                          <input id="calendar_date_restriction" style="width: 400px" name="calendar_date_restriction" data-switch="true" type="checkbox" data-on-color="success" data-off-color="danger" data-on-text="Enabled" data-off-text="Disabled" >
                        </span>
                      </div>
                      <span class="m-form__help">
                        If this Enabled, Users except Admin Will only allowed to select Current Date in All Datepicker Forms
                      </span>
                    </div>
                  </div>
                </div>

              </div>
              <div class="m-portlet__foot m-portlet__foot--fit">
                <div class="m-form__actions m-form__actions">
                  <div class="row">
                    <div class="col-lg-4"></div>
                    <div class="col-lg-8">
                      <button type="submit" name="submit" class="btn btn-primary">
                        Submit
                      </button>
                      <button type="submit" name="submit" class="btn btn-secondary">
                        Cancel
                      </button>
                    </div>
                  </div>
                </div>
              </div>
            </form>
            <!--end::Form-->
          </div>
          <!--end::Portlet-->

          <!--end::Portlet-->
        </div>
      </div>
    </div>
  </div>
</div>
<!-- end:: Body -->
<!-- begin::Footer -->

<?php $this->view("includes/Inc_footer");?>
<!-- end::Footer -->
</div>
<!-- end:: Page -->

<?php $this->view("includes/Inc_sidebar");?>
<?php $this->view("includes/Inc_scripts");?>
<!--begin::Page Snippets -->



<script>
$("[data-switch=true]").bootstrapSwitch();
  var calendar_date_restriction_enabled= "<?php echo $this->config->item('User_calendar_date_restriction_enabled')?>";
  if(calendar_date_restriction_enabled==1){
    $('#calendar_date_restriction').bootstrapSwitch('state',true);
  }else{
    $('#calendar_date_restriction').bootstrapSwitch('state',false);
  }
</script>
<!--end::Page Snippets -->
<script>
$("#settings_menu").addClass('m-menu__item--open m-menu__item--expanded');
$("#settings_menu_2").addClass('m-menu__item--active');
</script>
