patx/gitman

<dialog id="password-dialog" class="password-dialog" aria-labelledby="password-title" data-reopen="{{'true' if get('password_error') else 'false'}}">
  <h2 id="password-title">Change password</h2>
  <form method="post" action="/settings/password">
    {{!csrf_field()}}
    <input type="text" name="username" value="{{user['username']}}" autocomplete="username" hidden>
    % if get('password_error'):
      <p class="alert" role="alert">{{password_error}}</p>
    % end
    <label>Current password
      <input type="password" name="current_password" autocomplete="current-password" maxlength="1024" required autofocus>
    </label>
    <label>New password
      <input type="password" name="new_password" autocomplete="new-password" minlength="8" maxlength="1024" required aria-describedby="password-hint">
    </label>
    <label>Confirm new password
      <input type="password" name="confirm_password" autocomplete="new-password" minlength="8" maxlength="1024" required>
    </label>
    <p class="muted" id="password-hint">At least 8 characters. Other browser sessions will be signed out.</p>
    <div class="password-actions">
      <button type="button" id="change-password-cancel">Cancel</button>
      <button type="submit">Change password</button>
    </div>
  </form>
</dialog>
<script src="/static/profile.js?v=1" defer></script>