{% include 'overall_header.html' %}

<section class="iz-card iz-card--auth">
	<header class="iz-card__header">
		<h2 class="iz-card__title">{{ lang('RESET_PASSWORD') }}</h2>
	</header>

	<div class="iz-card__body">
		<form action="{{ U_RESET_PASSWORD_ACTION }}" method="post" id="reset_password" class="iz-form">
			<fieldset>

				{% if S_IS_PASSWORD_RESET %}

					{% if PASSWORD_RESET_ERRORS %}
						<div class="iz-alert iz-alert--danger" role="alert">
							{{ PASSWORD_RESET_ERRORS | join('<br>') }}
						</div>
						<div class="iz-space iz-space--sm"></div>
					{% endif %}

					<div class="iz-fieldgroup">

						<div class="iz-field">
							<label for="new_password" class="iz-field__label">{{ lang('NEW_PASSWORD') ~ lang('COLON') }}</label>
							<div class="iz-field__control">
								<input class="iz-input" type="password" name="new_password" id="new_password"
									size="25" maxlength="255" title="{{ lang('CHANGE_PASSWORD') }}" autocomplete="off" />
							</div>
						</div>

						<div class="iz-field">
							<label for="new_password_confirm" class="iz-field__label">{{ lang('CONFIRM_PASSWORD') ~ lang('COLON') }}</label>
							<div class="iz-field__control">
								<input class="iz-input" type="password" name="new_password_confirm" id="new_password_confirm"
									size="25" maxlength="255" title="{{ lang('CONFIRM_PASSWORD') }}" autocomplete="off" />
							</div>
						</div>

					</div>

				{% else %}

					{% if USERNAME_REQUIRED %}
						<div class="iz-alert iz-alert--info" role="status">
							{{ lang('EMAIL_NOT_UNIQUE') }}
						</div>
						<div class="iz-space iz-space--sm"></div>
					{% endif %}

					<div class="iz-fieldgroup">

						<div class="iz-field">
							<label for="email" class="iz-field__label">{{ lang('EMAIL_ADDRESS') ~ lang('COLON') }}</label>
							<div class="iz-field__help">{{ lang('EMAIL_REMIND') }}</div>
							<div class="iz-field__control">
								<input class="iz-input" type="email" name="email" id="email"
									size="25" maxlength="100" value="{{ EMAIL }}" autofocus />
							</div>
						</div>

						{% if USERNAME_REQUIRED %}
							<div class="iz-field">
								<label for="username" class="iz-field__label">{{ lang('USERNAME') ~ lang('COLON') }}</label>
								<div class="iz-field__control">
									<input class="iz-input" type="text" name="username" id="username" size="25" />
								</div>
							</div>
						{% endif %}

					</div>

				{% endif %}

				<div class="iz-space iz-space--md"></div>

				<div class="iz-actions">
					{{ S_HIDDEN_FIELDS }}
					<button type="submit" name="submit" id="submit" class="iz-btn iz-btn--primary" value="{{ lang('SUBMIT') }}" tabindex="2">
						{{ lang('SUBMIT') }}
					</button>
					{{ S_FORM_TOKEN }}
				</div>

			</fieldset>
		</form>
	</div>
</section>

{% include 'overall_footer.html' %}
