{# @copyright   Copyright (C) 2010-2024 Combodo SAS #}
{# @license     http://opensource.org/licenses/AGPL-3.0 #}

{% extends "base.html.twig" %}

{% block login_content %}
	<div id="login-content">
		{% block user_message %}
		<h1>{{ 'UI:Login:ChangeYourPassword'|dict_s }}</h1>
		{% if bFailedLogin %}
			{% if sIssue is not null %}
				<p class="hilite">{{ sIssue|raw }}</p>
			{% else %}
				<p class="hilite">{{ 'UI:Login:IncorrectOldPassword'|dict_s }}</p>
			{% endif %}
		{% endif %}
		{% endblock %}
		<form method="post">
			<div id="login-form-content">
				<div id="login-input">
				    {% block old_password %}
					<div>
						<label for="old_pwd">{{ 'UI:Login:OldPasswordPrompt'|dict_s }}:</label>
                        <input type="password" id="old_pwd" class="ibo-input" name="old_pwd" value="">
                    </div>
                    {% endblock %}
					{% block new_password %}
					<div>
						<label for="new_pwd">{{ 'UI:Login:NewPasswordPrompt'|dict_s }}:</label>
                        <input type="password" id="new_pwd" class="ibo-input" name="new_pwd" value="">
                        <span class="message"></span>
                    </div>
                        <div>
                            <label for="retype_new_pwd">{{ 'UI:Login:RetypeNewPasswordPrompt'|dict_s }}:</label>
                            <input type="password" id="retype_new_pwd" class="ibo-input" name="retype_new_pwd" value="">
                            <span class="message"></span>
                        </div>
                    {% endblock %}
				</div>
				<div id="login-submit" class="changepwd-submit">
					<div>
						<input class="login-submit-primary" type="submit" onClick="return DoCheckPwd();" value="{{ 'UI:Button:ChangePassword'|dict_s }}">
						<span class="message"></span>

						<input class="login-submit-secondary" type="button" onClick="GoBack();" value="{{ 'UI:Button:Cancel'|dict_s }}">
					</div>
				</div>
			<input type="hidden" name="loginop" value="do_change_pwd">
			</div>
		</form>
		</div>
{% endblock %}

{% block script %}
	{% include 'changepwdform.js.twig' %}
{% endblock script %}
