<?php $__env->startSection('content'); ?>
<div class="content" id="content">

  <div class="overlay"></div>     
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

  <!-- main content -->
  <div class="main-content">


    <!-- panel -->

    <div class="panel panel-piluku">
      <div class="panel-heading">
        <h3 class="panel-title">
          Editing <?php echo $hotel->name; ?>

          <span class="panel-options">
            <a href="#" class="panel-refresh">
              <i class="icon ti-reload"></i>
            </a>
            <a href="#" class="panel-minimize">
              <i class="icon ti-angle-up"></i>
            </a>
            <a href="#" class="panel-close">
              <i class="icon ti-close"></i>
            </a>
          </span>
        </h3>
      </div>

<?php if(Session::has('error')): ?>
<div class="alert bg-danger text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>

<?php if(Session::has('success')): ?>
<div class="alert bg-success text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>




      <div class="panel-body">
        <form id="form-a" name="form-a" action="<?php echo URL('admin/updatehotel'); ?>" method="POST" role="form" class="form form-horizontal">
            <input name="hotelid" type="text" hidden style="display: none" value="<?php echo $hotel->id; ?>" required class="form-control"  />
          <div class="form-group">
            <label class="col-sm-2 control-label">Type:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="hoteltype" data-validation="required" required data-validation-error-msg="Please make a choice">
                <option value="<?php echo $hotel->type; ?>" selected><?php echo $hotel->type; ?></option>
                          <option value="resort">resort</option>
                          <option value="guesthouse">guesthouse</option>
                          <option value="cruise">cruise</option>
                          <option value="cityhotel">cityhotel</option>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">Brand:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="hotelbrand" data-validation="required" required data-validation-error-msg="Please make a choice">
                
               <option value="<?php echo $hotelbrand->id; ?>" selected><?php echo $hotelbrand->name; ?></option>
                <?php foreach($brands as $brand): ?>
                <option value="<?php echo $brand->id; ?>"><?php echo $brand->name; ?></option>
                <?php endforeach; ?>
              </select>
            </div>
          </div>

           <div class="form-group">
            <label class="col-sm-2 control-label">Destination:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" name="hoteldestination" data-validation="required" required data-validation-error-msg="Please make a choice">
                
               <option value="<?php echo $hoteldestination->id; ?>" selected><?php echo $hoteldestination->name; ?></option>
                <?php foreach($destinations as $destination): ?>
                <option value="<?php echo $destination->id; ?>"><?php echo $destination->name; ?></option>
                <?php endforeach; ?>
              </select>
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Name:</label>
            <div class="col-sm-8">
              <input name="hotelname" type="text" value="<?php echo $hotel->name; ?>"  required class="form-control"  />
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Hotel Slug(SEO)</label>
            <div class="col-sm-8">
              <input name="hotelslug" type="text"  value="<?php echo $hotel->seo_slug; ?>" required class="form-control"  />
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Hotel Title(SEO)</label>
            <div class="col-sm-8">
              <input name="hoteltitle" type="text"  value="<?php echo $hotel->seo_title; ?>" required class="form-control"  />
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Meta Keywords(SEO)</label>
            <div class="col-sm-8">
              <input name="hotelmetakeywords" type="text"  value="<?php echo $hotel->seo_keywords; ?>" required class="form-control"  />
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Meta Description(SEO)</label>
            <div class="col-sm-8">
              <input name="hotelmetadescription" type="text"  value="<?php echo $hotel->seo_description; ?>" required class="form-control"  />
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Address:</label>
            <div class="col-sm-8">
              <input name="hoteladdress" type="text"  value="<?php echo $hotel->address; ?>" required class="form-control"  />
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label" for="inline-suggestions">Geo Cordinates:</label>
            <div class="col-sm-8">
              <input name="hotelgeocordinates" type="text"  value="<?php echo $hotel->geo_cordinates; ?>" required class="form-control"  />
            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label">Rating:</label>
            <div class="col-sm-8">
              <select class="name_search form-control" required name="hotelrating" data-validation="required" data-validation-error-msg="Please make a choice">
                <option value=""> - - Choose - - </option>
                          <option value="<?php echo $hotel->rating; ?>" selected><?php echo $hotel->rating; ?></option>
                           <option value="7">7</option>
                          <option value="6">6</option>
                          <option value="5">5</option>
                          <option value="4">4</option>
                          <option value="3">3</option>
                          <option value="2">2</option>
                          <option value="1">1</option>

              </select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">Facilities:</label>
            <div class="col-md-6">
              <!-- xmulti select  -->
                <select id='hotelfacilities' name="hotelfacilities[]" required multiple='multiple'>
               <?php foreach($hotelfacilities as $facility): ?>
                  <option value='<?php echo $facility->id; ?>' selected><?php echo $facility->name; ?></option>
                <?php endforeach; ?>

                <?php foreach($facilities as $facility): ?>
                  <option value='<?php echo $facility->id; ?>'><?php echo $facility->name; ?></option>
                <?php endforeach; ?>
                </select>
                <!-- xmulti select  -->

            </div>
          </div>

          <div class="form-group">
            <label class="col-sm-2 control-label">Categories:</label>
            <div class="col-md-8">
              <!-- xmulti select  -->
                <select id='hotelcategories' name="hotelcategories[]" required multiple='multiple'>
                <?php foreach($hotelcategories as $category): ?>
                  <option value='<?php echo $category->id; ?>' selected><?php echo $category->name; ?></option>
                <?php endforeach; ?>


                <?php foreach($categories as $category): ?>
                  <option value='<?php echo $category->id; ?>'><?php echo $category->name; ?></option>
                <?php endforeach; ?>
                </select>
                <!-- xmulti select  -->

            </div>
          </div>

          <div class="form-group">
          <label class="col-sm-2 control-label">Content:</label>
          <div class="col-md-10">
          <textarea id="hotelcontent"  required name="hotelcontent"><?php echo $hotel->content; ?></textarea>
          </div>
          
          </div>
<div class="form-group">
            <div class="toggle-switch">
              <label class="col-sm-2 control-label">Status:</label>
              <div class="col-sm-8">
              <?php if($hotel->status == 1): ?>
                <input type="checkbox" id="toggle-switcha" name="hotelstatus" checked >
              <?php else: ?>
              <input type="checkbox" id="toggle-switcha" name="hotelstatus" >
              <?php endif; ?>
                <div class="toggle">
                  <label for="toggle-switcha"><i></i>
                  </label>
                </div>
              </div>
            </div>
          </div>



          
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
          <input type="submit" class="btn btn-success">
          <input type="reset" class="btn btn-danger">
        </div>
      </div>
    </form>
  </div>
</div>
<!-- /panel -->

</div>
<!-- /main content -->        
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>