Files
huntingclubroster/xsl/resetPassword.xsl
T
2026-10-18 19:27:17 -04:00

68 lines
3.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="UTF-8"/>
<!-- Parameters -->
<xsl:param name="APPLICATION_NAME"/>
<xsl:param name="CSRF_TOKEN"/>
<xsl:param name="TOKEN"/>
<xsl:param name="MESSAGE"/>
<xsl:param name="ERROR"/>
<xsl:param name="COMPLETE"/>
<xsl:template match="/">
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="referrer" content="no-referrer"/>
<title>Reset password</title>
<link href="css/themes/MyHuntingClubRoster/bootstrap.css" rel="stylesheet"/>
</head>
<body>
<main class="container py-5" style="max-width:560px">
<h1>
<xsl:value-of select="$APPLICATION_NAME"/>
</h1>
<h2>Reset password</h2>
<xsl:if test="$MESSAGE != ''">
<p role="status" class="alert alert-info">
<xsl:value-of select="$MESSAGE"/>
</p>
</xsl:if>
<xsl:if test="$ERROR != ''">
<p role="alert" class="alert alert-danger">
<xsl:value-of select="$ERROR"/>
</p>
</xsl:if>
<xsl:if test="$COMPLETE != 'TRUE'">
<form method="post" action="main.php">
<input type="hidden" name="action" value="resetpassword"/>
<input type="hidden" name="csrf_token" value="{$CSRF_TOKEN}"/>
<xsl:choose>
<xsl:when test="$TOKEN != ''">
<input type="hidden" name="step" value="reset"/>
<input type="hidden" name="token" value="{$TOKEN}"/>
<label for="password" class="form-label">New password (12–72 bytes)</label>
<input id="password" name="user_password" type="password" class="form-control mb-3" autocomplete="new-password" required="required"/>
<label for="confirmation" class="form-label">Confirm password</label>
<input id="confirmation" name="user_password_confirm" type="password" class="form-control mb-3" autocomplete="new-password" required="required"/>
<button class="btn btn-primary" type="submit">Set new password</button>
</xsl:when>
<xsl:otherwise>
<label for="email" class="form-label">Email address</label>
<input id="email" name="user_email" type="email" class="form-control mb-3" autocomplete="email" required="required" maxlength="100"/>
<button class="btn btn-primary" type="submit">Send reset link</button>
</xsl:otherwise>
</xsl:choose>
</form>
</xsl:if>
<p class="mt-3">
<a href="main.php">Sign in</a> · <a href="main.php?Xaction=resetpassword">Request a new link</a>
</p>
</main>
</body>
</html>
</xsl:template>
</xsl:stylesheet>