{% extends "theme::layouts/default" %} {% block content %} {% embed 'visiosoft.module.profile::profile/index' %} {% block detail %}

{% if request().segment(3) == "edit" %} {{ trans('visiosoft.module.profile::field.edit_address.name') }} {% else %} {{ trans('visiosoft.module.profile::field.create_address.name') }} {% endif %}

{% set form = form('address').entry(id).actions({'save':'save'}).get() %} {% set isCompany = form.entry.is_company %}
{{ form_open({ 'class': 'form ' ~ form.options.class , 'enctype': 'multipart/form-data', 'url':form.options.url })|raw }}
{% include "visiosoft.module.profile::address/partials/fields" %}
{{ form.actions|raw }}
{{ form_close() }}
{% set form = form('addressCompany').entry(id).actions({'save':'save'}).get() %} {{ form_open({ 'class': 'form ' ~ form.options.class , 'enctype': 'multipart/form-data', 'url':form.options.url })|raw }}
{{ form.fields.company|raw }}
{% if setting_value('visiosoft.module.profile::show_tax_office') %}
{{ form.fields.tax_office|raw }}
{% endif %}
{{ form.fields.tax_number|raw }}
{% include "visiosoft.module.profile::address/partials/fields" %}
{{ form.actions|raw }}
{{ form_close() }}
{{ asset_add("scripts.js", "visiosoft.module.profile::assets/js/create.js") }} {% endblock %} {% endembed %} {% endblock %}