{% extends layout('new-create') %} {% block styles %} {% endblock %} {% block content %}
{% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}

{{ trans('visiosoft.module.advs::field.listing_details') }}

{{ trans('visiosoft.module.advs::field.create_page_subtitle') }}

{% set requiredFields = setting_value('visiosoft.module.advs::make_all_fields_required') %} {% set form = form('advs', 'advs').entry(id).actions({'update': { 'text': trans('visiosoft.module.advs::button.publish') }}).get() %} {{ form_open({ 'id': 'createEditAdvForm', 'class': 'form ' ~ form.options.class , 'enctype': 'multipart/form-data', 'url': 'advs/save_adv', })|raw }}
{% include 'visiosoft.module.advs::new-ad/partials/contact-info' %}

{{ trans('visiosoft.module.advs::field.ad_info') }}

{% if setting_value('visiosoft.module.advs::market_place') %} {{ addBlock('new-ad/fields', {'adv': adv})|raw }} {% endif %}
{{ form.fields.price.setAttributes({ 'required' :true }).input|raw }}
{% set PriceValue = form.fields.price.value|split('.') %} {% if setting_value('visiosoft.field_type.decimal::showDecimal') %} {% endif %}
{% set HideStandardPrice = setting_value('visiosoft.module.advs::hide_standard_price_field') or setting_value('visiosoft.module.advs::market_place') != true ? ' d-none' %}
{{ form.fields.standard_price.setAttributes({ 'required' :true }).input|raw }}
{% set standardPriceValue = form.fields.standard_price.value|split('.') %} {% if setting_value('visiosoft.field_type.decimal::showDecimal') %} {% endif %}
{% if setting_value("visiosoft.module.advs::show_tax_field") %}
{% endif %} {% if setting_value("visiosoft.module.advs::show_finish_and_publish_date") %}
{{ form.fields.publish_at.input|raw }}
{{ form.fields.finish_at.input|raw }}
{% endif %} {% if not setting_value('visiosoft.module.advs::hide_options_field') %} {% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
{% if auth_check() and auth_user().hasRole('admin') %}

{{ trans('visiosoft.module.advs::message.disabled_detailed_options_for_admin_role') }}

{% endif %} {% else %} {% if is_options %}
{% endif %} {% endif %} {% endif %}
{{ trans('visiosoft.module.advs::field.ad_desc') }}
{% for field in form.fields.translations('advs_desc') %} {{ field.render({'form': form})|raw }} {% endfor %}
{{ trans('visiosoft.module.advs::field.upload_photos') }}
{{ form.fields.files.input |raw }}
{% for docs in form.fields.doc_files.value %} {{ docs.name }}
{% endfor %}
{% set other_fields = addBlock('new-ad/other-fields',{'custom_fields':custom_fields,'id':id}) %} {% if other_fields or (custom_fields and count(custom_fields)) %}
{{ trans('visiosoft.module.advs::field.additional_fields') }}
{{ other_fields|raw }}
{% endif %} {% if setting_value('visiosoft.module.location::create_ad_page_location') %}
{{ trans('visiosoft.module.advs::field.ad_location') }}
{% include "visiosoft.module.location::new-ad/map" %}
{% endif %}
{% if setting_value('visiosoft.module.advs::show_post_ad_agreement') %}
{% endif %} {{ form.actions|raw }}
{{ form.close|raw }}
{% include "visiosoft.module.advs::new-ad/partials/modals" %} {% include "visiosoft.module.advs::new-ad/partials/configuration-modal" %} {{ addBlock('new-ad/modals')|raw }} {% if setting_value('visiosoft.module.advs::make_map_required') %} {{ asset_add("scripts.js", "visiosoft.module.advs::js/required-map.js") }} {% endif %} {{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }} {{ asset_add("scripts.js", "streams::js/form/form.js") }} {{ asset_add("scripts.js", "streams::js/form/translations.js") }} {% endblock %}