{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - http://codecanyon.net/licenses/standard --}} @extends('layouts.master') @section('wizard') @includeFirst([config('larapen.core.customizedViewPath') . 'post.createOrEdit.multiSteps.inc.wizard', 'post.createOrEdit.multiSteps.inc.wizard']) @endsection @php $postInput ??= []; $postTypes ??= []; $countries ??= []; @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
@includeFirst([config('larapen.core.customizedViewPath') . 'post.inc.notification', 'post.inc.notification'])

{{ t('create_new_listing') }}

{!! csrf_field() !!}
{{-- category_id --}}
@if (config('settings.single.show_listing_types')) {{-- post_type_id --}} @php $postTypeIdError = (isset($errors) && $errors->has('post_type_id')) ? ' is-invalid' : ''; $postTypeId = old('post_type_id', data_get($postInput, 'post_type_id')); @endphp
@foreach ($postTypes as $postType)
@endforeach
{{ t('post_type_hint') }}
@endif {{-- title --}}
{{ t('a_great_title_needs_at_least_60_characters') }}
{{-- description --}} @php $descriptionError = (isset($errors) && $errors->has('description')) ? ' is-invalid' : ''; $postDescription = data_get($postInput, 'description'); $descriptionErrorLabel = ''; $descriptionColClass = 'col-md-8'; if (config('settings.single.wysiwyg_editor') != 'none') { $descriptionColClass = 'col-md-12'; $descriptionErrorLabel = $descriptionError; } @endphp
{{ t('describe_what_makes_your_listing_unique') }}...
{{-- cfContainer --}}
{{-- price --}} @php $priceError = (isset($errors) && $errors->has('price')) ? ' is-invalid' : ''; $price = old('price', data_get($postInput, 'price')); $price = \App\Helpers\Number::format($price, 2, '.', ''); @endphp
{!! config('currency')['symbol'] !!}   {{ t('negotiable') }}
{{ t('price_hint') }}
{{-- country_code --}} @php $countryCodeError = (isset($errors) && $errors->has('country_code')) ? ' is-invalid' : ''; $countryCodeValue = (!empty(config('ipCountry.code'))) ? config('ipCountry.code') : 0; $countryCodeValue = data_get($postInput, 'country_code', $countryCodeValue); $countryCodeValueOld = old('country_code', $countryCodeValue); @endphp @if (empty(config('country.code')))
@else @endif @php $adminType = config('country.admin_type', 0); @endphp @if (config('settings.single.city_selection') == 'select') @if (in_array($adminType, ['1', '2'])) {{-- admin_code --}}
@endif @else @endif {{-- city_id --}}
{{-- tags --}} @php $tagsError = (isset($errors) && $errors->has('tags.*')) ? ' is-invalid' : ''; $tags = old('tags', data_get($postInput, 'tags')); @endphp
{!! t('tags_hint', [ 'limit' => (int)config('settings.single.tags_limit', 15), 'min' => (int)config('settings.single.tags_min_length', 2), 'max' => (int)config('settings.single.tags_max_length', 30) ]) !!}
{{-- is_permanent --}} @if (config('settings.single.permanent_listings_enabled') == '3') @else
{{ t('is_permanent_hint') }}
@endif
{{ t('seller_information') }}
{{-- contact_name --}} @if (auth()->check()) @else
@endif {{-- auth_field (as notification channel) --}} @php $authFields = getAuthFields(true); $authFieldError = (isset($errors) && $errors->has('auth_field')) ? ' is-invalid' : ''; $usersCanChooseNotifyChannel = isUsersCanChooseNotifyChannel(); $authFieldValue = ($usersCanChooseNotifyChannel) ? (old('auth_field', getAuthField())) : getAuthField(); @endphp @if ($usersCanChooseNotifyChannel)
@foreach ($authFields as $iAuthField => $notificationType)
@endforeach
{{ t('notifications_channel_hint') }}
@else @endif @php $forceToDisplay = isBothAuthFieldsCanBeDisplayed() ? ' force-to-display' : ''; @endphp {{-- email --}} @php $emailError = (isset($errors) && $errors->has('email')) ? ' is-invalid' : ''; $emailValue = (auth()->check() && isset(auth()->user()->email)) ? auth()->user()->email : data_get($postInput, 'email'); @endphp
{{-- phone --}} @php $phoneError = (isset($errors) && $errors->has('phone')) ? ' is-invalid' : ''; $phoneValue = data_get($postInput, 'phone'); $phoneCountryValue = data_get($postInput, 'phone_country', config('country.code')); if ( auth()->check() && isset(auth()->user()->country_code) && isset(auth()->user()->phone) && isset(auth()->user()->phone_country) // && auth()->user()->country_code == config('country.code') ) { $phoneValue = auth()->user()->phone; $phoneCountryValue = auth()->user()->phone_country; } $phoneValue = phoneE164($phoneValue, $phoneCountryValue); $phoneValueOld = phoneE164(old('phone', $phoneValue), old('phone_country', $phoneCountryValue)); @endphp
  {{ t('Hide') }}
@if (!auth()->check()) @if (in_array(config('settings.single.auto_registration'), [1, 2])) {{-- auto_registration --}} @if (config('settings.single.auto_registration') == 1)
{{ t('You will receive your authentication information by email') }}
@else @endif @endif @endif @include('layouts.inc.tools.captcha', ['colLeft' => 'col-md-3', 'colRight' => 'col-md-8']) @if (!auth()->check()) {{-- accept_terms --}} @php $acceptTermsError = (isset($errors) && $errors->has('accept_terms')) ? ' is-invalid' : ''; $acceptTerms = old('accept_terms', data_get($postInput, 'accept_terms')); @endphp
{{-- accept_marketing_offers --}} @php $acceptMarketingOffersError = (isset($errors) && $errors->has('accept_marketing_offers')) ? ' is-invalid' : ''; $acceptMarketingOffers = old('accept_marketing_offers', data_get($postInput, 'accept_marketing_offers')); @endphp
@endif {{-- Button --}}
@includeFirst([config('larapen.core.customizedViewPath') . 'post.createOrEdit.inc.right-sidebar', 'post.createOrEdit.inc.right-sidebar'])
@includeFirst([config('larapen.core.customizedViewPath') . 'post.createOrEdit.inc.category-modal', 'post.createOrEdit.inc.category-modal']) @endsection @section('after_styles') @endsection @section('after_scripts') @endsection @includeFirst([config('larapen.core.customizedViewPath') . 'post.createOrEdit.inc.form-assets', 'post.createOrEdit.inc.form-assets'])