{# /** * This file is part of FacturaScripts * Copyright (C) 2017-2023 Carlos Garcia Gomez * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ #} {% set currentView = fsc.getCurrentView() %} {% set action = currentView.model.exists() ? 'edit' : 'insert' %} {% set fieldCount = 0 %} {% for group in currentView.getColumns() %} {% set fieldCount = fieldCount + group.columns | length %} {% endfor %} {# -- Row header -- #}
{% set row = currentView.getRow('header') %} {{ row.render(currentView.getViewName(), '', fsc) | raw }}
{{ formToken() }}
{# -- Row statistics -- #} {% set row = currentView.getRow('statistics') %} {{ row.render(fsc) | raw }} {% if fieldCount > 30 and currentView.settings.btnSave %} {% endif %}
{% for group in currentView.getColumns() %} {{ group.edit(currentView.model) | raw }} {% endfor %}
{% if fsc.hasData and currentView.settings.btnDelete %}
{% endif %} {% set extraClass = fsc.hasData and currentView.settings.btnDelete ? 'text-center' : '' %}
{# -- Row actions -- #} {% set row = currentView.getRow('actions') %} {{ row.render(false, currentView.getViewName()) | raw }}
{% if currentView.settings.btnUndo %} {% endif %} {% if currentView.settings.btnSave %} {% endif %}

{# -- Row footer -- #}
{% set row = currentView.getRow('footer') %} {{ row.render(currentView.getViewName(), '', fsc) | raw }}
{# -- Modals -- #} {% for group in currentView.getModals() %} {{ group.modal(currentView.model, currentView.getViewName()) | raw }} {% endfor %}