{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2023 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 pending_item = call('PendingReason_Item::getForItem', [subitem, true]) %} {% if subitem.isNewItem() or pending_item or call('PendingReason_Item::isLastTimelineItem', [subitem]) %}
{% set pendingreasons_lbl %} {% endset %} {% set pending_reasons_id_script %} {% endset %} {{ fields.dropdownField( 'PendingReason', 'pendingreasons_id', subitem.fields['pendingreasons_id'], pendingreasons_lbl, { 'label_class': 'col-1', 'input_class': 'col-10 ms-1', 'rand': rand, 'mb': '', 'hide_if_no_elements': true, 'addicon': false, 'comments': false, 'width': '95%', 'field_class': '', 'add_field_html': pending_reasons_id_script } ) }}
{% set pendingreasons_frequency_field = call('PendingReason::displayFollowupFrequencyfield', [ pending_item.fields["followup_frequency"], "", { 'rand': rand }, false ]) %} {% set pendingreasons_frequency_lbl %} {% endset %} {{ fields.field( 'followup_frequency', pendingreasons_frequency_field, pendingreasons_frequency_lbl, { 'field_class': '', 'label_class': 'col-1', 'input_class': 'col-10 ms-1', 'rand': rand, 'mb': '', } ) }}
{% set pendingreasons_resolution_field = call('PendingReason::displayFollowupsNumberBeforeResolutionField', [ pending_item.fields["followups_before_resolution"], "", { 'rand': rand }, false ]) %} {% set pendingreasons_resolution_lbl %} {% endset %} {{ fields.field( 'followups_before_resolution', pendingreasons_resolution_field, pendingreasons_resolution_lbl, { 'field_class': '', 'label_class': 'col-1', 'input_class': 'col-10 ms-1', 'rand': rand, 'mb': '', } ) }}
{% endif %}