<?php

use Jet\Tr;
use Jet\UI;
use Jet\MVC_View;
use Jet\Form;
use Jet\Form_Renderer;
use Jet\UI_icon;

/**
 * @var MVC_View $this
 * @var Form $form
 */
$form = $this->getRaw( 'form' );

$form->renderer()->setDefaultLabelWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 4] );
$form->renderer()->setDefaultFieldWidth( [Form_Renderer::LJ_SIZE_MEDIUM => 8] );
?>

<div class="card">
	<h5 class="card-header">
		<?= Tr::_( 'Please change your password' ) ?>
		<?php require '_language_select.phtml'; ?>
	</h5>
	<?= $form->start() ?>
	<div class="card-body">
		<div style="display: flex; align-items: center;gap: 10px;">
			<div>
				<?= UI::icon( 'exclamation-circle' )->setSize( UI_icon::SIZE_EXTRA_LARGE ) ?>
			</div>
			<div>
				<?= Tr::_( '<b>Your password expired.</b><br/>Please change your password.' ); ?>
			</div>
		</div>

		<div style="padding-top: 30px;padding-left: 20%;padding-right: 20%">
			<?= $form->field( 'password' ) ?>
			<?= $form->field( 'password_check' ) ?>
		</div>

		<div class="text-right">
			<a href="?logout" class="btn btn-light"><?= Tr::_( 'Logout' ); ?></a>
			<input type="submit" value="<?= Tr::_( 'Change password' ); ?>" class="btn btn-primary"/>
		</div>
	</div>
	<?= $form->end() ?>
</div>

