
<?php $__env->startSection('title'); ?>
<title><?php echo e(__('admin.Edit Property')); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin-content'); ?>
      <!-- Main Content -->
      <div class="main-content">
        <section class="section">
          <div class="section-header">
            <h1><?php echo e(__('admin.Edit Property')); ?></h1>
          </div>

          <div class="section-body property_box">
                <a href="<?php echo e(route('admin.property.index')); ?>" class="btn btn-primary"><i class="fas fa-list"></i> <?php echo e(__('admin.Property List')); ?></a>
                <div class="row mt-4">
                    <form action="<?php echo e(route('admin.property.update', $property->id)); ?>" method="POST" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PUT'); ?>
                        <div class="col-md-12">
                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Basic Information')); ?></h4>
                                    <hr>


                                    <div class="form-group">
                                        <label><?php echo e(__('admin.Property Agent')); ?><span class="text-danger">*</span></label>
                                        <select name="agent" id="" class="form-control select2">
                                            <option <?php echo e($property->user_id == 0 ? 'selected' : ''); ?> value="0"><?php echo e(__('admin.Own Property')); ?></option>
                                            <?php $__currentLoopData = $agents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $agent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option <?php echo e($property->user_id == $agent->id ? 'selected' : ''); ?> value="<?php echo e($agent->id); ?>"><?php echo e($agent->name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>


                                    <div class="form-group">
                                        <label for="title"><?php echo e(__('admin.Title')); ?><span class="text-danger">*</span></label>
                                        <input type="text" name="title" class="form-control" id="title" value="<?php echo e($property->title); ?>">
                                    </div>
                                    <div class="form-group">
                                        <label for="slug"><?php echo e(__('admin.Slug')); ?> <span class="text-danger">*</span></label>
                                        <input type="text" name="slug" class="form-control" id="slug" value="<?php echo e($property->slug); ?>">
                                    </div>

                                    <div class="row">

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="category"><?php echo e(__('admin.Property Type')); ?> <span class="text-danger">*</span></label>
                                                <select name="property_type" id="property_type" class="form-control select2">
                                                    <option value=""><?php echo e(__('admin.Select')); ?></option>
                                                    <?php $__currentLoopData = $propertyTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($property->property_type_id==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->type); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="city"><?php echo e(__('admin.City')); ?> <span class="text-danger">*</span></label>
                                                <select name="city" id="city" class="form-control select2">
                                                    <option value=""><?php echo e(__('admin.Select')); ?></option>
                                                    <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($property->city_id==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->name); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="address"><?php echo e(__('admin.Address')); ?> <span class="text-danger">*</span></label>
                                                <input type="text" name="address" value="<?php echo e($property->address); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="phone"><?php echo e(__('admin.Phone')); ?></label>
                                                <input type="text" name="phone" value="<?php echo e($property->phone); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="email"><?php echo e(__('admin.Email')); ?> <span class="text-danger">*</span></label>
                                                <input type="email" name="email" value="<?php echo e($property->email); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="website"><?php echo e(__('admin.Website')); ?></label>
                                                <input type="url" name="website" value="<?php echo e($property->website); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="purpose"><?php echo e(__('admin.Purpose')); ?> <span class="text-danger">*</span></label>
                                                <select name="purpose" id="purpose" class="form-control">
                                                    <?php $__currentLoopData = $purposes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($property->property_purpose_id==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->custom_purpose); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="price"><?php echo e(__('admin.Price')); ?> <span class="text-danger">*</span></label>
                                                <input type="text" name="price" class="form-control" value="<?php echo e($property->price); ?>">
                                            </div>
                                        </div>


                                        <?php if($property->property_purpose_id==1): ?>
                                            <div class="col-md-6 d-none period_box" >
                                                <div class="form-group">
                                                    <label for="period"><?php echo e(__('admin.Period')); ?> <span class="text-danger">*</span></label>
                                                    <select name="period" id="period" class="form-control">
                                                        <option value="Daily"><?php echo e(__('admin.Daily')); ?></option>
                                                        <option value="Monthly"><?php echo e(__('admin.Monthly')); ?></option>
                                                        <option value="Yearly"><?php echo e(__('admin.Yearly')); ?></option>
                                                    </select>
                                                </div>
                                            </div>
                                        <?php endif; ?>

                                        <?php if($property->property_purpose_id==2): ?>
                                            <div class="col-md-6 period_box" >
                                                <div class="form-group">
                                                    <label for="period"><?php echo e(__('admin.Period')); ?> <span class="text-danger">*</span></label>
                                                    <select name="period" id="period" class="form-control">
                                                        <option <?php echo e($property->period=='Daily' ? 'selected' : ''); ?> value="Daily"><?php echo e(__('admin.Daily')); ?></option>
                                                        <option <?php echo e($property->period=='Monthly' ? 'selected' : ''); ?> value="Monthly"><?php echo e(__('admin.Monthly')); ?></option>
                                                        <option <?php echo e($property->period=='Yearly' ? 'selected' : ''); ?> value="Yearly"><?php echo e(__('admin.Yearly')); ?></option>
                                                    </select>
                                                </div>
                                            </div>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>

                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Others Information')); ?></h4>
                                    <hr>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Area(Square Feet)')); ?> <span class="text-danger">*</span></label>
                                                <input type="text" name="area" value="<?php echo e($property->area); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Unit')); ?> <span class="text-danger">*</span></label>
                                                <input type="number" name="unit" value="<?php echo e($property->number_of_unit); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Room')); ?> <span class="text-danger">*</span></label>
                                                <input type="number" name="room" value="<?php echo e($property->number_of_room); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Bedroom')); ?> <span class="text-danger">*</span></label>
                                                <input type="number" name="bedroom" value="<?php echo e($property->number_of_bedroom); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Bathroom')); ?> <span class="text-danger">*</span></label>
                                                <input type="number" name="bathroom" value="<?php echo e($property->number_of_bathroom); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Floor')); ?> <span class="text-danger">*</span></label>
                                                <input type="number" name="floor" value="<?php echo e($property->number_of_floor); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Kitchen')); ?> </label>
                                                <input type="number" name="kitchen" value="<?php echo e($property->number_of_kitchen); ?>" class="form-control">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Total Parking Place')); ?></label>
                                                <input type="number" name="parking" value="<?php echo e($property->number_of_parking); ?>" class="form-control">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Slider Images')); ?> </h4>
                                    <hr>
                                    <div class="row">
                                        <div class="col-6">
                                            <table class="table table-bordered">
                                                <?php $__currentLoopData = $property->propertyImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <tr class="slider-tr-<?php echo e($item->id); ?>">
                                                    <td> <img class="w_300 mb-2" src="<?php echo e(asset($item->image)); ?>"  alt=""> </td>
                                                    <td><a onclick="deleteSliderImg('<?php echo e($item->id); ?>')" href="javascript:;" class="btn btn-danger"><i class="fas fa-trash    "></i></a></td>
                                                </tr>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                            </table>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Slider Images (Multiple)')); ?> <span class="text-danger">*</span></label>
                                                <input type="file" class="form-control-file" name="slider_images[]" multiple>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Image, PDF and Video')); ?></h4>
                                    <hr>
                                    <div class="row">

                                        <div class="col-md-12">

                                            <?php if($property->file): ?>
                                                <div class="form-group pdf-file-col-<?php echo e($property->id); ?>">
                                                    <label for="file"><?php echo e(__('admin.Existing PDF')); ?> : </label>
                                                    <div>
                                                        <a href="<?php echo e(route('download-listing-file',$property->file)); ?>"><?php echo e($property->file); ?></a> <a onclick="deletePdfFile('<?php echo e($property->id); ?>')" href="javascript:;" class="text-danger ml-3"><i class="fa fa-trash" aria-hidden="true"></i> </a>
                                                    </div>
                                                </div>
                                            <?php endif; ?>

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.PDF File')); ?></label>
                                                <input type="file" name="pdf_file" class="form-control-file">
                                            </div>
                                        </div>

                                        <div class="col-md-12">

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Existing Image')); ?></label>
                                                <br>
                                                <img class="w_300" src="<?php echo e(asset($property->banner_image)); ?>" alt="">
                                            </div>

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Bannner Image')); ?> <span class="text-danger">*</span></label>
                                                <input type="file" name="banner_image" class="form-control-file">
                                            </div>
                                        </div>
                                        <div class="col-md-12">

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Existing Image')); ?></label>
                                                <br>
                                                <img class="w_300" src="<?php echo e(asset($property->thumbnail_image)); ?>" alt="">
                                            </div>

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Thumbnail Image')); ?> <span class="text-danger">*</span></label>
                                                <input type="file" name="thumbnail_image" class="form-control-file">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Slider Images (Multiple)')); ?> <span class="text-danger">*</span></label>
                                                <input type="file" class="form-control-file" name="slider_images[]" multiple>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <?php if($property->video_link): ?>
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Existing Video')); ?></label>
                                                <br>

                                                <iframe width="300" height="150"
                                                src="https://www.youtube.com/embed/<?php echo e($property->video_link); ?>">
                                                </iframe>
                                            </div>
                                        <?php endif; ?>

                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Youtube Video Id')); ?></label>
                                                <input type="text" class="form-control" name="video_link" value="<?php echo e($property->video_link); ?>">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Aminities')); ?></h4>
                                    <hr>
                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <div>
                                                    <?php $__currentLoopData = $aminities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php
                                                            $isChecked=false;
                                                        ?>
                                                        <?php $__currentLoopData = $property->propertyAminities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $amnty): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <?php if($aminity->id==$amnty->aminity_id): ?>
                                                                <?php
                                                                $isChecked=true;
                                                                ?>
                                                            <?php endif; ?>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        <input id="<?php echo e($aminity->slug); ?>" <?php echo e($isChecked ? 'checked' :''); ?> value="<?php echo e($aminity->id); ?>" type="checkbox" name="aminities[]" >
                                                        <label class="mx-1" for="<?php echo e($aminity->slug); ?>"><?php echo e($aminity->aminity); ?></label>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </div>

                                            </div>

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

                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Nearest Locations')); ?></h4>
                                    <hr>
                                    <div class="row">
                                        <div class="col-8" id="nearest-place-box">

                                            <?php if($property->propertyNearestLocations->count()>0): ?>
                                                <?php $__currentLoopData = $property->propertyNearestLocations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $property_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <div class="row" id="exist-nearest-location-<?php echo e($property_item->id); ?>">
                                                        <div class="col-md-6">
                                                            <div class="form-group">
                                                                <label for=""><?php echo e(__('admin.Nearest Locations')); ?></label>
                                                                <select name="nearest_locations[]" id="" class="form-control">
                                                                    <option value=""><?php echo e(__('admin.Select')); ?></option>
                                                                    <?php $__currentLoopData = $nearest_locatoins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option <?php echo e($property_item->nearest_location_id==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->location); ?></option>
                                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-4">
                                                            <div class="form-group">
                                                                <label for=""><?php echo e(__('admin.Distance(km)')); ?></label>
                                                                <input type="text" class="form-control" name="distances[]" value="<?php echo e($property_item->distance); ?>">
                                                            </div>
                                                        </div>
                                                        <div class="col-md-2">
                                                            <button onclick="existNearestLocation('<?php echo e($property_item->id); ?>')" type="button" class="btn btn-danger nearest-row-btn plus_btn"><i class="fas fa-trash" aria-hidden="true"></i></button>
                                                        </div>
                                                    </div>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <?php endif; ?>

                                            <div class="row">
                                                <div class="col-md-6">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('admin.Nearest Locations')); ?></label>
                                                        <select name="nearest_locations[]" id="" class="form-control">
                                                            <option value=""><?php echo e(__('admin.Select')); ?></option>
                                                            <?php $__currentLoopData = $nearest_locatoins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($item->id); ?>"><?php echo e($item->location); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="form-group">
                                                        <label for=""><?php echo e(__('admin.Distance(km)')); ?></label>
                                                        <input type="text" class="form-control" name="distances[]">
                                                    </div>
                                                </div>
                                                <div class="col-md-2">
                                                    <button id="addNearestPlaceRow" type="button" class="btn btn-success nearest-row-btn plus_btn"><i class="fas fa-plus" aria-hidden="true"></i></button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div id="hidden-location-box" class="d-none">
                                <div class="delete-dynamic-location">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Nearest Locations')); ?></label>
                                                <select name="nearest_locations[]" id="" class="form-control">
                                                    <option value=""><?php echo e(__('admin.Nearest Locations')); ?></option>
                                                    <?php $__currentLoopData = $nearest_locatoins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($item->id); ?>"><?php echo e($item->location); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="form-group">
                                                <label for=""><?php echo e(__('admin.Distance(km)')); ?></label>
                                                <input type="text" class="form-control" name="distances[]">
                                            </div>
                                        </div>
                                        <div class="col-md-2">
                                            <button type="button" class="btn btn-danger nearest-row-btn removeNearestPlaceRow plus_btn"><i class="fas fa-trash" aria-hidden="true"></i></button>
                                        </div>
                                    </div>
                                </div>


                            </div>


                            <div class="card mb-4">
                                <div class="card-body">
                                    <h4><?php echo e(__('admin.Property Details and Google Map')); ?></h4>
                                    <hr>

                                    <div class="row">
                                        <div class="col">
                                            <div class="form-group">
                                                <label><?php echo e(__('admin.Google Map Code')); ?></label>
                                                <textarea class="form-control text-area-5" rows="5" name="google_map_embed_code"><?php echo e($property->google_map_embed_code); ?></textarea>
                                            </div>

                                            <div class="form-group mt-3">
                                                <label for="description"><?php echo e(__('admin.Description')); ?> <span class="text-danger">*</span></label>
                                                <textarea class="summernote" id="summernote" name="description"><?php echo e($property->description); ?></textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="card mb-4">
                                <div class="card-body">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="status"><?php echo e(__('admin.Status')); ?> <span class="text-danger">*</span></label>
                                                <select name="status" id="status" class="form-control">
                                                    <option <?php echo e($property->status==1 ? 'selected' : ''); ?> value="1"><?php echo e(__('admin.Active')); ?></option>
                                                    <option <?php echo e($property->status==0 ? 'selected' : ''); ?> value="0"><?php echo e(__('admin.Inactive')); ?></option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="featured"><?php echo e(__('admin.Featured')); ?> <span class="text-danger">*</span></label>
                                                <select name="featured" id="featured" class="form-control">
                                                    <option <?php echo e($property->is_featured==0 ? 'selected': ''); ?> value="0"><?php echo e(__('admin.No')); ?></option>
                                                    <option <?php echo e($property->is_featured==1 ? 'selected': ''); ?> value="1"><?php echo e(__('admin.Yes')); ?></option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="top_property"><?php echo e(__('admin.Top Property')); ?> <span class="text-danger">*</span></label>
                                                <select name="top_property" id="top_property" class="form-control">
                                                    <option <?php echo e($property->top_property==1 ? 'selected' : ''); ?> value="1"><?php echo e(__('admin.Yes')); ?></option>
                                                    <option <?php echo e($property->top_property==0 ? 'selected' : ''); ?> value="0"><?php echo e(__('admin.No')); ?></option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="urgent_property"><?php echo e(__('admin.Urgent Property')); ?> <span class="text-danger">*</span></label>
                                                <select name="urgent_property" id="urgent_property" class="form-control">
                                                    <option <?php echo e($property->urgent_property==1 ? 'selected' : ''); ?> value="1"><?php echo e(__('admin.Yes')); ?></option>
                                                    <option <?php echo e($property->urgent_property==0 ? 'selected' : ''); ?> value="0"><?php echo e(__('admin.No')); ?></option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="seo_title"><?php echo e(__('admin.SEO Title')); ?></label>
                                                <input type="text" name="seo_title" class="form-control" id="seo_title" value="<?php echo e($property->seo_title); ?>">
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="seo_description"><?php echo e(__('admin.SEO Description')); ?></label>
                                                <textarea name="seo_description" id="seo_description" cols="30" rows="3" class="form-control text-area-5" ><?php echo e($property->seo_description); ?></textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <button class="btn btn-success"><?php echo e(__('admin.Save')); ?></button>
                                </div>
                            </div>

                        </div>
                    </form>
                </div>
          </div>
        </section>
      </div>





      <script>
        (function($) {
        "use strict";
        $(document).ready(function () {
            $("#title").on("focusout",function(e){
                $("#slug").val(convertToSlug($(this).val()));
            })

            $("#purpose").on("change",function(){
                var purposeId=$(this).val()
                if(purposeId==2){
                    $(".period_box").removeClass('d-none');
                }else if(purposeId==1){
                    $(".period_box").addClass('d-none');
                }
            })


             //start dynamic nearest place add and remove

             $("#addNearestPlaceRow").on("click",function(){
                var new_row=$("#hidden-location-box").html();
                $("#nearest-place-box").append(new_row)

            })
            $(document).on('click', '.removeNearestPlaceRow', function () {
                $(this).closest('.delete-dynamic-location').remove();
            });
            //end dynamic nearest place add and remove


        });

        })(jQuery);

        function convertToSlug(Text)
            {
                return Text
                    .toLowerCase()
                    .replace(/[^\w ]+/g,'')
                    .replace(/ +/g,'-');
            }

        function deleteSliderImg(id){

            var isDemo = "<?php echo e(env('PROJECT_MODE')); ?>"
            if(isDemo == 0){
                toastr.error('This Is Demo Version. You Can Not Change Anything');
                return;
            }

            $.ajax({
                type: 'GET',
                url: "<?php echo e(url('admin/property-slider-img/')); ?>"+"/"+ id,
                success: function (response) {
                    if(response.success){
                        toastr.success(response.success)
                        $(".slider-tr-"+id).remove()
                    }
                },
                error: function(err) {
                    console.log(err);
                }
            });
        }

        function deletePdfFile(id){

            var isDemo = "<?php echo e(env('PROJECT_MODE')); ?>"
            if(isDemo == 0){
                toastr.error('This Is Demo Version. You Can Not Change Anything');
                return;
            }

            $.ajax({
                type: 'GET',
                url: "<?php echo e(url('admin/property-delete-pdf/')); ?>"+"/"+ id,
                success: function (response) {
                    if(response.success){
                        toastr.success(response.success)
                        $(".pdf-file-col-"+id).remove()
                    }
                },
                error: function(err) {
                    console.log(err);
                }
            });
        }


        function existNearestLocation(id){

            var isDemo = "<?php echo e(env('PROJECT_MODE')); ?>"
            if(isDemo == 0){
                toastr.error('This Is Demo Version. You Can Not Change Anything');
                return;
            }

            $.ajax({
                type: 'GET',
                url: "<?php echo e(url('admin/exist-nearest-location/')); ?>"+"/"+ id,
                success: function (response) {
                    if(response.success){
                        toastr.success(response.success)
                        $("#exist-nearest-location-"+id).remove()
                    }
                },
                error: function(err) {
                    console.log(err);
                }
            });
        }
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.master_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/fwvrhhfw/topriserealtors.com/resources/views/admin/edit_property.blade.php ENDPATH**/ ?>