{# # --------------------------------------------------------------------- # # 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 %} {% block more_fields %} {% if url is defined %} {{ fields.htmlField( '', '' ~ url|escape ~ '', __('External survey'), { 'input_class' : 'col-xxl-9', 'label_class' : 'col-xxl-3' } ) }} {% else %} {% if expired %} {% set message = __('Satisfaction survey expired.') %} {% else %} {% set message = __('After 12 hours, you can no longer modify your response.') %} {% endif %} {% if item.fields['date_answered'] is empty and expired %} {{ fields.htmlField( '', '', __('No response given'), { 'input_class' : 'col-xxl-9', 'label_class' : 'col-xxl-3' } ) }} {% else %} {{ fields.hiddenField( parent_item.getForeignKeyField(), parent_item.fields['id'], '', { 'full_width': true, } ) }} {% set select_dom %}
{% endset %} {{ fields.htmlField( 'satisfaction', select_dom, __('Satisfaction with the resolution of the %s')|format(parent_item.getTypeName(1)), { 'full_width': true, 'label_class': 'col-xxl-4', 'input_class': 'col-xxl-8 text-start', } ) }} {{ fields.textareaField( 'comment', item.fields['comment'], _n('Comment', 'Comments', get_plural_number()), { 'full_width': true, 'readonly': expired, } ) }} {% if item.fields['date_answered'] > 0 %} {{ fields.datetimeField( 'date_answered', item.fields['date_answered'], __('Response date to the satisfaction survey.'), { 'full_width': true, 'readonly' : true } ) }} {% endif %} {% if not expired %} {{ include('components/form/buttons.html.twig') }} {% endif %} {% endif %} {% endif %} {% endblock %}