Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 9764a03

Browse files
authored
Add "Forgot password?" link if a URL was provided
1 parent c3b3be2 commit 9764a03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

themes/material/core/loginuserpass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<?php
33
$siteKey = $this->data['recaptcha.siteKey'] ?? null;
44
$username = $this->data['username'] ?? null;
5+
$forgotPasswordUrl = $this->data['forgotPasswordUrl'] ?? null;
56

67
$errorCode = $this->data['errorcode'] ?? null;
78
$errorMessageKey = $this->data['errorparams'][1] ?? '{material:login:error_wronguserpass}';
@@ -90,6 +91,9 @@ function onRecaptchaLoad() {
9091
<button class="mdl-button mdl-button--colored mdl-button--raised">
9192
<?= $this->t('{material:login:button_login}') ?>
9293
</button>
94+
<?php if ( ! empty($forgotPasswordUrl)): ?>
95+
<a href="<?= htmlentities($forgotPasswordUrl); ?>">Forgot password?</a>
96+
<?php endif; ?>
9397
</form>
9498
</main>
9599

0 commit comments

Comments
 (0)