110 lines
5.0 KiB
PHP
110 lines
5.0 KiB
PHP
<div>
|
|
<div class="row mb-4">
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-start align-items-sm-center gap-4">
|
|
<img src="{{ asset(!empty($destination->image_path) ? 'storage/uploads/' . $destination->image_path : 'backend/uploads/images/no-Image.jpg') }}"
|
|
alt="destination-image input-file" class="d-block rounded show-image" height="100" width="100" />
|
|
<div class="button-wrapper">
|
|
<label for="upload" class="btn btn-primary me-2 mb-4" tabindex="0">
|
|
<span class="d-none d-sm-block">Upload</span>
|
|
<i class="bx bx-upload d-block d-sm-none"></i>
|
|
<input type="file" id="upload" class="input-file" name="image" hidden
|
|
accept="image/png, image/jpeg" />
|
|
</label>
|
|
<button type="button" class="btn btn-label-secondary image-reset mb-4">
|
|
<i class="bx bx-reset d-block d-sm-none"></i>
|
|
<span class="d-none d-sm-block">Reset</span>
|
|
</button>
|
|
<p class="mb-0">Allowed JPG, GIF or PNG. Max size of 3Mb</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="my-0" />
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="mb-3 col-md-6">
|
|
<label class="form-label" for="basic-default-name">Title</label>
|
|
<input type="text" class="form-control" name="title"
|
|
value="{{ old('title', $destination->title ?? '') }}" placeholder="e.g. 2 Days Italy Road Trip (Couple)"
|
|
required />
|
|
</div>
|
|
<div class="mb-3 col-md-6">
|
|
<label class="form-label" for="basic-default-company">Country</label>
|
|
<select id="select2Basic" class="select2 form-select form-select-lg" name="country_id"
|
|
data-allow-clear="true">
|
|
@foreach ($countries ?? [] as $country)
|
|
<option value="{{ $country->id }}"
|
|
{{ ($destination->country_id ?? '') == $country->id ? 'selected' : '' }}>{{ $country->name }}
|
|
</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
<div class="mb-3 col-md-6">
|
|
<label class="form-label" for="basic-default-company">Ordering</label>
|
|
<input class="form-control" type="number" name="ordering"
|
|
value="{{ old('ordering', $destination->ordering ?? '') }}" placeholder="e.g. 2" required />
|
|
</div>
|
|
|
|
<div class="mb-3 col-md-6">
|
|
<label class="form-label" for="basic-default-company">Rating</label><br>
|
|
<span class='rate'>
|
|
<input type="radio" id="star5" name="rating" value="5"
|
|
{{ old('rating', isset($destination) ? ($destination->rating == 5 ? 'checked' : '') : '') }} />
|
|
<label for="star5" title="5">5 stars</label>
|
|
|
|
<input type="radio" id="star4" name="rating" value="4"
|
|
{{ old('rating', isset($destination) ? ($destination->rating == 4 ? 'checked' : '') : '') }} />
|
|
<label for="star4" title="4">4 stars</label>
|
|
|
|
<input type="radio" id="star3" name="rating" value="3"
|
|
{{ old('rating', isset($destination) ? ($destination->rating == 3 ? 'checked' : '') : '') }} />
|
|
<label for="star3" title="3">3 stars</label>
|
|
|
|
<input type="radio" id="star2" name="rating" value="2"
|
|
{{ old('rating', isset($destination) ? ($destination->rating == 2 ? 'checked' : '') : '') }} />
|
|
<label for="star2" title="2">2 stars</label>
|
|
|
|
<input type="radio" id="star1" name="rating"
|
|
{{ old('rating', isset($destination) ? ($destination->rating == 1 ? 'checked' : '') : '') }} />
|
|
<label for="star1" title="1">1 star</label>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="mb-3 col-md-6 all-activities destination-activities"
|
|
data-total-activities="{{ json_encode($activities) }}"
|
|
data-destination-activities="{{ isset($destination->activities) ? json_encode($destination->activities) : '' }}">
|
|
<label class="form-label" for="basic-default-company">Activities List</label>
|
|
<input id="TagifyActivityList" name="activities[]" class="form-control" placeholder="select activity"
|
|
value="" />
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<button type="submit" class="btn btn-primary">
|
|
@if (empty($destination))
|
|
Save Destination
|
|
@else
|
|
Update Destination
|
|
@endif
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
@push('required-styles')
|
|
@include('admin::vendor.tagify.style')
|
|
@include('admin::vendor.select2.style')
|
|
@endpush
|
|
|
|
@push('required-scripts')
|
|
@include('admin::vendor.tagify.script')
|
|
@include('admin::vendor.select2.script')
|
|
@endpush
|