{#
 # ---------------------------------------------------------------------
 #
 # GLPI - Gestionnaire Libre de Parc Informatique
 #
 # http://glpi-project.org
 #
 # @copyright 2015-2026 Teclib' and contributors.
 # @licence   https://www.gnu.org/licenses/gpl-3.0.html
 #
 # ---------------------------------------------------------------------
 #
 # LICENSE
 #
 # This file is part of GLPI.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU 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 General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 # ---------------------------------------------------------------------
 #}

{% set params = {} %}
{# do not display delete button #}
{% set params = params|merge({'candel': false}) %}
{# do not display footer with dates #}
{% set params = params|merge({'formfooter': false}) %}
{% set target = target|default('') %} {# not sure empty target should happen. #}
{% set formoptions = formoptions|default('') %}

<div class="p-2">
    <form id="main-form" name="asset_form" method="post" action="{{ target }}" {{ formoptions|raw }} enctype="multipart/form-data" data-submit-once>
        {{ include('components/checkbox_matrix.html.twig', {
            'title': '',
            'param': {
                'rand': random(),
                'col_check_all': 'top',
                'row_check_all': true,
                'first_cell': '',
            },
            'columns': matrix_columns,
            'rows': matrix_rows,
            'nb_cb_per_col': nb_cb_per_col,
            'nb_cb_per_row': nb_cb_per_row,
        }, with_context = false) }}

        {{ extra_fields|raw }}

        {{ include('components/form/buttons.html.twig') }}
    </form>
</div>
