hjkhghtjhjjhjhjhjhjjhjhjjhrrtrtoirh
bnmbertsurrttrtrtrtrjhjhjjhjhhjhjhjhf'tdfg
/
home
/
u506006416
/
public_html
/
public_html
/
travelsangi
/
resources
/
views
/
admin
/
products
/
Upload FileeE
HOME
@extends("layouts.admin_app") @section("pageTitle",' Package '.$ActionType) @section('MainContent') <form method="post" action="{{route('products.store')}}" enctype='multipart/form-data'> @csrf <input type="hidden" name="id" value="{{$product->id ?? ''}}"> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-0 text-gray-800">{{$ActionType}} Package Details</h1> <a href="{{route('products.index')}}" class="d-none d-sm-inline-block btn btn-sm btn-info shadow-sm"> <i class="fas fa-arrow-left fa-sm text-white-50"></i> All Package </a> </div> <div class="row"> <div class="card shadow mb-4" style="width: 100%;"> <div class="card-header py-3"><!-- <h6 class="m-0 font-weight-bold text-primary">{{$ActionType}} Package</h6> --> <ul class="nav nav-tabs nav-fill" role="tablist"> <li class="nav-item "> <a class="nav-link active" data-toggle="tab" href="#package_details" role="tab" aria-controls="package_details" aria-selected="true">Trip Package Details</a> </li> @if(isset($product->id)) <li class="nav-item type_1"> <a class="nav-link " data-toggle="tab" href="#Package_Option" role="tab" aria-controls="Package_Option" aria-selected="false"> Trip Itinerary </a> </li> @endif <li class="nav-item type_1"> <a class="nav-link " data-toggle="tab" href="#PackageGallery" role="tab" aria-controls="PackageGallery" aria-selected="false">Trip Gallery </a> </li> <li class="nav-item"> <a class="nav-link type_1" data-toggle="tab" href="#Package_Activity" role="tab" aria-controls="Package_Activity" aria-selected="false">Primary Activity</a> </li> <li class="nav-item"> <a class="nav-link type_1" data-toggle="tab" href="#Wild_Tour_Ideas" role="tab" aria-controls="Wild_Tour_Ideas" aria-selected="false">Wild Tour Ideas</a> </li> <li class="nav-item type_1"> <a class="nav-link" data-toggle="tab" href="#Package_package_FAQ" role="tab" aria-controls="Package_package_FAQ" aria-selected="false">FAQ</a> </li> <li class="nav-item type_1"> <a class="nav-link " data-toggle="tab" href="#Package_Review" role="tab" aria-controls="Package_Review" aria-selected="false"> Review</a> </li> <li class="nav-item"> <a class="nav-link type_1" data-toggle="tab" href="#Package_Policies" role="tab" aria-controls="Package_Policies" aria-selected="false"> Policies</a> </li> <li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#SEO" role="tab" aria-controls="SEO" aria-selected="false">SEO</a> </li> </ul> </div> <button type="submit" class="mt-2 d-none d-sm-inline-block btn btn-sm btn-success shadow-sm"> <i class="fas fa-save fa-sm text-white-50"></i> {{$ActionType}} Package </button> <div class="card-body tab-content" id="cardTabContent"> <!-- -----------------------------PACKAGE DETAILS START ----------------------- --> <div class="tab-pane active align-items-center" id="package_details"> <div class="row"> <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b>Package Details</b></h4> </div> <div class="col-md-4"> <label>Trip Package Name</label> <input type="text" onkeyup="generateSlug(this.value)" value="{{$product->title ?? old('title') ??''}}" required class="form-control" name="title" placeholder="Package Name"> @if ($errors->has('title')) <li class="errors-display">This Package Name is already exist</li> @endif </div> <div class="col-md-4"> <label>Trip Package URL</label> <input type="text" id="slugUrl" value="{{$product->slug ?? old('slug') ??''}}" required class="form-control" name="slug" placeholder="URL Name"> @if ($errors->has('slug')) <li class="errors-display">This Package slug is already exist</li> @endif </div> <div class="col-md-4"> <label>Package Status</label> <select class="form-control" name="status"> <option value="1" @if(isset($product->status)) @if($product->status == 1) selected @endif @endif> Active Package</option> <option value="2" @if(isset($product->status)) @if($product->status == 2) selected @endif @endif> De-active Package</option> </select> </div> <div class="col-md-4 mt-3"> <label> Trip Location Master</label> <select class="form-control" name="subcategory" onchange="getRelatedCityes(this.value)"> @forelse($subcategory as $key=>$value) @if($key == 0) <option>Select Trip Master</option> @endif <option value="{{$value->id}}" @if(isset($product->subcategory)) @if($product->subcategory == $value->id) selected @endif @endif>{{$value->title}} </option> @empty <option selected disabled>Trip Location Maste Not Available</option> @endforelse </select> </div> <div class="col-md-4 mt-3"> <label> Trip Location City</label> <select class="form-control" name="city" id="cityLocation" > @if(isset($CityLists)) @forelse ($CityLists as $key=>$value) <option value="{{$value->City_Name}}" @if(isset($product->city)) @if($product->city == $value->City_Name) selected @endif @endif>{{$value->City_Name}}</option> @empty <option selected disabled> Hotel Location City Available</option> @endforelse @else <option selected disabled>Select Hotel Location Master</option> @endif </select> </div> <div class="col-md-4 mt-3"> <label> Trip Location Areas</label> <select class="form-control" name="areas" id="cityLocationAreas" > @if(isset($AreasLists)) @forelse ($AreasLists as $key=>$value) <option value="{{$value->Location_Name}}" @if(isset($product->areas)) @if($product->areas == $value->Location_Name) selected @endif @endif>{{$value->Location_Name}}</option> @empty <option selected disabled> Hotel Location City Available</option> @endforelse @else <option selected disabled>Select Hotel Location Master</option> @endif </select> </div> <div class="col-md-2 mt-3"> <label>Price on Request</label> <select class="form-control" name="custome_price" onchange="addReadOnlyOnMRP(this.value)"> <option value="YES" @if(isset($product->custome_price)) @if($product->custome_price == 'YES') selected @endif @endif>Yes</option> <option value="NO" @if(isset($product->custome_price)) @if($product->custome_price == 'NO') selected @endif @endif>No</option> </select> </div> <div class="col-md-3 mt-3"> <label>Package MRP</label> <input type="number" step="0.01" @if(isset($product->custome_price)) @if($product->custome_price == 'YES') readonly @endif @endif pattern="^\d+(?:\.\d{1,2})?$" value="{{$product->mrp ?? old('mrp') ??''}}" required class="form-control" name="mrp" placeholder="Package MRP"> </div> <div class="col-md-3 mt-3"> <label>Package Price</label> <input type="number" step="0.01" @if(isset($product->custome_price)) @if($product->custome_price == 'YES') readonly @endif @endif pattern="^\d+(?:\.\d{1,2})?$" step="0.01" value="{{$product->price ?? old('price') ??''}}" required class="form-control" name="price" placeholder="Package Price"> </div> <div class="col-md-2 mt-3"> <label> Package Day</label> <select class="form-control" name="stockstatus" > @for($s=1;$s<31;$s++) <option value="{{$s}}" @if(isset($product->stockstatus)) @if($product->stockstatus == $s) selected @endif @endif> {{$s}} Day </option> @endfor </select> </div> <div class="col-md-2 mt-3" > <label>Package Night</label> <select class="form-control" name="quantity" > @for($sj=1;$sj<31;$sj++) <option value="{{$sj}}" @if(isset($product->quantity)) @if($product->quantity == $sj) selected @endif @endif> {{$sj}} Night </option> @endfor </select> </div> <div class="col-md-3 mt-3"> <label> Package Image</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrc').src = img;document.getElementById('ahref').href = img;" class="form-control" accept="image/*" name="image" placeholder="Category Image" @if(isset($product->image)) @else required @endif> @if ($errors->has('image')) <li class="errors-display">Package Main Image Is Required</li> @endif </div> <div class="col-md-1 mt-2"> <label class="invisible">Status</label> @if(isset($product->image)) <a href="{{asset('image/product/'.$product->image)}}" id="ahref" target="_blank"><img id="imagesrc" src="{{asset('image/product/'.$product->image)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahref" target="_blank"> <img id="imagesrc" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> <div class="col-md-3 mt-3"> <label>Package Banner</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrcb').src = img;document.getElementById('ahrefb').href = img;" class="form-control" accept="image/*" name="banner" placeholder="Banner Image"> </div> <div class="col-md-1 mt-1"> <label class="invisible">Status</label> @if(isset($product->banner)) <a href="{{asset('image/banner/'.$product->banner)}}" id="ahrefb" target="_blank"><img id="imagesrcb" src="{{asset('image/banner/'.$product->banner)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahrefb" target="_blank"> <img id="imagesrcb" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> <div class="col-md-2 mt-3" style="display:none"> <label>Show On Menu</label> <select class="form-control" name="onMenu"> <option value="1" @if(isset($product->onMenu)) @if($product->onMenu == 1) selected @endif @endif> Yes </option> <option value="2" @if(isset($product->onMenu)) @if($product->onMenu == 2) selected @endif @endif> No </option> </select> </div> <div class="col-md-2 mt-3"> <label>Total Rating</label> <input type="text" value="{{$product->rating ?? old('rating') ??''}}" required class="form-control" name="rating" placeholder="Total Rating"> </div> <div class="col-md-2 mt-3"> <label>Star Rating </label> <select class="form-control" name="star_no"> @for($sj=5;$sj>0;$sj--) <option value="{{$sj}}" @if(isset($product->star_no)) @if($product->star_no == $sj) selected @endif @endif> {{$sj}} Rating </option> @endfor </select> </div> <div class="col-md-12 mt-3" style="text-align:center"> <h4><b><?=strtoupper('Package Details')?></b></h4> </div> <div class="col-md-12 mt-3"> <label>Package Summery</label> <textarea class="form-control editor" name="summery">{{$product->summery ?? old('summery') ??''}}</textarea> </div> <div class="col-md-12 mt-3"> <label>Package Over view</label> <textarea class="form-control " id="editor" name="overiew">{{$product->overiew ?? old('overiew') ??''}}</textarea> </div> </div> </div> <div class="tab-pane align-items-center" id="PackageGallery"> <div class="row align-items-center" > <div class="col-md-12 mt-3" style="text-align:center"> <h4><b><?=strtoupper('Trip Images')?></b></h4> </div> <div class="col-md-2 mt-3"> <label>Gallery Image A</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrcbA').src = img;document.getElementById('ahrefbA').href = img;" class="form-control" accept="image/*" name="imageA" placeholder="Banner Image"> </div> <div class="col-md-1 mt-3"> @if(isset($product->imageA)) <a href="{{asset('image/product/'.$product->imageA)}}" id="ahrefbA" target="_blank"><img id="imagesrcbA" src="{{asset('image/product/'.$product->imageA)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahrefbA" target="_blank"> <img id="imagesrcbA" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> <div class="col-md-2 mt-3"> <label>Gallery Image B</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrcbB').src = img;document.getElementById('ahrefbB').href = img;" class="form-control" accept="image/*" name="imageB" placeholder="Banner Image"> </div> <div class="col-md-1 mt-3"> @if(isset($product->imageB)) <a href="{{asset('image/product/'.$product->imageB)}}" id="ahrefbB" target="_blank"><img id="imagesrcbB" src="{{asset('image/product/'.$product->imageB)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahrefbB" target="_blank"> <img id="imagesrcbB" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> <div class="col-md-2 mt-3"> <label>Gallery Image C</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrcC').src = img;document.getElementById('ahrefbc').href = img;" class="form-control" accept="image/*" name="imageC" placeholder="Banner Image"> </div> <div class="col-md-1 mt-3"> @if(isset($product->imageC)) <a href="{{asset('image/product/'.$product->imageC)}}" id="ahrefbc" target="_blank"><img id="imagesrcC" src="{{asset('image/product/'.$product->imageC)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahrefbc" target="_blank"> <img id="imagesrcC" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> <div class="col-md-2 mt-3"> <label>Gallery Image D</label> <input type="file" onchange="var img=window.URL.createObjectURL(this.files[0]);document.getElementById('imagesrcD').src = img;document.getElementById('ahrefbd').href = img;" class="form-control" accept="image/*" name="imageD" placeholder="Banner Image"> </div> <div class="col-md-1 mt-3"> @if(isset($product->imageD)) <a href="{{asset('image/product/'.$product->imageD)}}" id="ahrefbd" target="_blank"><img id="imagesrcD" src="{{asset('image/product/'.$product->imageD)}}" style="height:60px;width:60px;border-radius:50px"></a> @else <a href="{{asset('image/dymmy.jpg')}}" id="ahrefbd" target="_blank"> <img id="imagesrcD" src="{{asset('image/dymmy.jpg')}}" style="height:60px;width:60px;border-radius:50px"></a> @endif </div> </div> </div> <!-- -----------------------------PACKAGE DETAILS END ----------------------- --> <!-- -----------------------------PACKAGE OPTION START ----------------------- --> <div class="tab-pane align-items-center" id="Package_Option"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b> Trip Itinerary</b></h4> </div> @if(isset($product->stockstatus)) @if($product->ItineraryData) @php $allItrate = json_decode($product->ItineraryData,true); @endphp @endif @for($st=0;$st<$product->stockstatus;$st++) <div class="col-md-12 mt-2"> <label>Itinerary Title Day - {{$st+1}} </label> <input type="text" class="form-control" value="{{$allItrate[$st]['title'] ?? ''}}" name="ItineraryTitle[]" placeholder="Itinerary Title"> </div> <div class="col-md-12 mt-3"> <label>Itinerary Details Day - {{$st+1}} </label> <textarea class="form-control " id="ItineraryDetails{{$st}}" name="ItineraryDetails[]">{{$allItrate[$st]['details'] ?? ''}}</textarea> </div> @endfor @else <h5>Select Package Duration ( Days /Night)</h5> @endif </div> </div> <!-- -----------------------------PACKAGE OPTION END ----------------------- --> <!-- -----------------------------PACKAGE Activity START ----------------------- --> <div class="tab-pane align-items-center" id="Package_Activity"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b>Tour Primary Activities</b></h4> </div> @php $activityAll =[]; @endphp @if(isset($product->activity)) @if($product->activity) @php $activityAll = explode(",",$product->activity); @endphp @endif @endif @foreach($activity as $key=>$value) <div class="col-md-4"> <label><input type="checkbox" name="activity[]" value="{{$value->Activities_Name}}" @if(in_array($value->Activities_Name,$activityAll)) checked @endif > <img id="imagesrc" src="{{asset('admin/'.$value->Activities_Photo)}}" style="height:60px;width:60px;border-radius:50px"> {{$value->Activities_Name}}</label> </div> @endforeach </div> </div> <!-- -----------------------------PACKAGE Activity END ----------------------- --> <!-- -----------------------------PACKAGE Activity START ----------------------- --> <div class="tab-pane align-items-center" id="Wild_Tour_Ideas"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b>Tour Ides</b></h4> </div> @php $activityAll =[]; @endphp @if(isset($product->Tour_Name)) @if($product->Tour_Name) @php $activityAll = explode(",",$product->Tour_Name); @endphp @endif @endif @foreach($ideas as $key=>$value) <div class="col-md-4"> <label><input type="checkbox" name="Tour_Name[]" value="{{$value->Tour_Name}}" @if(in_array($value->Tour_Name,$activityAll)) checked @endif > <img id="imagesrc" src="{{asset('admin/'.$value->Tour_Photo)}}" style="height:60px;width:60px;border-radius:50px"> {{$value->Tour_Name}} </label> </div> @endforeach </div> </div> <!-- -----------------------------PACKAGE Activity END ----------------------- --> <!-- -----------------------------PACKAGE FAQ START ----------------------- --> <div class="tab-pane align-items-center" id="Package_package_FAQ"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b>FAQ</b></h4> </div> <div class="col-md-4 mt-3"> <label> Nearest Airport</label> <select class="form-control" name="airport"> <option>Select Nearest Airport </option> @foreach($Airports as $key=>$value) <option value="{{$value->Airport_Name}}" @if(isset($product->airport)) @if($product->airport == $value->Airport_Name) selected @endif @endif>{{$value->Airport_Name}}</option> @endforeach </select> </div> <div class="col-md-4 mt-3"> <label> Nearest Railway Station</label> <select class="form-control" name="railway" > <option>Select Nearest Railway Station</option> @foreach($Railwayes as $key=>$value) <option value="{{$value->Station_Name}}" @if(isset($product->railway)) @if($product->railway == $value->Station_Name) selected @endif @endif>{{$value->Station_Name}}</option> @endforeach </select> </div> @php $languageName =[]; @endphp @if(isset($product->language)) @if($product->language) @php $languageName = explode(",",$product->language); @endphp @endif @endif <div class="col-md-4 mt-3"> <label> Language</label> <select class="form-control" name="language[]" multiple> <option>Select Language</option> @foreach($Language as $key=>$value) <option value="{{$value->Language_Name}}" @if(isset($product->language)) @if(in_array($value->Language_Name,$languageName)) selected @endif @endif>{{$value->Language_Name}}</option> @endforeach </select> </div> <div class="col-md-12 mt-3"> <label>Package FAQ</label> <textarea class="form-control " id="package_FAQ" name="faq">{{$product->faq ?? old('faq') ??''}}</textarea> </div> </div> </div> <!-- -----------------------------PACKAGE FAQ END ----------------------- --> <!-- -------------------------SEO TABSE DATA -------------------- --> <div class="tab-pane align-items-center" id="SEO"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b> SEO DATA </b></h4> </div> <div class="col-md-12 mt-3"> <label>Meta title</label> <input type="text" value="{{$product->metaTitle ?? old('metaTitle') ?? ''}}" class="form-control" name="metaTitle" placeholder="Meta title"> </div> <div class="col-md-12 mt-3"> <label>Meta Keyword</label> <input type="text" value="{{$product->metaKeyword ?? old('metaKeyword') ?? ''}}" class="form-control" name="metaKeyword" placeholder="Meta Keyword"> </div> <div class="col-md-12 mt-3"> <label>Meta Description</label> <textarea class="form-control" name="metaDesc" placeholder="Meta Description">{{$product->metaDesc ?? old('metaDesc') ?? ''}}</textarea> </div> <div class="col-md-12 mt-3"> <label> Meta Script</label> <textarea class="form-control" name="metaScript" placeholder="Meta Script">{{$product->metaScript ?? old('metaScript') ?? ''}}</textarea> </div> </div> </div> <!-- -------------------------END SEO TABSE DATA -------------------- --> <!-- -----------------------------Package POLICIES START ----------------------- --> <div class="tab-pane align-items-center" id="Package_Policies"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b>Package Policy</b></h4> </div> <div class="col-md-12 mt-3"> <label>Package Policy</label> <textarea class="form-control " id="package_Policy" name="policies">{{$product->policies ?? old('policies') ??''}}</textarea> </div> </div> </div> <!-- -----------------------------Package POLICIES END ----------------------- --> <!-- --------------------------Package Review Start ------------------ --> <div class="tab-pane align-items-center" id="Package_Review"> <div class="row" > <div class="col-md-12 mt-3" style="text-align:center"> <h4> <b> Package Review </b></h4> </div> </div> @if(isset($product->id)) @php $otherDetails = json_decode($product->other_details,true); @endphp @if(is_array($otherDetails) && count($otherDetails) > 0) <div class="row mt-3" > <input type="hidden" value="{{count($otherDetails)}}" id="totlalAppend"> @foreach($otherDetails as $key=>$value) @if($key == 0) <div class="col-md-3"> <label>Review By</label> <input type="text" value="{{$value['title']}}" class="form-control" name="detailsTitle[]" placeholder="Review By"> </div> <div class="col-md-3"> <label>Reviews</label> <input type="text" value="{{$value['subtitle']}}" class="form-control" name="detailsSubTitle[]" placeholder="Reviews"> </div> <div class="col-md-5"> <label>Travel Details</label> <input type="text" value="{{$value['details']}}" class="form-control" name="detailsData[]" placeholder="Travel Details"> </div> <div class="col-md-1 mt-4"> <button type="button" class="btn btn-primary btn-sm mt-2" onclick="appendNewElement()"><i class="fa fa-plus"></i></button> </div> @else <div class="col-md-3 mt-4 current_row_class_{{$key}}"> <label>Review By</label> <input type="text" value="{{$value['title']}}" class="form-control" name="detailsTitle[]" placeholder="Review By"> </div> <div class="col-md-3 mt-4 "> <label>Reviews</label> <input type="text" value="{{$value['subtitle']}}" class="form-control" name="detailsSubTitle[]" placeholder="Reviews"> </div> <div class="col-md-5 mt-4 current_row_class_{{$key}}"> <label>Travel Details</label> <input type="text" value="{{$value['details']}}" class="form-control" name="detailsData[]" placeholder="Travel Details"> </div> <div class="col-md-1 mt-5 current_row_class_{{$key}}"> <button type="button" class="btn btn-danger btn-sm mt-2" onclick="removeRowById({{$key}})"><i class="fa fa-trash"></i></button> </div> @endif @endforeach </div> @else <div class="row mt-3" > <input type="hidden" value="0" id="totlalAppend"> <div class="col-md-3"> <label>Review By</label> <input type="text" value="" class="form-control" name="detailsTitle[]" placeholder="Review By"> </div> <div class="col-md-3"> <label>Reviews</label> <input type="text" value="" class="form-control" name="detailsSubTitle[]" placeholder="Reviews"> </div> <div class="col-md-5"> <label>Travel Details</label> <input type="text" value="" class="form-control" name="detailsData[]" placeholder="Travel Details"> </div> <div class="col-md-1 mt-4"> <button type="button" class="btn btn-primary btn-sm mt-2" onclick="appendNewElement()"><i class="fa fa-plus"></i></button> </div> </div> @endif @else <input type="hidden" value="0" id="totlalAppend"> <div class="row mt-3" > <div class="col-md-3"> <label>Review By</label> <input type="text" value="" class="form-control" name="detailsTitle[]" placeholder="Review By"> </div> <div class="col-md-3"> <label>Reviews</label> <input type="text" value="" class="form-control" name="detailsSubTitle[]" placeholder="Reviews"> </div> <div class="col-md-5"> <label>Travel Details</label> <input type="text" value="" class="form-control" name="detailsData[]" placeholder="Travel Details"> </div> <div class="col-md-1 mt-4"> <button type="button" class="btn btn-primary btn-sm mt-2" onclick="appendNewElement()"><i class="fa fa-plus"></i></button> </div> </div> @endif <div class="row mt-3" id="newRowAppend"> </div> </div> </div> <!-- --------------------------Package Review End ------------------ --> </div> </div> </div> </form> @endsection @section('MainCss') <link href="{{asset('admin/bootstrap/bootstrap.min.css')}}" rel="stylesheet"> <style type="text/css"> label{color: black !important;} .ck-editor__editable_inline { min-height: 300px; } .container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl { width: 98%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; padding: 1%; } </style> @endsection @section('MainJS') <script> ClassicEditor.create(document.querySelector('#editor')); ClassicEditor.create(document.querySelector('#package_option')); ClassicEditor.create(document.querySelector('#package_Policy')); ClassicEditor.create(document.querySelector('#package_FAQ')); </script> <script type="text/javascript"> function getSubCategory(catId){ $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url : "{{ route('getSubCategory') }}", data : {'catId' : catId}, type : 'POST', dataType : 'html', success : function(result){ $("#subcategorys").html(result); if(catId == 1 || catId ==2){ $(".type_1").css("display",'block'); }else{ $(".type_1").css("display",'none'); } } }); } </script> <script type="text/javascript"> function appendNewElement(){ var currentappend = parseInt($("#totlalAppend").val()); var newNumner = currentappend+1; $("#totlalAppend").val(newNumner); var appendElement = `<div class="col-md-3 current_row_class_${newNumner}"> <label>Review By</label> <input type="text" value="" class="form-control " name="detailsTitle[]" placeholder="Review By"> </div> <div class="col-md-3 current_row_class_${newNumner}"> <label>Reviews</label> <input type="text" value="" class="form-control " name="detailsSubTitle[]" placeholder="Reviews"> </div> <div class="col-md-5 current_row_class_${newNumner}"> <label>Travel Details</label> <input type="text" value="" class="form-control " name="detailsData[]" placeholder="Travel Details"> </div> <div class="col-md-1 mt-5 current_row_class_${newNumner}"> <button type="button" class="btn btn-danger btn-sm mt-2" onclick="removeRowById(${newNumner})"><i class="fa fa-trash"></i></button> </div> `; $("#newRowAppend").append(appendElement); } function removeRowById(row_ID){ $('.current_row_class_'+row_ID).remove(); } </script> @if(isset($product->id)) @else <script type="text/javascript"> $(document).ready(function(){ for (var i =0; i <= 3; i++) { appendNewElement(); } }); </script> @endif <script> function getRelatedCityes(tourId){ $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url : "{{ route('getAllTourCityList') }}", data : {'tourId' : tourId}, type : 'POST', dataType : 'html', success : function(result){ $("#cityLocation").html(result); } }); $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url : "{{ route('cityLocationAreas') }}", data : {'hotelId' : tourId}, type : 'POST', dataType : 'html', success : function(result){ $("#cityLocationAreas").html(result); } }); } </script> @if(isset($product->stockstatus)) @for($st=0;$st<$product->stockstatus;$st++) <script>ClassicEditor.create(document.querySelector("#ItineraryDetails{{$st}}"));</script> @endfor @endif <script> function addReadOnlyOnMRP(priceTyp){ if(priceTyp == 'YES'){ $("input[name='price']").attr('readonly',true).val(0); $("input[name='mrp']").attr('readonly',true).val(0); }else{ $("input[name='price']").attr('readonly',false); $("input[name='mrp']").attr('readonly',false); } } </script> @endsection