[% PROCESS _header.tt %]
[% PROCESS _message.tt %]

[% PROCESS _infobox.tt %]
<h1 class="mt-5">Change Password</h1>

<form action="conf.cgi" method="POST" autocomplete="off">
  <input type="submit" name="save" value="Update" style="display:none">
  <input type="hidden" name="action" value="user_password">
  <input type="hidden" name="CSRFtoken" value="[% get_user_token(c) %]">
  <div class="card min-w-[420px] max-w-[500px] w-full mx-auto mt-5">
    <div class="head">
      <h3>User: [% remote_user %]</h3>
    </div>
    <table class="body cellspacing">
      [% IF show_old_pass %]
      <tr>
        <th class="w-fit">Old Password</th>
        <td class="w-full pl-2">
          <div class="js-toggle-password relative">
            <input type="password" name="data.old" placeholder="old password" required autocomplete="off" class="w-full silent" />
            <i class="uil uil-eye-slash absolute z-10 right-0 top-0 mr-2 my-0 opacity-50 text-lg js-toggle-password"></i>
          </div>
        </td>
      </tr>
      [% END %]
      <tr>
        <th class="w-fit">New Password</th>
        <td class="w-full">
          <div class="js-toggle-password relative">
            <input type="password" name="data.password" placeholder="new password" required autocomplete="off" class="w-full silent" />
            <i class="uil uil-eye-slash absolute z-10 right-0 top-0 mr-2 my-0 opacity-50 text-lg js-toggle-password"></i>
          </div>
        </td>
      </tr>
      <tr>
        <th class="w-fit">Verify Password</th>
        <td class="w-full">
          <div class="js-toggle-password relative">
            <input type="password" name="data.password2" placeholder="verify password" required autocomplete="off" class="w-full silent" />
            <i class="uil uil-eye-slash absolute z-10 right-0 top-0 mr-2 my-0 opacity-50 text-lg js-toggle-password"></i>
          </div>
        </td>
      </tr>
    </table>
    <div class="footer justify-evenly">
      <a class="button w-24" href="user.cgi">Cancel</a>
      <input class="green w-24" type="submit" name="save" value="Update">
    </div>
  </div>
</form>

[% PROCESS _footer.tt %]
