{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2025 Teclib' and contributors. # @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') %} {% set list_view = list_view|default(false) %} {% if config('use_password_security') %} <{{ list_view ? 'ul' : 'span' }} class="password-security-checks"> <{{ list_view ? 'li' : 'span' }} id="password_min_length" class="text-danger">{{ __('Minimum length: %s')|format(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 %} {% if not list_view %} , {% endif %} {% for name, label in checks|filter((v, k) => config(k)) %} <{{ list_view ? 'li' : 'span' }} id="{{ name }}" class="text-danger">{{ label }} {% if not loop.last and not list_view %} , {% endif %} {% endfor %} {% endset %} {% if list_view %}
  • {% endif %} <{{ list_view ? 'ul' : 'span' }} >{{ __('%1$s: %2$s')|format(__('Password must contain'), check_fields|raw)|raw }} {% if list_view %}
  • {% endif %} {% endif %} {% endif %}