Viewing file: b306750886ea802933c13068de094b04.php (49.75 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title', __('step2')); ?>
<?php $__env->startSection('post-ad-content'); ?> <div> <form action="<?php echo e(route('frontend.post.step2.update', $ad->slug)); ?>" method="POST" enctype="multipart/form-data" id="step_edit_form"> <?php echo csrf_field(); ?> <?php echo method_field('PUT'); ?> <div class="sm:p-8 p-4 flex flex-col gap-8"> <div class="flex flex-col gap-4"> <div class="flex flex-col gap-1.5"> <h3 class="heading-07 text-gray-900"><?php echo e(__('upload_photos')); ?></h3> </div>
<div class="grid grid-cols-12 gap-4"> <div class="lg:col-span-4 col-span-full"> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => 'thumbnail','for' => 'thumbnail','required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => 'thumbnail','for' => 'thumbnail','required' => true]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <p class="body-sm-400 text-gray-600 mb-2"> <?php echo e(__('image_must_be_in_jpg_jpeg_png_format')); ?>
</p> <input name="thumbnail" type="file" accept="image/png, image/jpg, image/jpeg" class="form-control dropify <?php $__errorArgs = ['thumbnail']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?>" style="border:none;padding-left:0;" accept="image/png,image/jpg,image/jpeg" data-allowed-file-extensions='["jpg", "jpeg","png"]' data-max-file-size="3M" data-show-errors="true" data-default-file="<?php echo e($ad->image_url); ?>"/> <?php $__errorArgs = ['thumbnail']; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <div class="lg:col-span-8 col-span-full"> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => 'Gallery_Image','for' => 'thumbnail','required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => 'Gallery_Image','for' => 'thumbnail','required' => true]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <p class="body-sm-400 text-gray-600 mb-2"> <?php echo e(__('you_must_upload_at_least')); ?> 2 to <?php echo e($setting->maximum_ad_image_limit); ?>
<?php echo e(__('images')); ?>.<?php echo e(__('image_must_be_in_jpg_jpeg_png_format')); ?>
</p> <label for="file-input" class="p-6 w-full cursor-zoom-in transition-all duration-300 hover:bg-gray-50 block shadow-[0px_1px_2px_0px_rgba(16,24,40,0.05)] rounded-lg border border-gray-100"> <div> <input type="file" accept="image/png, image/jpeg, image/jpg" class="filepond" name="images[]" multiple /> </div> </label> </div> </div>
<div> <label for="manufacture" class="tc-label"><?php echo e(__('video_url')); ?></label> <input type="url" id="manufacture" class="tc-input" placeholder="<?php echo e(__('enter_video_url')); ?>" name="video_url" value="<?php echo e(old('video_url', $ad?->video_url)); ?>"> </div> </div> <div class="h-[1px] bg-gray-100"></div> <div class="grid sm:grid-cols-2 grid-cols-1 gap-4">
<?php $__currentLoopData = $fields; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($field->type == 'text'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <input value="<?php echo e(old($field->name, $field->value)); ?>" name="<?php echo e($field->slug); ?>" type="text" id="ad_<?php echo e($field->slug); ?>" class="tc-input" placeholder="<?php echo e($field->name); ?>" <?php if($field->required): echo 'required'; endif; ?>>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'select'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <select name="<?php echo e($field->slug); ?>" id="ad_<?php echo e($field->slug); ?>" class="tc-input" <?php if($field->required): echo 'required'; endif; ?>> <?php $__currentLoopData = $field->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php echo e((old(ucfirst($field->value), $field->value) == ucfirst($value->value) ? 'selected' : $value->id == 1) ? 'selected' : ''); ?>
value="<?php echo e($value->value); ?>"> <?php echo e(ucfirst($value->value)); ?>
</option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'file'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <input name="<?php echo e($field->slug); ?>" type="file" id="ad_<?php echo e($field->slug); ?>">
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'textarea'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <textarea name="<?php echo e($field->slug); ?>" id="ad_<?php echo e($field->slug); ?>" cols="12" rows="2" class="tc-input" placeholder="<?php echo e($field->name); ?>"><?php echo e(old($field->slug, $field->value)); ?></textarea>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'radio'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <div class="flex gap-12 items-center"> <?php $__currentLoopData = $field->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="tc-radio"> <input <?php if(old(ucfirst($field->value), ucfirst($field->value)) == ucfirst($value->value)): echo 'checked'; endif; ?> value="<?php echo e(ucfirst($value->value)); ?>" type="radio" name="<?php echo e($field->slug); ?>" id="ad_label_<?php echo e($value->id); ?>"> <label for="ad_label_<?php echo e($value->id); ?>"> <?php echo e($value->value); ?>
</label> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'url'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'ad_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <input type="url" name="<?php echo e($field->slug); ?>" id="ad_<?php echo e($field->slug); ?>" class="tc-input" placeholder="<?php echo e($field->name); ?>" value="<?php echo e(old($field->slug, $field->value)); ?>">
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'number'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <input min="1" type="number" name="<?php echo e($field->slug); ?>" value="<?php echo e(old($field->slug, $field->value)); ?>" id="adl_<?php echo e($field->slug); ?>" class="tc-input" placeholder="<?php echo e($field->name); ?>">
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'date'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <input type="date" name="<?php echo e($field->slug); ?>" value="<?php echo e(old($field->slug, $field->value)); ?>" placeholder="<?php echo e($field->name); ?>" class="tc-input">
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php $fieldId = 'cf.' . $field->id; $fieldName = 'cf[' . $field->id . ']'; $fieldOld = 'cf.' . $field->id; ?>
<?php if($field->type == 'checkbox'): ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <ul class="grid md:grid-cols-3 sm:grid-cols-2 gap-3"> <?php $__currentLoopData = $field->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($loop->first): ?> <li class="tc-checkbox "> <input type="hidden" value="0" name="<?php echo e($fieldName); ?>"> <input <?php if($field->value == '1'): echo 'checked'; endif; ?> value="1" type="checkbox" name="<?php echo e($fieldName); ?>" id="<?php echo e($fieldId); ?>"> <label for="<?php echo e($fieldId); ?>"><?php echo e($value->value); ?></label> </li> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?>
<?php if($field->type == 'checkbox_multiple'): ?> <?php $exploded_values = explode(', ', $field->value); ?> <div> <?php if (isset($component)) { $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c = $attributes; } ?> <?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.forms.flabel','data' => ['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => $field->required]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.flabel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['name' => ''.e($field->name).'','for' => 'adl_'.e($field->slug).'','required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($field->required)]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $attributes = $__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__attributesOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <?php if (isset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c)): ?> <?php $component = $__componentOriginal2146020b40f8308b09f4f99a4c96cf8c; ?> <?php unset($__componentOriginal2146020b40f8308b09f4f99a4c96cf8c); ?> <?php endif; ?> <ul class="grid md:grid-cols-3 sm:grid-cols-2 gap-3"> <?php $__currentLoopData = $field->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li class="tc-checkbox "> <input type="checkbox" name="<?php echo e($fieldName . '[' . $value->id . ']'); ?>" id="<?php echo e($fieldId . '.' . $value->id); ?>" value="<?php echo e($value->id); ?>" <?php if(in_array($value->id, $exploded_values)): echo 'checked'; endif; ?>> <label for="<?php echo e($fieldId . '.' . $value->id); ?>"> <?php echo e($value->value); ?>
</label> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul>
<?php $__errorArgs = [$field->slug]; $__bag = $errors->getBag($__errorArgs[1] ?? 'default'); if ($__bag->has($__errorArgs[0])) : if (isset($message)) { $__messageOriginal = $message; } $message = $__bag->first($__errorArgs[0]); ?> <p class="text-sm text-red-600 dark:text-red-500"><?php echo e($message); ?></p> <?php unset($message); if (isset($__messageOriginal)) { $message = $__messageOriginal; } endif; unset($__errorArgs, $__bag); ?> </div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="h-[1px] bg-gray-100"></div> <div class="flex flex-col gap-y-4"> <h2 class="heading-07 text-gray-900"><?php echo e(__('feature')); ?></h2> <div> <div class="dropdown-input__wrap gap-4 flex"> <div class="flex-grow flex rounded-lg mb-4"> <input <?php if(!$ad->features && count($ad->features) == 0): echo 'required'; endif; ?> type="text" class="tc-input" placeholder="<?php echo e(__('feature')); ?>" name="features[]"> </div> </div> <?php if($ad->features && count($ad->features)): ?> <?php $__currentLoopData = $ad->features; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $feature): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($feature): ?> <div class="dropdown-input__wrap gap-4 flex" id="feature_<?php echo e($key); ?>"> <div class="flex-grow flex rounded-lg mb-4"> <input required type="text" id="feature-<?php echo e($feature->id); ?>" class="tc-input" placeholder="<?php echo e(__('feature')); ?>" name="features[]" value="<?php echo e($feature->name); ?>"> </div> <div> <button type="button" onclick="removeElement(<?php echo e($key); ?>)" class="btn-remove h-[44px] w-[44px] text-white rounded-lg inline-flex justify-center items-center bg-error-500"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> </div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<div x-data="dynamicInput"> <template x-for="(field, index) in fields" :key="index"> <div class="dropdown-input__wrap gap-4 flex" :id="`'wrap_${index}'`"> <div class="flex-grow flex rounded-lg mb-4"> <input <?php if(!$ad->features && count($ad->features) == 0): echo 'required'; endif; ?> type="text" class="tc-input" placeholder="<?php echo e(__('feature')); ?>" name="features[]" x-model='field.textContent'> </div> <div x-show="fields?.length" x-cloak> <button type="button" @click="removeField(index)" class="btn-remove h-[44px] w-[44px] text-white rounded-lg inline-flex justify-center items-center bg-error-500"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> </div> </template> <div> <button type="button" @click="addNewField()" class="btn-primary w-full"><?php echo e(__('add_new')); ?></button> </div> </div> </div> </div> </div> <div class="post-footer"> <input type="submit" name="draft" class="btn-secondary cursor-pointer py-3 px-5" value="<?php echo e(__('save_on_draft')); ?>"/> <div> <a href="<?php echo e(route('frontend.post.cancel.edit')); ?>" type="button" class="btn-danger py-3 px-5"><?php echo e(__('cancel_edit')); ?></a> <?php if($ad->resubmission == true): ?> <button onclick="updateCancelEdit()" type="button" class="btn-info py-3 px-5"><?php echo e(__('save_and_resubmit')); ?></button> <?php else: ?> <button onclick="updateCancelEdit()" type="button" class="btn-info py-3 px-5"><?php echo e(__('update_cancel_edit')); ?></button> <?php endif; ?> <button type="submit" class="btn-primary py-3 px-5"><?php echo e(__('save_and_next')); ?></button> </div> </div>
<input type="hidden" id="cancel_edit_input" name="cancel_edit" value="0"> </form> </div> <?php $__env->stopSection(); ?>
<?php $__env->startPush('css'); ?> <style> .dropify-wrapper { border-radius: 8px !important; border-width: 1px !important; } </style> <?php $__env->stopPush(); ?>
<?php $__env->startPush('css'); ?> <link rel="stylesheet" href="<?php echo e(asset('backend')); ?>/css/dropify.min.css" /> <style> .filepond--list li { width: 100px !important; height: 100px !important; } </style> <?php $__env->stopPush(); ?>
<?php $__env->startPush('js'); ?> <script> // ads post $("#file-1").fileinput({ theme: 'fas', showUpload: false, allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg', 'webp'], previewFileIcon: '<i class="fas fa-file"></i>', overwriteInitial: false, maxFileSize: 2000, maxFilesNum: 10, validateInitialCount: true, showPreview: true, showRemove: true, showCancel: true, showCaption: false, showBrowse: true, browseOnZoneClick: true, minFileCount: 0, maxFileCount: 10, validateInitialCount: true, initialPreviewAsData: true, initialPreview: [ <?php $__currentLoopData = $ad->galleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gallery): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> "<?php echo e($gallery->image ? $gallery->image_url : ''); ?>", <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> ], initialPreviewConfig: [ <?php $__currentLoopData = $ad->galleries; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $gallery): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> { caption: "<?php echo e(str_replace('uploads/adds_multiple/', ' ', $gallery->image)); ?>", size: <?php echo e(getFileSize($gallery->image)); ?>, width: "20px", url: "<?php echo e(route('frontend.ad.gallery.delete', [$gallery->id, '_token' => csrf_token()])); ?>", key: <?php echo e($gallery->id); ?>
}, <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
] });
function removeElement(id) { const element = document.getElementById(`feature_${id}`); element.remove(); } document.addEventListener('alpine:init', () => { Alpine.data('dynamicInput', () => ({ fields: [], addNewField() { this.fields.push({ textContent: '', }); }, removeField(index) { this.fields.splice(index, 1); } })) }) </script> <?php $__env->stopPush(); ?>
<?php $__env->startPush('js'); ?> <?php echo app('Illuminate\Foundation\Vite')('resources/frontend/js/filepond.js'); ?> <script src="<?php echo e(asset('backend')); ?>/js/dropify.min.js"></script> <script defer> // dropify var drEvent = $('.dropify').dropify();
drEvent.on('dropify.error.fileSize', function(event, element) { alert('Filesize error message!'); }); drEvent.on('dropify.error.imageFormat', function(event, element) { alert('Image format error message!'); });
document.addEventListener('DOMContentLoaded', () => { const inputElement = document.querySelector('.filepond');
// Create a FilePond instance const pond = filepond.create(inputElement, { acceptedFileTypes: ['image/png', 'image/jpeg', 'image/jpg'], maxFileSize: '5MB', maxFiles: "<?php echo e($setting->maximum_ad_image_limit); ?>", storeAsFile: true, allowMultiple: true, credits: false, labelIdle: `Drag & Drop Images or <span class="filepond--label-action">Browse</span>`, });
<?php if(count($ad->galleries)): ?> pond.setOptions({ files: [ <?php foreach($ad->galleries as $gallery): ?> { source: "<?php echo e($gallery->image_url); ?>", options: { id: "<?php echo e($gallery->id); ?>" }, }, <?php endforeach;?> ] })
<?php endif;?> }); </script> <?php $__env->stopPush(); ?>
<?php echo $__env->make('frontend.postad_edit.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\add listing 8-9-25\addListing\resources\views/frontend/postad_edit/step2.blade.php ENDPATH**/ ?>
|