<?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">
					<?php echo $offers->name; ?> - Edit Offer
					<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/offers/update'); ?>" enctype="multipart/form-data" method="POST" role="form" class="form form-horizontal">
					
					<input name="offerid" type="text" hidden  style="display: none"  value="<?php echo $offers->id; ?>"  required class="form-control"  />

					<div class="form-group">
						<label class="col-sm-2 control-label">Hotel:</label>
						<div class="col-sm-8">
							<select class="name_search form-control" name="offerhotel" data-validation="required" required data-validation-error-msg="Please make a choice">

								<option value="<?php echo $offers->hotels_id; ?>"><?php echo $offers->hotels_id; ?></option>
								<?php foreach($hotels as $hotel): ?>
								<option value="<?php echo $hotel->id; ?>"><?php echo $hotel->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="offername" type="text" value="<?php echo $offers->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="offerseoslug" type="text" value="<?php echo $offers->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="offerseotitle" type="text" value="<?php echo $offers->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="offerseokeywords" type="text" value="<?php echo $offers->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="offerseodescription" type="text" value="<?php echo $offers->seo_description; ?>" required class="form-control"  />
						</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="offercategories[]"  multiple='multiple'>
                <?php foreach($offerscategories 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" name="offercontent">
						<?php echo $offers->content; ?>

					</textarea>
					</div>
					
					</div>

					            <div class="form-group">
            					<label class="col-sm-2 control-label">Expiry Date:</label>
					                <div class="col-sm-8">
					                  
					                  <input type="text" class="form-control" name="offerexpiry" value="<?php echo $offers->expiry_date; ?>" id="datepicker" data-provide="datepicker">
					                </div>
        					    </div>


					<div class="form-group">
            <div class="toggle-switch">
              <label class="col-sm-2 control-label">Status:</label>
              <div class="col-sm-8">
                <input type="checkbox" id="toggle-switcha" name="hotelstatus" value="" checked>
                <div class="toggle">
                  <label for="toggle-switcha"><i></i>
                  </label>
                </div>
              </div>
            </div>
          </div>

          <div class="form-group">
					<label class="col-sm-2 control-label" for="inline-suggestions"></label>
						<div class="col-sm-8">
						<img src="<?php echo URL('/media/uploads/images/hotel/size/263x197/'.$offers->featured_image.''); ?>">
						</div>
					</div>


          				<div class="form-group">
			            <label class="col-sm-2 control-label" for="inline-suggestions"></label>
			            <div class="col-sm-8">
			                                 <span class="btn btn-default btn-file"><span class="fileupload-new">Select Thumbnail</span><span class="fileupload-exists">Change</span><input name="file" id="file" type="file"></span>
			            </div>
			        </div>

			        <div class="form-group">
						<label class="col-sm-2 control-label" for="inline-suggestions">Price:</label>
						<div class="col-sm-8">
							<input name="offerprice" type="number" value="<?php echo $offers->price; ?>" class="form-control"  />
						</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(); ?>