{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2024 Teclib' and contributors. # @copyright 2003-2014 by the INDEPNET Development Team. # @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/fields_macros.html.twig' as fields %} {% set id = item.fields['id'] ?? -1 %}
{% if canedit %}
{% endif %}
{{ call_plugin_hook(constant('Glpi\\Plugin\\Hooks::PRE_ITEM_FORM'), {'item': item, 'options': params}) }}
 {{ __('Substitutes are users who can approve or refuse tickets on your behalf.') }}
{{ fields.datetimeField( 'substitution_start_date', user.fields['substitution_start_date'], __('Start date ') ) }} {{ fields.datetimeField( 'substitution_end_date', user.fields['substitution_end_date'], __('End date ') ) }} {{ fields.dropdownField( 'User', 'substitutes', [], __('Validation substitutes'), { 'multiple': 'multiple', 'used': [user.fields['id']], 'value': substitutes, 'right': 'create_ticket_validate', } ) }} {{ fields.nullField }} {% if delegators|length > 0 %}
 {{ __('Delegators are users who gave you the right to approve or refuse tickets on their behalf.') }}
{% for delegator in delegators %} {% set delegator = get_item('User', delegator) %} {% endfor %}
{{ __('Name') }} {{ __('Substitution start date') }} {{ __('Substitution end date') }}
{{ delegator.getFriendlyName() }} {{ delegator.fields['substitution_start_date'] }} {{ delegator.fields['substitution_end_date'] }}
{% endif %}
{# .row #}
{# .row #}
{# .flex-row #}
{# .card-body #}
{{ call_plugin_hook(constant('Glpi\\Plugin\\Hooks::POST_ITEM_FORM'), {'item': item, 'options': params}) }}
{% if canedit %}
{# #mainformtable #}
{# [name=asset_form] #} {% else %}
{# #mainformtable #} {% endif %}