Файловый менеджер - Редактировать - /home/c7lekhnath/silverray.com.au/oldsite/Modules/Property/resources/views/user/property/edit.blade.php
Назад
@extends('user.layout') @section('title') <title>{{ __('Edit Property') }}</title> @endsection @section('user-dashboard') <div class="wsus__dashboard_main_content"> <!-- language --> <div class="card my-4"> <div class="card-header py-3"> <h6 class="m-0 font-weight-bold text-primary">{{ __('Languages') }}</h6> </div> <div class="card-body"> <div class="lang_list_top"> <ul class="lang_list"> @foreach ($languages = allLanguages() as $language) <li> <a id="{{ request('code') == $language->code ? 'selected-language' : '' }}" href="{{ route('user.property.edit', ['property' => $property->id, 'code' => $language->code]) }}"><i class="fas {{ request('code') == $language->code ? 'fa-eye' : 'fa-edit' }}"></i> {{ $language->name }}</a> </li> @endforeach </ul> @if ($code !== $languages->first()->code) <button onclick="translateAll()" class="btn btn-sm btn-primary float-right" id="translate-btn">{{ __('Translate') }}</button> @endif </div> <div class="alert alert-danger" role="alert"> @php $current_language = $languages->where('code', request()->get('code'))->first(); @endphp <p>{{ __('Your editing mode') }} : <b>{{ $current_language?->name }}</b></p> </div> </div> </div> <form action="{{ route('user.property.update', $property->id) }}" method="POST" enctype="multipart/form-data"> @csrf @method('PUT') <input type="hidden" name="code" value="{{ $code }}"> <div class="wsus__add_property"> <h4 class="heading">{{ __('Edit Property') }} <a class="common_btn" href="{{ route('user.property-slider', $property->id) }}" title="Manage Slider"><i class="fa fa-images"></i> {{ __('Manage Slider') }}</a> <a class="common_btn" href="{{ route('user.property-nearest-location', $property->id) }}" title="Nearest Location"><i class="fas fa-map-marker-alt"></i> {{ __('Manage Nearest Location') }}</a> <a href="{{ route('user.property.index') }}" class="common_btn"><i class="fal fa-plus-octagon"></i> {{ __('All Properties') }}</a> </h4> <div class="wsus__dash_info p_25"> <div class="row"> <h5 class="sub_heading">{{ __('Basic Information') }}</h5> <div class="col-12 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Title') }} <span class="text-danger">*</span></label> <input type="text" data-translate="true" name="title" id="title" value="{{ $property->getTranslation($code)->title }}"> @error('title') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @if ($code == $languages->first()->code) <div class="col-12 col-md-6"> <div class="wsus__property_input"> <label for="#" for="slug">{{ __('Slug') }}<span class="text-danger">*</span></label> <input type="text" name="slug" id="slug" value="{{ $property->slug }}"> </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Property Type') }} <span class="text-danger">*</span></label> <select class="select_2" name="property_type_id" id="property_type"> <option value="">{{ __('Select Property Type') }}</option> @foreach ($propertyTypes as $propertyType) <option {{ $property->property_type_id == $propertyType->id ? 'selected' : '' }} value="{{ $propertyType->id }}"> {{ $propertyType->translation?->title }} </option> @endforeach </select> @error('property_type_id') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('City') }} <span class="text-danger">*</span></label> <select class="select_2" name="city_id"> <option value="">{{ __('Select City') }}</option> @foreach ($cities as $city) <option {{ $property->city_id == $city->id ? 'selected' : '' }} value="{{ $city->id }}"> {{ $city->title . ', ' . $city->countryState->title . ', ' . $city->countryState->country->title }} </option> @endforeach </select> @error('city_id') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @endif <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Address') }} <span class="text-danger">*</span></label> <input type="text" data-translate="true" name="address" value="{{ $property->getTranslation($code)->address }}"> @error('address') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @if ($code == $languages->first()->code) <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Phone') }}</label> <input type="text" name="phone" value="{{ $property->phone }}"> @error('phone') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Email') }} <span class="text-danger">*</span></label> <input type="email" name="email" value="{{ $property->email }}"> @error('email') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Website') }}</label> <input type="url" name="website" value="{{ $property->website }}"> @error('website') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Purpose') }} <span class="text-danger">*</span></label> <select class="select_2" name="property_purpose_id" id="purpose"> @foreach ($purposes as $purpose) <option {{ $property->property_purpose_id == $purpose->id ? 'selected' : '' }} value="{{ $purpose->id }}"> {{ $purpose->translation?->title }} </option> @endforeach </select> @error('property_purpose_id') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Price') }} <span class="text-danger">*</span></label> <input type="text" name="price" value="{{ $property->price }}"> @error('price') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @if ($property->property_purpose_id == 2) <div class="col-xl-6 col-md-6" id="period_box"> <div class="wsus__property_input"> <select class="select_2" name="period" id="period"> <option {{ $property->period == 'Daily' ? 'selected' : '' }} value="Daily"> {{ __('Daily') }}</option> <option {{ $property->period == 'Monthly' ? 'selected' : '' }} value="Monthly">{{ __('Monthly') }}</option> <option {{ $property->period == 'Yearly' ? 'selected' : '' }} value="Yearly"> {{ __('Yearly') }}</option> </select> @error('period') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @endif @if ($property->property_purpose_id == 1) <div class="col-xl-6 col-md-6 d-none" id="period_box"> <div class="wsus__property_input"> <select class="select_2" name="period" id="period"> <option {{ $property->period == 'Daily' ? 'selected' : '' }} value="Daily"> {{ __('Daily') }}</option> <option {{ $property->period == 'Monthly' ? 'selected' : '' }} value="Monthly">{{ __('Monthly') }}</option> <option {{ $property->period == 'Yearly' ? 'selected' : '' }} value="Yearly"> {{ __('Yearly') }}</option> </select> @error('period') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> @endif @endif </div> </div> @if ($code == $languages->first()->code) <div class="wsus__dash_info p_25 mt_25"> <div class="row"> <h5 class="sub_heading">{{ __('Others Information') }}</h5> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Area') }}({{ __('Square Feet') }}) <span class="text-danger">*</span></label> <input type="text" name="area" value="{{ $property->area }}"> @error('area') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Unit') }} <span class="text-danger">*</span></label> <input type="text" name="number_of_unit" value="{{ $property->number_of_unit }}"> @error('number_of_unit') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Room') }} <span class="text-danger">*</span></label> <input type="text" name="number_of_room" value="{{ $property->number_of_room }}"> @error('number_of_room') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Bedroom') }} <span class="text-danger">*</span></label> <input type="text" name="number_of_bedroom" value="{{ $property->number_of_bedroom }}"> @error('number_of_bedroom') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Bathroom') }} <span class="text-danger">*</span></label> <input type="text" name="number_of_bathroom" value="{{ $property->number_of_bathroom }}"> @error('number_of_bathroom') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Floor') }} <span class="text-danger">*</span></label> <input type="text" name="number_of_floor" value="{{ $property->number_of_floor }}"> @error('number_of_floor') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Kitchen') }}</label> <input type="text" name="number_of_kitchen" value="{{ $property->number_of_kitchen }}"> @error('number_of_kitchen') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('Total Parking Place') }}</label> <input type="text" name="number_of_parking" value="{{ $property->number_of_parking }}"> @error('number_of_parking') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> </div> </div> <div class="wsus__dash_info existing_item p_25 mt_25"> <div class="row justify-content-between"> <h5 class="sub_heading">{{ __('Image, PDF And Video') }}</h5> @if ($property->pdf_file) <div class="col-xl-6 col-xxl-5 col-md-6 pdf-file-col-{{ $property->id }}"> <div class="wsus__property_input file"> <label for="file">{{ __('Existing PDF') }}</label> <div class="my-2"> <a href="javascript:;" id="downloadLink" class="text-danger">{{ __('Download Existing File') }}</a> <a onclick="deletePdfFile('{{ $property->id }}')" href="javascript:;" class="text-danger custom-delete-icon"><i class="fa fa-trash " aria-hidden="true"></i> </a> </div> </div> </div> @endif <div class="col-xl-12 col-md-6"> <div class="wsus__property_input"> <label for="#">{{ __('PDF File') }}</label> <input type="file" name="pdf_file"> @error('pdf_file') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label>{{ __('Existing Banner') }}</label> <img src="{{ asset($property->banner_image) }}" alt="property" class="img-fluid w-100"> <label for="#">{{ __('Banner Image') }}</label> <input type="file" name="banner_image"> @error('banner_image') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> <label>{{ __('Existing Thumbnail') }}</label> <img src="{{ asset($property->thumbnail_image) }}" alt="property" class="img-fluid w-100"> <label for="#">{{ __('New Thumbnail Image') }}</label> <input type="file" name="thumbnail_image"> @error('thumbnail_image') <span class="text-danger">{{ $message }}</span> @enderror </div> </div> <div class="col-xl-6 col-md-6"> <div class="wsus__property_input"> @if ($property->video_link) <label>{{ __('Existing Video') }}</label> <iframe width="560" height="315" src="https://www.youtube.com/embed/{{ $property->video_link }}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> @endif <label class="mt-2" for="#">{{ __('Youtube Video Id') }}</label> <input type="text" name="video_link" value="{{ $property->video_link }}"> </div> </div> </div> </div> <div class="wsus__dash_info dash_aminities p_25 mt_25 pb_0"> <h5 class="sub_heading">{{ __('Amenities') }}</h5> <div class="row"> @foreach ($aminities as $aminity) @php $isChecked = false; $propertyAminities = Modules\Property\app\Models\PropertyAminity::where( 'property_id', $property->id, )->get(); @endphp @foreach ($propertyAminities as $amnty) @if ($aminity->id == $amnty->aminity_id) @php $isChecked = true; @endphp @endif @endforeach <div class="col-xl-4 col-sm-6 col-md-6 col-lg-4"> <div class="form-check"> <input class="form-check-input is-check" {{ $isChecked ? 'checked' : '' }} type="checkbox" name="aminities[]" id="aminityId-{{ $aminity->id }}" value="{{ $aminity->id }}"> <label class="form-check-label" for="aminityId-{{ $aminity->id }}"> {{ $aminity->translation?->title }} </label> </div> </div> @endforeach </div> </div> @php $aminityList = []; foreach ($aminities as $index => $aminity) { $aminityList[] = $aminity->id; } @endphp @endif <div class="wsus__dash_info pro_det_map p_25 mt_25"> @if ($code == $languages->first()->code) <h5 class="sub_heading">{{ __('Property Details And Google Map') }} </h5> @else <h5 class="sub_heading">{{ __('Property Details') }} </h5> @endif @if ($code == $languages->first()->code) <div class="wsus__property_input"> <label for="#">{{ __('Google Map Code') }}</label> <textarea cols="3" rows="3" name="google_map_embed_code">{{ $property->google_map_embed_code }}</textarea> @error('google_map_embed_code') <span class="text-danger">{{ $message }}</span> @enderror </div> @endif <div class="wsus__property_input"> <label for="#">{{ __('Description') }} <span class="text-danger">*</span></label> <textarea class="form-control summer_note summernote" data-translate="true" name="description">{{ $property->getTranslation($code)->description }}</textarea> @error('description') <span class="text-danger">{{ $message }}</span> @enderror </div> @if ($code != $languages->first()->code) <div class="wsus__property_input"> <button type="submit" id="update-btn" class="common_btn">{{ __('Update') }}</button> </div> @endif </div> @if ($code == $languages->first()->code) <div class="wsus__dash_info featured p_25 mt_25"> <div class="row"> @if ($subscription->is_featured) @if ($subscription->number_of_feature_property == -1) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Featured') }} <span class="text-danger">*</span></label> <select class="select_2" name="is_featured"> <option {{ $property->is_featured == 1 ? 'selected' : '' }} value="1"> {{ __('Yes') }}</option> <option {{ $property->is_featured == 0 ? 'selected' : '' }} value="0"> {{ __('No') }}</option> </select> </div> </div> @elseif($subscription->number_of_feature_property > $existFeaturedProperty) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Featured') }} <span class="text-danger">*</span></label> <select class="select_2" name="is_featured"> <option {{ $property->is_featured == 1 ? 'selected' : '' }} value="1"> {{ __('Yes') }}</option> <option {{ $property->is_featured == 0 ? 'selected' : '' }} value="0"> {{ __('No') }}</option> </select> </div> </div> @endif @endif @if ($subscription->is_top) @if ($subscription->number_of_top_property == -1) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Top Property') }} <span class="text-danger">*</span></label> <select class="select_2" name="top_property"> <option {{ $property->top_property == 1 ? 'selected' : '' }} value="1">{{ __('Yes') }}</option> <option {{ $property->top_property == 0 ? 'selected' : '' }} value="0">{{ __('No') }}</option> </select> </div> </div> @elseif($subscription->number_of_top_property > $existTopProperty) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Top Property') }} <span class="text-danger">*</span></label> <select class="select_2" name="top_property"> <option {{ $property->top_property == 1 ? 'selected' : '' }} value="1">{{ __('Yes') }}</option> <option {{ $property->top_property == 0 ? 'selected' : '' }} value="0">{{ __('No') }}</option> </select> </div> </div> @endif @endif @if ($subscription->is_urgent) @if ($subscription->number_of_urgent_property == -1) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Urgent Property') }} <span class="text-danger">*</span></label> <select class="select_2" name="urgent_property"> <option {{ $property->urgent_property == 1 ? 'selected' : '' }} value="1">{{ __('Yes') }}</option> <option {{ $property->urgent_property == 0 ? 'selected' : '' }} value="0">{{ __('No') }}</option> </select> </div> </div> @elseif($subscription->number_of_urgent_property > $existUrgentProperty) <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('Urgent Property') }} <span class="text-danger">*</span></label> <select class="select_2" name="urgent_property"> <option {{ $property->urgent_property == 1 ? 'selected' : '' }} value="1">{{ __('Yes') }}</option> <option {{ $property->urgent_property == 0 ? 'selected' : '' }} value="0">{{ __('No') }}</option> </select> </div> </div> @endif @endif <div class="col-12"> <div class="wsus__property_input"> <label for="#">{{ __('SEO Title') }}</label> <input type="text" name="seo_title" value="{{ $property->seo_title }}"> </div> </div> <div class="col-xl-12"> <div class="wsus__property_input"> <label for="#">{{ __('SEO Description') }}</label> <textarea cols="3" rows="3" name="seo_description">{{ $property->seo_description }}</textarea> </div> </div> <div class="col-12"> <button type="submit" class="common_btn">{{ __('Update') }}</button> </div> </div> </div> @endif </div> </form> </div> <form id="downloadForm" action="{{ route('user.download-property-file') }}" method="POST" style="display: none;"> @csrf <input type="hidden" name="id" value="{{ $property->id }}"> </form> @endsection @if ($code == $languages->first()->code) @push('js') <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'); } }); $('#downloadLink').on('click', function(event) { event.preventDefault(); // Prevent the default link behavior $('#downloadForm').submit(); // Submit the form }); tinymce.init({ selector: '.summernote', toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat', tinycomments_mode: 'embedded', tinycomments_author: 'Author name', mergetags_list: [{ value: 'First.Name', title: 'First Name' }, { value: 'Email', title: 'Email' }, ] }); }); })(jQuery); function convertToSlug(Text) { return Text .toLowerCase() .replace(/[^\w ]+/g, '') .replace(/ +/g, '-'); } function deletePdfFile(id) { // project demo mode check var isDemo = "{{ env('APP_MODE') ?? 'LIVE' }}" var demoNotify = "{{ __('This Is Demo Version. You Can Not Change Anything') }}" if (isDemo == 'DEMO') { toastr.error(demoNotify); return; } // end $.ajax({ type: 'GET', url: "{{ url('user/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); } }); } </script> @endpush @else @push('js') <script> "use strict"; var isTranslatingInputs = true; function translateOneByOne(inputs, index = 0) { if (index >= inputs.length) { if (isTranslatingInputs) { isTranslatingInputs = false; translateAllTextarea(); } $('#translate-btn').prop('disabled', false); $('#update-btn').prop('disabled', false); return; } var $input = $(inputs[index]); var inputValue = $input.val(); if (inputValue) { $.ajax({ url: "{{ route('user.languages.update.single') }}", type: "POST", data: { lang: '{{ $code }}', text: inputValue, _token: '{{ csrf_token() }}' }, dataType: 'json', beforeSend: function() { $input.prop('disabled', true); iziToast.show({ timeout: false, close: true, theme: 'dark', icon: 'loader', iconUrl: 'https://hub.izmirnic.com/Files/Images/loading.gif', title: "{{ __('Translation Processing, please wait...') }}", position: 'center', }); }, success: function(response) { $input.val(response); if ($input.hasClass('summernote')) { console.log($input); var inputId = $input.attr('id'); tinymce.get(inputId).setContent(response); } $input.prop('disabled', false); iziToast.destroy(); toastr.success("{{ __('Translated Successfully!') }}"); translateOneByOne(inputs, index + 1); }, error: function(jqXHR, textStatus, errorThrown) { console.error(textStatus, errorThrown); iziToast.destroy(); toastr.error('Error', 'Error'); } }); } else { translateOneByOne(inputs, index + 1); } } function translateAll() { iziToast.question({ timeout: 20000, close: false, overlay: true, displayMode: 'once', id: 'question', zindex: 999, title: "{{ __('This will take a while!') }}", message: "{{ __('Are you sure?') }}", position: 'center', buttons: [ ["<button><b>{{ __('YES') }}</b></button>", function(instance, toast) { var isDemo = "{{ env('APP_MODE') ?? 'LIVE' }}"; if (isDemo == 'DEMO') { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); toastr.error( "{{ __('This Is Demo Version. You Can Not Change Anything') }}"); return; } $('#translate-btn').prop('disabled', true); $('#update-btn').prop('disabled', true); instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); var inputs = $('input[data-translate="true"]').toArray(); translateOneByOne(inputs); }, true], ["<button>{{ __('NO') }}</button>", function(instance, toast) { instance.hide({ transitionOut: 'fadeOut' }, toast, 'button'); }], ], onClosing: function(instance, toast, closedBy) {}, onClosed: function(instance, toast, closedBy) {} }); }; function translateAllTextarea() { var inputs = $('textarea[data-translate="true"]').toArray(); if (inputs.length === 0) { return; } translateOneByOne(inputs); } $(document).ready(function() { var selectedTranslation = $('#selected-language').text(); var btnText = "{{ __('Translate to') }}" + selectedTranslation; $('#translate-btn').text(btnText); }); </script> @endpush @endif
| ver. 1.4 |
Github
|
.
| PHP 8.3.20 | Генерация страницы: 0.41 |
proxy
|
phpinfo
|
Настройка