{% extends layout('new-create') %} {% block content %}
{% include 'visiosoft.module.advs::new-ad/partials/steps' with {'step': 'new-create'} %}
{% 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') }}
{% set fields = form.fields.base().pluck('field_name').all() %}
{% for field in form.fields.translations('name') %} {{ field.render({'form': form})|raw }} {% endfor %}
{{ form.fields.slug|raw }}
{% if setting_value('visiosoft.module.advs::market_place') %} {{ addBlock('new-ad/fields', {'adv': adv})|raw }} {% endif %}
{{ form.fields.standard_price.setAttributes({ 'required' :true }).input|raw }}
{% set standardPriceValue = form.fields.standard_price.value|split('.') %}
{{ form.fields.price.setAttributes({ 'required' :true }).input|raw }}
{% set PriceValue = form.fields.price.value|split('.') %}
{% if setting_value('visiosoft.field_type.decimal::showDecimal') %}
{% endif %}
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
{% 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 %}
{% if custom_fields and count(custom_fields) %}
{{ trans('visiosoft.module.advs::field.additional_fields') }}
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
{% endif %}
{{ trans('visiosoft.module.advs::field.ad_location') }}
{% include "visiosoft.module.location::new-ad/map" %}
{% 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" %} {{ 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") }} {{ asset_add("styles.css", "visiosoft.module.advs::css/new-create.css") }} {% endblock %}