Bring back an optional reCAPTCHA v2
Only showing it in the recovery view, not yet validating the result. Signed-off-by: Peter Marheine <peter@taricorp.net>
This commit is contained in:
@@ -69,6 +69,10 @@ public class RecoverController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settingsService.isCaptchaEnabled()) {
|
||||||
|
map.put("recaptchaSiteKey", settingsService.getRecaptchaSiteKey());
|
||||||
|
}
|
||||||
|
|
||||||
return new ModelAndView("recover", "model", map);
|
return new ModelAndView("recover", "model", map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,13 @@
|
|||||||
<input name="submit" type="submit" value="<fmt:message key="recover.send"/>">
|
<input name="submit" type="submit" value="<fmt:message key="recover.send"/>">
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
|
<c:if test="${not empty model.recaptchaSiteKey and empty model.sentTo}">
|
||||||
|
<p style="padding-top: 1em">
|
||||||
|
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||||
|
<div class="g-recaptcha" data-sitekey="${model.recaptchaSiteKey}"></div>
|
||||||
|
</p>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
<c:if test="${not empty model.sentTo}">
|
<c:if test="${not empty model.sentTo}">
|
||||||
<p style="padding-top: 1em"><fmt:message key="recover.success"><fmt:param value="${model.sentTo}"/></fmt:message></p>
|
<p style="padding-top: 1em"><fmt:message key="recover.success"><fmt:param value="${model.sentTo}"/></fmt:message></p>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|||||||
Reference in New Issue
Block a user