1-
21<!DOCTYPE html>
3- < html xmlns ="http://www.w3.org/1999/xhtml "
2+ < ui:composition xmlns ="http://www.w3.org/1999/xhtml "
43 xmlns:h ="http://java.sun.com/jsf/html "
54 xmlns:f ="http://java.sun.com/jsf/core "
65 xmlns:ui ="http://java.sun.com/jsf/facelets "
76 xmlns:p ="http://primefaces.org/ui "
87 xmlns:c ="http://java.sun.com/jsp/jstl/core "
98 xmlns:jsf ="http://xmlns.jcp.org/jsf "
109 xmlns:fn ="http://java.sun.com/jsp/jstl/functions "
11- xmlns:sec ="http://www.springframework.org/security/tags ">
12-
13-
14- < h:head >
10+ xmlns:sec ="http://www.springframework.org/security/tags "
11+ template ="/WEB-INF/template/layout_anonymous.xhtml ">
12+
13+ < ui:define name ="title ">
14+ #{msg['forgot.password']}
15+ </ ui:define >
16+
17+ < ui:define name ="content ">
1518
16- < h:outputStylesheet library ="css " name ="primeflex.css "/>
17- < h:outputStylesheet library ="css " name ="themes/saga-blue.css "/>
18-
19- </ h:head >
19+ < div class ="surface-card p-4 shadow-2 border-round w-full lg:w-6 " style ="max-width:45em; ">
20+ < div class ="text-center mb-5 ">
21+ < h:link outcome ="index ">
22+ < p:graphicImage name ="logo.png " library ="images " alt ="Logo "
23+ height ="50 " styleClass ="mb-3 "/>
24+ </ h:link >
25+
26+ < div class ="text-900 text-3xl font-medium mb-3 "> #{msg['reset.your.password']}</ div >
27+
28+ </ div >
2029
21- < h:body >
22-
23- < div class ="h-screen flex align-items-center justify-content-center ">
24- < div class ="surface-card p-4 shadow-2 border-round w-full lg:w-6 ui-widget ">
25- < div class ="text-center mb-5 ">
26- < h:link outcome ="index ">
27- < p:graphicImage name ="logo.png " library ="images " alt ="Logo "
28- height ="50 " styleClass ="mb-3 "/>
29- </ h:link >
30-
31- < div class ="text-900 text-3xl font-medium mb-3 "> #{msg['reset.your.password']}</ div >
32-
33- </ div >
34-
35- < div >
36-
37- < h:form id ="passwordResetForm " prependId ="false ">
38-
39- < p:messages id ="messages " showDetail ="true " closable ="true " for ="passwordResetForm ">
40- < p:autoUpdate />
41- </ p:messages >
42-
43- < div class ="field ">
44- < p:outputLabel for ="passwordResetEmail " styleClass ="block text-900 font-medium mb-3 ">
45- #{msg['enter.email.to.get.password.reset.link']}
46- </ p:outputLabel >
47- < p:inputText id ="passwordResetEmail " value ="#{forgotPassword.passwordResetEmail} " placeholder ="#{msg['enter.email']} "
48- styleClass ="w-full " title ="#{msg['email']} " validatorMessage ="#{msg['invalid.email.format']} ">
49- <!-- use OWASP email regex from https://www.baeldung.com/java-email-validation-regex
50- "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$"
51- note: minor changes for use in JSF facelet
52- escape '&' with '&'
53- change "\\." to "\." -->
54- < f:validateRegex pattern ="^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$ "/>
55- </ p:inputText >
56- < p:message for ="passwordResetEmail " id ="passwordResetEmailMessage " styleClass ="mt-2 "/>
57- </ div >
58- < div class ="field ">
59- < p:commandButton ajax ="true " styleClass ="w-full " value ="#{msg['submit']} "
60- id ="resetPasswordSubmitButton " action ="#{forgotPassword.resetPassword} " update =":passwordResetForm "/>
61- </ div >
62-
63- </ h:form >
30+ < div >
31+
32+ < h:form id ="passwordResetForm " prependId ="false ">
33+
34+ < p:messages id ="messages " showDetail ="true " closable ="true " for ="passwordResetForm ">
35+ < p:autoUpdate />
36+ </ p:messages >
37+
38+ < div class ="field ">
39+ < p:outputLabel for ="passwordResetEmail " styleClass ="block text-900 font-medium mb-3 ">
40+ #{msg['enter.email.to.get.password.reset.link']}
41+ </ p:outputLabel >
42+ < p:inputText id ="passwordResetEmail " value ="#{forgotPassword.passwordResetEmail} " placeholder ="#{msg['enter.email']} "
43+ styleClass ="w-full " title ="#{msg['email']} " validatorMessage ="#{msg['invalid.email.format']} ">
44+ <!-- use OWASP email regex from https://www.baeldung.com/java-email-validation-regex
45+ "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$"
46+ note: minor changes for use in JSF facelet
47+ escape '&' with '&'
48+ change "\\." to "\." -->
49+ < f:validateRegex pattern ="^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$ "/>
50+ </ p:inputText >
51+ < p:message for ="passwordResetEmail " id ="passwordResetEmailMessage " styleClass ="mt-2 "/>
52+ </ div >
53+ < div class ="field ">
54+ < p:commandButton ajax ="true " styleClass ="w-full " value ="#{msg['submit']} "
55+ id ="resetPasswordSubmitButton " action ="#{forgotPassword.resetPassword} " update =":passwordResetForm "/>
56+ </ div >
57+
58+ </ h:form >
6459
65- </ div >
66- </ div >
67- </ div >
68-
69- </ h:body >
60+ </ div >
61+ </ div >
62+ </ ui:define >
7063
71- </ html >
64+ </ ui:composition >
0 commit comments