{# # --------------------------------------------------------------------- # # 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 %}
{{ fields.largeTitle(__('Preview')) }} {% if can_preview %}
{{ fields.dropdownField( template.fields['itemtype'], template.fields['itemtype']|itemtype_foreign_key, get_saved_option('NotificationTemplateTranslation', template.fields['itemtype']|itemtype_foreign_key, 0), template.fields['itemtype']|itemtype_name, { field_class: 'col-6', on_change: 'reloadTab("' ~ template.fields['itemtype']|itemtype_foreign_key ~ '="+this.value)', } ) }} {{ fields.htmlField('', call('NotificationEvent::dropdownEvents', [template.fields['itemtype'], { value: get_saved_option('NotificationTemplateTranslation', template.fields['itemtype']|itemtype_foreign_key ~ '_event', ''), on_change: 'reloadTab("' ~ template.fields['itemtype']|itemtype_foreign_key ~ '_event="+this.value)', display: false }]), 'NotificationEvent'|itemtype_name(1), { field_class: 'col-6' }) }}
{% else %} {% endif %} {% if data is not null %}
{{ __('Subject') }}
{{ data['subject'] }}
{{ __('Email text body') }} {{ __('Email HTML body') }}
{{ data['content_text']|nl2br }} {{ data['content_html']|raw }}
{% endif %}