File tree Expand file tree Collapse file tree
modules/material/themes/material/silauth Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 event .preventDefault ();
1111 }
1212
13+ function forgotPassword () {
14+ let url = ' {{ password_forgot_url|e(' js' ) }}' ;
15+ const username = document .getElementById (' username' ).value ;
16+ if (username) {
17+ const separator = url .includes (' ?' ) ? ' &' : ' ?' ;
18+ url += separator + ' username=' + encodeURIComponent (username);
19+ }
20+ window .open (url, ' _blank' );
21+ }
22+
1323 // Remove invalid input state on page load
1424 window .addEventListener (' load' , () => {
1525 const clean = () => {
128138
129139 <div class =" mdl-card__actions" layout-children =" row" >
130140 {% if password_forgot_url is not empty %}
131- <a
132- href =" {{ password_forgot_url | e }}"
133- target =" _blank"
134- rel =" noopener"
141+ <button
142+ type =" button"
143+ onclick =" forgotPassword()"
135144 class =" mdl-button mdl-button--colored mdl-typography--caption"
136145 >
137146 {{ ' {login:forgot}' | trans }}
138- </a >
147+ </button >
139148 {% endif %}
140149
141150 <span flex ></span >
You can’t perform that action at this time.
0 commit comments