{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * Author: Mayeul Akpovi (BeDigit - https://bedigit.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 - https://codecanyon.net/licenses/standard --}} @extends('layouts.master') @php $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() !!} @honeypot
{{-- category_id --}} @php $categoryIdError = (isset($errors) && $errors->has('category_id')) ? ' is-invalid' : ''; @endphp
@if (config('settings.listing_form.show_listing_type')) {{-- post_type_id --}} @php $postTypeIdError = (isset($errors) && $errors->has('post_type_id')) ? ' is-invalid' : ''; $postTypeId = old('post_type_id'); @endphp
@foreach ($postTypes as $postType)
@endforeach
{{ t('post_type_hint') }}
@endif {{-- title --}} @php $titleError = (isset($errors) && $errors->has('title')) ? ' is-invalid' : ''; @endphp
{{ t('a_great_title_needs_at_least_60_characters') }}
{{-- description --}} @php $descriptionError = (isset($errors) && $errors->has('description')) ? ' is-invalid' : ''; $descriptionErrorLabel = ''; $descriptionColClass = 'col-md-8'; if (isWysiwygEnabled()) { $descriptionColClass = 'col-md-12'; $descriptionErrorLabel = $descriptionError; } @endphp
{{ t('describe_what_makes_your_listing_unique') }}...
@if (isset($picturesLimit) && is_numeric($picturesLimit) && $picturesLimit > 0) {{-- pictures --}} @php $picturesError = (isset($errors) && $errors->has('pictures')) ? ' is-invalid' : ''; @endphp
@for ($i = 1; $i <= $picturesLimit; $i++) @php $pictureError = (isset($errors) && $errors->has('pictures.'.$i)) ? ' is-invalid' : ''; @endphp
@endfor
@php $pictureHint = t('add_up_to_x_pictures_text', ['pictures_number' => $picturesLimit]) . '
' . t('file_types', ['file_types' => getAllowedFileFormatsHint('image')]); @endphp {!! $pictureHint !!}
@endif {{-- cfContainer --}}
{{-- price --}} @php $priceError = (isset($errors) && $errors->has('price')) ? ' is-invalid' : ''; $currencySymbol = config('currency.symbol', 'X'); $price = old('price'); $price = \App\Helpers\Num::format($price, 2, '.', ''); $isPriceMandatory = (config('settings.listing_form.price_mandatory') == '1'); @endphp
{!! $currencySymbol !!}  {{ t('negotiable') }}
@if (config('settings.listing_form.price_mandatory') != '1')
{{ t('price_hint') }}
@endif
{{-- country_code --}} @php $countryCodeError = (isset($errors) && $errors->has('country_code')) ? ' is-invalid' : ''; $countryCodeValue = (!empty(config('ipCountry.code'))) ? config('ipCountry.code') : 0; $countryCodeValue = old('country_code', $countryCodeValue); @endphp @if (empty(config('country.code')))
@else @endif @php $adminType = config('country.admin_type', 0); @endphp @if (config('settings.listing_form.city_selection') == 'select') @if (in_array($adminType, ['1', '2'])) {{-- admin_code --}} @php $adminCodeError = (isset($errors) && $errors->has('admin_code')) ? ' is-invalid' : ''; @endphp
@endif @else @endif {{-- city_id --}} @php $cityIdError = (isset($errors) && $errors->has('city_id')) ? ' is-invalid' : ''; @endphp
{{-- tags --}} @php $tagsError = (isset($errors) && $errors->has('tags.*')) ? ' is-invalid' : ''; $tags = old('tags'); @endphp
{!! t('tags_hint', [ 'limit' => (int)config('settings.listing_form.tags_limit', 15), 'min' => (int)config('settings.listing_form.tags_min_length', 2), 'max' => (int)config('settings.listing_form.tags_max_length', 30) ]) !!}
{{-- is_permanent --}} @if (config('settings.listing_form.permanent_listings_enabled') == '3') @else @php $isPermanentError = (isset($errors) && $errors->has('is_permanent')) ? ' is-invalid' : ''; @endphp
{{ t('is_permanent_hint') }}
@endif
{{ t('seller_information') }}
{{-- contact_name --}} @php $contactNameError = (isset($errors) && $errors->has('contact_name')) ? ' is-invalid' : ''; @endphp @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 : ''; @endphp
{{-- phone --}} @php $phoneError = (isset($errors) && $errors->has('phone')) ? ' is-invalid' : ''; $phoneValue = null; $phoneCountryValue = config('country.code'); if ( auth()->check() && isset(auth()->user()->country_code) && !empty(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.listing_form.auto_registration'), [1, 2])) {{-- auto_registration --}} @if (config('settings.listing_form.auto_registration') == 1) @php $autoRegistrationError = (isset($errors) && $errors->has('auto_registration')) ? ' is-invalid' : ''; @endphp
{{ t('You will receive your authentication information by email') }}
@else @endif @endif @endif @includeFirst([ config('larapen.core.customizedViewPath') . 'post.createOrEdit.singleStep.inc.packages', 'post.createOrEdit.singleStep.inc.packages' ]) @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' : ''; @endphp
{{-- accept_marketing_offers --}} @php $acceptMarketingOffersError = (isset($errors) && $errors->has('accept_marketing_offers')) ? ' is-invalid' : ''; @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' ])