<?php declare(strict_types=1); ?>

<!-- Display change password form -->
<form class="form-horizontal" action="<?php echo TFISH_ADMIN_URL; ?>password.php" method="post" role="form" accept-charset="UTF-8">

<!-- Password -->
<div class="col-md-4 offset-md-4 form-group input-group">
  <input type="password" class="form-control is-valid" name="password" id="password" placeholder="<?php echo TFISH_NEW_PASSWORD; ?>" required>
  <div class="input-group-append">
    <span class="input-group-text" id="password-addon"><i class="fas fa-lock"></i></span>
  </div>
</div>

<!-- Confirm Password -->
<div class="col-md-4 offset-md-4 form-group input-group">
  <input type="password" class="form-control is-valid" name="confirmPassword" id="confirmPassword" placeholder="<?php echo TFISH_CONFIRM_PASSWORD; ?>">
  <div class="input-group-append">
    <span class="input-group-text" id="password-addon"><i class="fas fa-lock"></i></span>
  </div>
</div>

<!-- Submit -->
<div class="form-group is-valid col-md-4 offset-md-4 clearfix">
  <input type="hidden" name="token" value="<?php echo $_SESSION['token']; ?>" />
  <input type="hidden" name="op" value="submit" />
  <button type="submit" class="btn btn-primary float-left"><?php echo TFISH_SUBMIT ?></button>
</div>

</form>

<?php if (isset($report)): ?>
<!-- Advisory notices -->
<div class="row">
  <div class="col-12">
    <div class="text-left clearfix">
      <h2><?php echo TFISH_ERROR; ?></h2>
      <ul>
        <?php foreach ($report as $issue): ?>
        <li><?php echo $issue; ?></li>
        <?php endforeach; ?>
      </ul>
    </div>
  </div>
</div>
<?php endif; ?>