{# # --------------------------------------------------------------------- # # 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 must_change_password is defined and must_change_password %}
{{ __('Your password has expired. You must change it to be able to login.') }}
{% endif %} {% if token_ok is defined and token_ok == false %} {{ __('Your password reset request has expired or is invalid. Please renew it.') }} {% elseif messages_only is defined %} {{ include('components/messages_after_redirect_alerts.html.twig') }} {% else %}

{{ title }}

{% if type == 'update' %} {% import 'components/form/fields_macros.html.twig' as fields %} {{ fields.textField('name', session('glpiname'), __('Login'), { readonly: true, full_width: true, additional_attributes: { autocomplete: 'off', } }) }} {{ fields.passwordField('current_password', '', __('Current password'), { full_width: true, clearable: false, required: true, additional_attributes: { autocomplete: 'current-password', } }) }} {% endif %} {% if token is defined or type == 'update' %} {{ fields.passwordField('password', '', __('New password'), { full_width: true, clearable: false, required: true, additional_attributes: { onkeyup: "passwordCheck();", autocomplete: 'new-password', } }) }} {{ fields.passwordField('password2', '', __('New password confirmation'), { full_width: true, clearable: false, required: true, additional_attributes: { onkeyup: "passwordCheck();", autocomplete: 'new-password', } }) }} {% if config('use_password_security') %}

{{ __('Password security policy') }}

{{ include('components/user/password_security_checks.html.twig') }}
{% else %} {% endif %} {% set save_button = '' ~ __('Save new password') ~ '' %} {% elseif type == 'forget' %}

{{ __('Please enter your email address. An email will be sent to you and you will be able to choose a new password.') }}

{{ fields.emailField('email', '', _n('Email', 'Emails', 1), { full_width: true, required: true, }) }}
{% set save_button = '' ~ __('Send') ~ '' %} {% endif %} {% if errors is defined and errors|length > 0 %}
{% for error in errors %}
{{ error }} {% endfor %}
{% endif %} {% endif %}