{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2025 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 . # # --------------------------------------------------------------------- #} {% import 'components/form/basic_inputs_macros.html.twig' as inputs %} {% set show_legend = show_legend|default(false) %} {% set can_edit = has_profile_right('profile', constant('CREATE')) or has_profile_right('profile', constant('UPDATE')) or has_profile_right('profile', constant('PURGE')) %} {% macro displayRightsMatrix(item, interface, form, group, title) %} {% do item.displayRightsChoiceMatrix( call('Profile::getRightsForForm', [interface, form, group]), { canedit: has_profile_right('profile', constant('CREATE')) or has_profile_right('profile', constant('UPDATE')) or has_profile_right('profile', constant('PURGE')), title: title } ) %} {% endmacro %} {% macro displayLifecycleMatrix(item, title, html_field, db_field, statuses) %} {% do item.displayLifeCycleMatrix( title, html_field, db_field, statuses, has_profile_right('profile', constant('CREATE')) or has_profile_right('profile', constant('UPDATE')) or has_profile_right('profile', constant('PURGE')) ) %} {% endmacro %}
{% if can_edit %}
{% endif %}
{% block content %}{% endblock %} {% if show_legend %} {{ include('pages/admin/profile/legend.html.twig') }} {% endif %}
{% if can_edit %}
{{ inputs.submit('update', _x('button', 'Save'), 1, { class: 'btn btn-primary', icon: 'ti ti-device-floppy' }) }}
{% endif %}
{% if can_edit %}
{% endif %}