{#
# ---------------------------------------------------------------------
#
# 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 .
#
# ---------------------------------------------------------------------
#}
{% set field = field|default('password') %}
{% if config('use_password_security') %}
{{ config('password_min_length') }}
{% set checks = {
password_need_number: __('Digit'),
password_need_letter: __('Lowercase'),
password_need_caps: __('Uppercase'),
password_need_symbol: __('Symbol')
} %}
{% if config('password_need_number') or config('password_need_letter') or config('password_need_caps') or config('password_need_symbol') %}
{% set check_fields %}
{% for name, label in checks|filter((v, k) => config(k)) %}
{{ label }}
{% if not loop.last %}
,
{% endif %}
{% endfor %}
{% endset %}
{{ __('%1$s: %2$s')|format(__('Password must contains'), check_fields|raw)|raw }}
{% endif %}
{% endif %}