{# # --------------------------------------------------------------------- # # 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 %}
{% if canedit %}
{% endif %} {{ call_plugin_hook('pre_item_form', { 'item': item, 'options': {} }) }} {{ call_plugin_hook('post_item_form', { 'item': item, 'options': {} }) }}
{{ __('Two-factor authentication (2FA)') }}
{{ __('If 2FA is enforced, users with access to this %s will be required to use 2FA at login even if this is not their default')|format(item.getTypeName(1)) }}
{{ __('Enforce 2FA') }} {% if item.getType() == 'Entity' %} {{ fields.dropdownArrayField('2fa_enforcement_strategy', item.fields['2fa_enforcement_strategy'], { (constant('Entity::CONFIG_PARENT')): __('Inheritance of the parent entity'), '0': __('No'), '1': __('Yes'), }, '', { 'no_label': true, add_field_html: inherited_value }) }} {% else %} {{ fields.dropdownYesNo('2fa_enforced', item.fields['2fa_enforced'], '', { 'no_label': true, }) }} {% endif %}
{% if canedit %}
{% endif %}