Debian Codegraph @

doc/sources/admin/upgrade_templates.rst

raw
1 Template updates
2 ================
3
4 .. note::
5
6 The content of this page only applies to you if:
7
8 * You are using a custom LemonLDAP::NG theme
9 * AND you modified some of LemonLDAP::NG's base templates (``login.tpl``, etc.).
10
11 Note that templates whose name start with ``custom`` (``customfooter.tpl``, etc.) do NOT count.
12
13 In other words, you can safely ignore this entire page if:
14
15 * You only changed the logo or background
16 * OR you created a custom theme and the only templates you modified are the ones that start with ``custom`` (``customfooter.tpl``, etc.)
17
18
19 2.23.0
20 ------
21
22 Fix auto-translation
23 ^^^^^^^^^^^^^^^^^^^^
24
25 Some web browsers might attempt to translate pages that are already in the correct language, to fix this, apply the following patch to ``header.tpl``
26
27 .. code-block:: diff
28
29 --- a/lemonldap-ng-portal/site/templates/bootstrap/header.tpl
30 +++ b/lemonldap-ng-portal/site/templates/bootstrap/header.tpl
31 @@ -1,5 +1,5 @@
32 <!DOCTYPE html>
33 -<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
34 +<html xmlns="http://www.w3.org/1999/xhtml"<TMPL_IF "LANGUAGE"> lang="<TMPL_VAR "LANGUAGE">"</TMPL_IF>>
35 <head>
36 <title trspan="authPortal">Authentication portal</title>
37 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
38
39
40 Rename 2FA
41 ^^^^^^^^^^
42
43 A new update button is added in 2FA manager to let users rename their 2FA.
44
45 .. code-block:: diff
46
47 diff --git a/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl b/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
48 index dc3801b9d..fd5c84385 100644
49 --- a/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
50 +++ b/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
51 @@ -39,9 +39,21 @@
52 </TMPL_IF>
53 </TMPL_IF>
54 </td>
55 - <td class="align-middle"><TMPL_VAR NAME="name"></td>
56 + <td class="align-middle">
57 + <input id='input-<TMPL_VAR NAME="epoch">' type="text" class="form-control" value="<TMPL_VAR NAME="name">" />
58 + </td>
59 <td class="data-epoch"><TMPL_VAR NAME="epoch"></td>
60 <td>
61 + <span
62 + device='<TMPL_VAR NAME="type">'
63 + epoch='<TMPL_VAR NAME="epoch">'
64 + prefix='<TMPL_VAR NAME="prefix">'
65 + oldlabel='<TMPL_VAR NAME="name">'
66 + class="btn btn-success update2f"
67 + type="button">
68 + <span class="fa fa-pencil"></span>
69 + <span trspan="rename">Rename</span>
70 + </span>
71 <TMPL_IF NAME="delAllowed">
72 <span
73 device='<TMPL_VAR NAME="type">'
74
75
76 Typo in oidcOfflineTokens.tpl
77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
79 .. code-block:: diff
80
81 diff --git a/lemonldap-ng-portal/site/templates/bootstrap/oidcOfflineTokens.tpl b/lemonldap-ng-portal/site/templates/bootstrap/oidcOfflineTokens.tpl
82 index 2080d70f5ca15748e2c59908a3e753df1a06740e..cc7ad752c5e30eb27097345d7bcbf003d43a2794 100644
83 --- a/lemonldap-ng-portal/site/templates/bootstrap/oidcOfflineTokens.tpl
84 +++ b/lemonldap-ng-portal/site/templates/bootstrap/oidcOfflineTokens.tpl
85 @@ -1,4 +1,4 @@
86 -<script type="text/javascript" src="<TMPL_VAR NAME="js">""></script>
87 +<script type="text/javascript" src="<TMPL_VAR NAME="js">"></script>
88 <script type="application/init">
89 {"sessions":<TMPL_VAR NAME="sessions">}
90 </script>
91
92 2.22.0
93 ------
94
95 Authentication choice
96 ^^^^^^^^^^^^^^^^^^^^^
97
98 To prevent having a digit as first character of an identifier, the choice id value has been prefixed by ``id_``. This could break the remember auth choice plugin if you have a customized ``login.tpl``
99
100 .. code-block:: diff
101
102 --- a/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
103 +++ b/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
104 @@ -33,7 +33,7 @@
105 <div class="collapse navbar-collapse" id="navbarSupportedContent">
106 <ul class="navbar-nav mr-auto">
107 <TMPL_LOOP NAME="AUTH_LOOP">
108 - <li class="nav-item" title="<TMPL_VAR NAME="key">"><a class="nav-link" href="#<TMPL_VAR NAME="key">"><TMPL_VAR NAME="name"></a></li>
109 + <li class="nav-item" title="<TMPL_VAR NAME="key">"><a class="nav-link" href="#id_<TMPL_VAR NAME="key">"><TMPL_VAR NAME="name"></a></li>
110 </TMPL_LOOP>
111 </ul>
112 </div>
113 @@ -44,7 +44,7 @@
114 <!-- Forms -->
115 <TMPL_LOOP NAME="AUTH_LOOP">
116
117 - <div id="<TMPL_VAR NAME="key">">
118 + <div id="id_<TMPL_VAR NAME="key">">
119
120 <form id="lform<TMPL_VAR NAME="module">" action="<TMPL_VAR NAME="url">" method="post" class="login <TMPL_VAR NAME="module">">
121
122 Prevent 2FA multiple submit
123 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
125 The way we prevent multiple submit of a form has changed.
126
127 We now catch the `submit` event of the form instead of the `click` event of the submit button.
128
129 This means the CSS class `btn-single-submit` must be removed from the submit button, and the `data-property="single-submit"` must be added to the form.
130
131 We also add the `required` property to code input to avoid submitting an empty form.
132
133 .. code-block:: diff
134
135 --- a/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
136 +++ b/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
137 @@ -10,7 +10,7 @@
138
139 <div class="card">
140
141 -<form action="<TMPL_IF "TARGET"><TMPL_VAR NAME="TARGET"><TMPL_ELSE>/ext2fcheck</TMPL_IF>" method="post" class="password" role="form">
142 +<form action="<TMPL_IF "TARGET"><TMPL_VAR NAME="TARGET"><TMPL_ELSE>/ext2fcheck</TMPL_IF>" method="post" class="password" role="form" data-property="single-submit">
143 <div class="form">
144 <input type="hidden" id="token" name="token" value="<TMPL_VAR NAME="TOKEN">" />
145 <input type="hidden" id="checkLogins" name="checkLogins" value="<TMPL_VAR NAME="CHECKLOGINS">" />
146 @@ -20,7 +20,7 @@
147 <div class="input-group-prepend">
148 <span class="input-group-text"><label for="extcode" class="mb-0"><i class="fa fa-lock"></i></label></span>
149 </div>
150 - <input name="code" value="" type="text" class="form-control" id="extcode" trplaceholder="code" autocomplete="one-time-code" />
151 + <input name="code" value="" type="text" class="form-control" id="extcode" trplaceholder="code" autocomplete="one-time-code" required />
152 </div>
153 </div>
154 <div class="buttons">
155
156 --- a/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
157 +++ b/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
158 @@ -10,7 +10,7 @@
159
160 <div class="card">
161
162 -<form action="<TMPL_VAR NAME="TARGET">" method="post" class="password" role="form">
163 +<form action="<TMPL_VAR NAME="TARGET">" method="post" class="password" role="form" data-property="single-submit">
164 <div class="form">
165 <input type="hidden" id="token" name="token" value="<TMPL_VAR NAME="TOKEN">" />
166 <input type="hidden" id="checkLogins" name="checkLogins" value="<TMPL_VAR NAME="CHECKLOGINS">" />
167 @@ -20,11 +20,11 @@
168 <div class="input-group-prepend">
169 <span class="input-group-text"><label for="extcode" class="mb-0"><i class="fa fa-lock"></i></label></span>
170 </div>
171 - <input name="code" value="" type="text" class="form-control" id="extcode" trplaceholder="code" autocomplete="one-time-code" />
172 + <input name="code" value="" type="text" class="form-control" id="extcode" trplaceholder="code" autocomplete="one-time-code" required />
173 </div>
174 </div>
175 <div class="buttons mb-3">
176 - <button type="submit" class="btn btn-success btn-single-submit">
177 + <button type="submit" class="btn btn-success">
178 <span class="fa fa-sign-in"></span>
179 <span trspan="connect">Connect</span>
180 </button>
181
182 Display if browser is already trusted
183 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
184
185 An information message is diplayed instead of the checkbox.
186
187 .. code-block:: diff
188
189 --- a/lemonldap-ng-portal/site/templates/bootstrap/checklogins.tpl
190 +++ b/lemonldap-ng-portal/site/templates/bootstrap/checklogins.tpl
191 @@ -12,6 +12,9 @@
192 </div>
193 </TMPL_IF>
194 <TMPL_IF NAME="STAYCONNECTED">
195 + <TMPL_IF NAME="BROWSER_ALREADY_TRUSTED">
196 + <div class="message message-success alert alert-success"><span trspan="browserAlreadyTrusted">This browser is already trusted</span></div>
197 + <TMPL_ELSE>
198 <div class="input-group mb-3">
199 <div class="input-group-prepend">
200 <div class="input-group-text">
201 @@ -22,4 +25,5 @@
202 <label id="stayConnectedLabel" for="stayconnected" trspan="stayConnected">Stay connected on this device</label>
203 </p>
204 </div>
205 + </TMPL_IF>
206 </TMPL_IF>
207
208 2.21.0
209 ------
210
211 Floating category menu
212 ^^^^^^^^^^^^^^^^^^^^^^
213
214 You can now display an applications category as a floating menu by setting a category name
215 in ``General Parameters`` > ``Portal`` > ``Customization`` > ``Floating category name``.
216 Apply the following patches to ``menu.tpl``, ``footer.tpl`` and ``script.tpl`` to use this new feature:
217
218 .. code-block:: diff
219
220 --- a/lemonldap-ng-portal/site/templates/bootstrap/menu.tpl
221 +++ b/lemonldap-ng-portal/site/templates/bootstrap/menu.tpl
222 @@ -129,7 +129,7 @@
223 <TMPL_IF NAME="category">
224 <!-- Category -->
225
226 - <div class="category cat-level-<TMPL_VAR NAME="catlevel"> <TMPL_VAR NAME="catid"> card border-secondary" id="sort_<TMPL_VAR NAME="__counter__">">
227 + <div class="category cat-level-<TMPL_VAR NAME="catlevel"> <TMPL_VAR NAME="catid"> card border-secondary" name="<TMPL_VAR NAME="catname">" id="sort_<TMPL_VAR NAME="__counter__">" >
228
229 <div class="card-header text-white bg-secondary">
230 <h4 class="catname card-title"><TMPL_VAR NAME="catname"><span><i class="fa fa-arrows-v float-right" ></i></span></h4>
231
232 --- a/lemonldap-ng-portal/site/templates/bootstrap/footer.tpl
233 +++ b/lemonldap-ng-portal/site/templates/bootstrap/footer.tpl
234 @@ -1,10 +1,12 @@
235 </div>
236
237 -<TMPL_IF NAME="SCROLL_TOP">
238 - <button type="button" class="btn btn-danger btn-floating btn-lg" id="btn-back-to-top">
239 - <i class="fa fa-arrow-circle-up"></i>
240 - </button>
241 -</TMPL_IF>
242 + <TMPL_IF NAME="SCROLL_TOP">
243 + <button type="button" class="btn btn-danger btn-floating btn-lg" id="btn-back-to-top">
244 + <i class="fa fa-chevron-up"></i>
245 + </button>
246 + </TMPL_IF>
247 +
248 + <div class="col-6" id="floating-menu"></div>
249
250 <div id="footer">
251 <div class="row">
252
253 --- a/lemonldap-ng-portal/site/templates/common/script.tpl
254 +++ b/lemonldap-ng-portal/site/templates/common/script.tpl
255 @@ -49,7 +49,7 @@
256 "enablePasswordDisplay":<TMPL_VAR NAME="ENABLE_PASSWORD_DISPLAY" DEFAULT="0">,
257 "dontStorePassword":<TMPL_VAR NAME="DONT_STORE_PASSWORD" DEFAULT="0">,
258 "scrollTop":<TMPL_VAR NAME="SCROLL_TOP" DEFAULT="0">,
259 - "floatingId":<TMPL_VAR NAME="FLOATING_ID" DEFAULT="0">,
260 + "floatingCategory":"<TMPL_VAR NAME="FLOATING_CAT">",
261 "sameSite":"<TMPL_VAR NAME="SAMESITE">",
262 "cookieSecure":<TMPL_VAR NAME="COOKIESECURE">,
263 "csrf_token":"<TMPL_VAR NAME="CSRF_TOKEN">"
264
265
266 Cache-busting tags
267 ^^^^^^^^^^^^^^^^^^
268
269 When upgrading to a new LemonLDAP::NG version, you may encounter bugs due to
270 old, cached javascript and CSS files being still used by some web browsers.
271 This version of LemonLDAP::NG introduces a ``?v=`` parameter in static resource
272 URLs to avoid this. The version ID is incremented on every version change.
273
274 You can use the *Cache-busting salt* parameter in the manager to change the
275 value, which will force a reload of static resources for all your users.
276
277 This change is not mandatory, but is recommended to avoid bugs. In order to implement it, add
278
279 ``?v=<TMPL_VAR CACHE_TAG>`` at the end of all static resource URLs in your custom templates.
280
281 JWT headers restored
282 ^^^^^^^^^^^^^^^^^^^^
283
284 JSON-Web-Tokens didn't have the "typ" header starting from version 2.17.0.
285 This header is set to "JWT" except for access_token where value is "at+JWT".
286 If you encounter issues with this value, a parameter has been added in the
287 manager to not insert the "typ" header into JWT: **Don't insert typ header**.
288
289 2.20.0
290 ------
291
292 Password policy
293 ^^^^^^^^^^^^^^^
294
295 The requirement for new password and new password confirmation to match is now
296 displayed in the password policy, if you changed ``passwordpolicy.tpl``, you
297 need to update it:
298
299 .. code-block:: diff
300
301 --- a/lemonldap-ng-portal/site/templates/bootstrap/passwordpolicy.tpl
302 +++ b/lemonldap-ng-portal/site/templates/bootstrap/passwordpolicy.tpl
303 @@ -11,8 +11,9 @@
304 </li>
305 </TMPL_IF>
306 </TMPL_LOOP>
307 + <li>
308 + <i id="samepassword-feedback" class="fa fa-li"> </i>
309 + <span trspan="passwordPolicySamePwd"></span>
310 + </li>
311 </ul>
312 - <TMPL_IF NAME="PPOLICY_NOPOLICY">
313 - <span trspan="passwordPolicyNone">You are free to choose your password! ;-)</span>
314 - </TMPL_IF>
315 </div>
316
317
318 WebAuthn registration and authentication
319 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
320
321 If you modified the `webauthn2fcheck.tpl` or `/webauthn2fregister.tpl`, you
322 will start noticing harmless but confusing error messages during WebAuthn
323 checks or registration. In order to fix this, remove the javascript inclusions
324 from both templates.
325
326
327 .. code-block:: diff
328
329 --- a/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fcheck.tpl
330 +++ b/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fcheck.tpl
331 @@ -17,13 +17,6 @@
332 <script type="application/init">
333 <TMPL_VAR NAME="DATA">
334 </script>
335 -<!-- //if:jsminified
336 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthn-ui.min.js"></script>
337 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthncheck.min.js"></script>
338 -//else -->
339 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthn-ui.js"></script>
340 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthncheck.js"></script>
341 -<!-- //endif -->
342 </TMPL_IF>
343
344 </div>
345
346 --- a/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fregister.tpl
347 +++ b/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fregister.tpl
348 @@ -43,12 +43,4 @@
349 <span trspan="goToPortal">Go to portal</span>
350 </a>
351 </div>
352 -
353 -<!-- //if:jsminified
354 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthn-ui.min.js"></script>
355 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthnregistration.min.js"></script>
356 -//else -->
357 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthn-ui.js"></script>
358 - <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/webauthnregistration.js"></script>
359 -<!-- //endif -->
360 <TMPL_INCLUDE NAME="footer.tpl">
361
362 Also update `2fregisters.tpl` to that resident credentials are properly show to the user:
363
364 .. code-block:: diff
365
366 --- a/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
367 +++ b/lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
368 @@ -33,6 +33,11 @@
369 <TMPL_ELSE>
370 <TMPL_VAR NAME="type">
371 </TMPL_IF>
372 + <TMPL_IF name="type_WebAuthn">
373 + <TMPL_IF name="resident">
374 + <span trattribute="title:webauthnResident" class="fa fa-key"></span>
375 + </TMPL_IF>
376 + </TMPL_IF>
377 </td>
378 <td class="align-middle"><TMPL_VAR NAME="name"></td>
379 <td class="data-epoch"><TMPL_VAR NAME="epoch"></td>
380
381 TOTP check
382 ^^^^^^^^^^
383
384 To avoid the TOTP code been submitted twice, add `btn-single-submit` class to TOTP check submit in `totp2fcheck.tpl`:
385
386 .. code-block:: diff
387
388 --- a/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
389 +++ b/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
390 @@ -24,7 +24,7 @@
391 </div>
392 </div>
393 <div class="buttons mb-3">
394 - <button type="submit" class="btn btn-success">
395 + <button type="submit" class="btn btn-success btn-single-submit">
396 <span class="fa fa-sign-in"></span>
397 <span trspan="connect">Connect</span>
398 </button>
399
400 Vulnerability in templates
401 ^^^^^^^^^^^^^^^^^^^^^^^^^^
402
403 In order to fix a vulnerability in templates, apply the following patch:
404
405 .. code-block:: diff
406
407 --- a/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl
408 +++ b/lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl
409 @@ -11,7 +11,7 @@
410 <div class="input-group-prepend">
411 <span class="input-group-text"><label for="userfield" class="mb-0"><i class="fa fa-user"></i></label></span>
412 </div>
413 - <input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="user" aria-required="true"/>
414 + <input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN" ESCAPE=HTML>" trplaceholder="user" aria-required="true"/>
415 </div>
416 <div class="input-group mb-3">
417 <div class="input-group-prepend">
418
419 --- a/lemonldap-ng-portal/site/templates/bootstrap/globallogout.tpl
420 +++ b/lemonldap-ng-portal/site/templates/bootstrap/globallogout.tpl
421 @@ -6,7 +6,7 @@
422 <div class="row">
423 <TMPL_IF NAME="SESSIONS">
424 <div class="card col border-secondary">
425 - <div class="text-center bg-light text-dark"><b><span trspan="activeSessions">ACTIVE SSO SESSIONS</span>: <u><TMPL_VAR NAME="LOGIN"></u></b></div>
426 + <div class="text-center bg-light text-dark"><b><span trspan="activeSessions">ACTIVE SSO SESSIONS</span>: <u><TMPL_VAR NAME="LOGIN" ESCAPE=HTML></u></b></div>
427 <table class="table table-sm table-hover text-center">
428 <thead>
429 <tr>
430
431 --- a/lemonldap-ng-portal/site/templates/bootstrap/gpgform.tpl
432 +++ b/lemonldap-ng-portal/site/templates/bootstrap/gpgform.tpl
433 @@ -5,7 +5,7 @@
434 <div class="input-group-prepend">
435 <span class="input-group-text"><label for="userfield" class="mb-0"><i class="fa fa-user"></i></label></span>
436 </div>
437 - <input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="mail" required aria-required="true" />
438 + <input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN" ESCAPE=HTML>" trplaceholder="mail" required aria-required="true" />
439 </div>
440
441 <div class="input-group mb-3">
442
443 --- a/lemonldap-ng-portal/site/templates/bootstrap/password.tpl
444 +++ b/lemonldap-ng-portal/site/templates/bootstrap/password.tpl
445 @@ -17,11 +17,11 @@
446
447 <TMPL_IF NAME="LOGIN">
448 <div class="input-group mb-3">
449 - <input name="user" type="hidden" value="<TMPL_VAR NAME=LOGIN>" />
450 + <input name="user" type="hidden" value="<TMPL_VAR NAME=LOGIN ESCAPE=HTML>" />
451 <div class="input-group-prepend">
452 <span class="input-group-text"><label for="staticUser" class="mb-0"><i class="fa fa-user"></i></label></span>
453 </div>
454 - <input id="staticUser" type="text" readonly class="form-control" value="<TMPL_VAR NAME=LOGIN>" />
455 + <input id="staticUser" type="text" readonly class="form-control" value="<TMPL_VAR NAME=LOGIN ESCAPE=HTML>" />
456 </div>
457 </TMPL_IF>
458
459
460
461 Multiple changes to login form
462 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
463
464 In order to implement WebAuthn changes, fix the template vulnerability, and improve focus management, update ``standardform.tpl``:
465
466 .. code-block:: diff
467
468 --- a/lemonldap-ng-portal/site/templates/bootstrap/standardform.tpl
469 +++ b/lemonldap-ng-portal/site/templates/bootstrap/standardform.tpl
470 @@ -10,21 +10,23 @@
471 <div class="input-group-prepend">
472 <span class="input-group-text"><label for="userfield" class="mb-0"><i class="fa fa-user"></i></label></span>
473 </div>
474 - <input id="userfield" name="user" type="text" class="form-control" value="<TMPL_VAR NAME="LOGIN">" trplaceholder="login" required aria-required="true"/>
475 + <input id="userfield" name="user" type="text" class="form-control"
476 + value="<TMPL_IF NAME="ACTIVE_FORM"><TMPL_VAR NAME="LOGIN" ESCAPE=HTML></TMPL_IF>"
477 + trplaceholder="login" required aria-required="true" autocomplete="webauthn" <TMPL_UNLESS NAME="LOGIN">autofocus</TMPL_UNLESS> />
478 </div>
479 <div class="input-group mb-3">
480 <div class="input-group-prepend">
481 <span class="input-group-text"><label for="passwordfield" class="mb-0"><i class="fa fa-lock"></i></label></span>
482 </div>
483 <TMPL_IF NAME="DONT_STORE_PASSWORD">
484 - <input id="passwordfield" name="password" type="text" class="form-control" trplaceholder="password" autocomplete="off" required aria-required="true" aria-hidden="true"/>
485 + <input id="passwordfield" name="password" type="text" class="form-control" trplaceholder="password" autocomplete="off" required aria-required="true" aria-hidden="true" <TMPL_IF NAME="LOGIN">autofocus</TMPL_IF> />
486 <TMPL_IF NAME="ENABLE_PASSWORD_DISPLAY">
487 <div class="input-group-append">
488 <span class="input-group-text"><i id="toggle_password" class="fa fa-eye-slash toggle-password"></i></span>
489 </div>
490 </TMPL_IF>
491 <TMPL_ELSE>
492 - <input id="passwordfield" name="password" type="password" class="form-control" trplaceholder="password" required aria-required="true"/>
493 + <input id="passwordfield" name="password" type="password" class="form-control" trplaceholder="password" required aria-required="true" <TMPL_IF NAME="LOGIN">autofocus</TMPL_IF> />
494 <TMPL_IF NAME="ENABLE_PASSWORD_DISPLAY">
495 <div class="input-group-append">
496 <span class="input-group-text"><i id="toggle_password" class="fa fa-eye-slash toggle-password"></i></span>
497
498
499
500 2.19.0
501 ------
502
503 TOTP registration
504 ^^^^^^^^^^^^^^^^^
505
506 The TOTP registration now offers a ``otpauth://`` url that can automatically open your TOTP application when viewed on mobile. Apply the following patch to ``totp2fregister.tpl`` to use this new feature:
507
508 .. code-block:: diff
509
510 --- a/lemonldap-ng-portal/site/templates/bootstrap/totp2fregister.tpl
511 +++ b/lemonldap-ng-portal/site/templates/bootstrap/totp2fregister.tpl
512 @@ -11,8 +11,8 @@
513 <div class="col-md-6 text-center">
514 <div >
515 <p>&#x2460; <span trspan="totpQrCode"></span></p>
516 - <canvas id="qr"></canvas>
517 -
518 + <p><a class="otpauth-url" href=""><canvas id="qr"></canvas></a></p>
519 + <p><span trspan="totpOrTouch"></span></p>
520 <p><span trspan="totpSecretKey"></span></p>
521 <tt id="secret"></tt>
522 </div>
523
524 Second factor retry
525 ^^^^^^^^^^^^^^^^^^^
526
527 It is recommended to apply the following patch to your custom templates so that users will have a more friendly error message when retrying their 2FA:
528
529 .. code-block:: diff
530
531 --- a/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
532 +++ b/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
533 @@ -2,7 +2,11 @@
534
535 <main id="logincontent" class="container">
536
537 +<TMPL_IF NAME="AUTH_ERROR">
538 + <div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert" role="<TMPL_VAR NAME="AUTH_ERROR_ROLE">"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
539 +<TMPL_ELSE>
540 <div class="message message-positive alert"><span trspan="<TMPL_IF "LEGEND"><TMPL_VAR "LEGEND"><TMPL_ELSE>enterExt2fCode</TMPL_IF>"></span></div>
541 +</TMPL_IF>
542
543 <div class="card">
544
545 --- a/lemonldap-ng-portal/site/templates/bootstrap/password2fcheck.tpl
546 +++ b/lemonldap-ng-portal/site/templates/bootstrap/password2fcheck.tpl
547 @@ -2,7 +2,11 @@
548
549 <main id="logincontent" class="container">
550
551 +<TMPL_IF NAME="AUTH_ERROR">
552 + <div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert" role="<TMPL_VAR NAME="AUTH_ERROR_ROLE">"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
553 +<TMPL_ELSE>
554 <div class="message message-positive alert"><span trspan="enterPassword">Enter your password</span></div>
555 +</TMPL_IF>
556
557 <div class="card">
558
559 --- a/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
560 +++ b/lemonldap-ng-portal/site/templates/bootstrap/totp2fcheck.tpl
561 @@ -2,7 +2,11 @@
562
563 <main id="logincontent" class="container">
564
565 +<TMPL_IF NAME="AUTH_ERROR">
566 + <div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert" role="<TMPL_VAR NAME="AUTH_ERROR_ROLE">"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
567 +<TMPL_ELSE>
568 <div class="message message-positive alert"><span trspan="enterTotpCode"></span></div>
569 +</TMPL_IF>
570
571 <div class="card">
572
573 --- a/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fcheck.tpl
574 +++ b/lemonldap-ng-portal/site/templates/bootstrap/webauthn2fcheck.tpl
575 @@ -3,7 +3,7 @@
576 <div class="container">
577
578 <TMPL_IF NAME="AUTH_ERROR">
579 - <div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
580 + <div class="message message-<TMPL_VAR NAME="AUTH_ERROR_TYPE"> alert" role="<TMPL_VAR NAME="AUTH_ERROR_ROLE">"><span trmsg="<TMPL_VAR NAME="AUTH_ERROR">"></span></div>
581 </TMPL_IF>
582 <TMPL_IF NAME="DATA">
583 <div id="color" class="message message-positive alert"><span id="msg" trspan="webAuthnRequired"></span></div>
584
585
586 2.18.0
587 ------
588
589 Password policy display
590 ^^^^^^^^^^^^^^^^^^^^^^^
591
592 It is recommended to replace your custom theme's ``passwordpolicy.tpl`` by the one that is provided in the ``bootstrap`` theme.
593
594 If you use the :doc:`Have I Been Pwned <checkhibp>` plugin, this is a required change because the modifications in 2.18 will break this particular plugin.
595
596 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
597
598 Email templates
599 ^^^^^^^^^^^^^^^
600
601 To avoid email sent by LL::NG being flagged as spam, we remove inline images in HTML content. You can add them back by customising the email templates and eithier use inline images (cid) or links to external resources.
602
603 Note that we now send a plain text version of the mail attached to the HTML email.
604
605
606 2.17.0
607 ------
608
609
610 Font Awesome application icons
611 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
612
613 It is now possible to use Font Awesome icons in the application menu.
614
615 If you modified the default ``menu.tpl`` template, you need to update it:
616
617 .. code-block:: diff
618
619 --- a/lemonldap-ng-portal/site/templates/bootstrap/menu.tpl
620 +++ b/lemonldap-ng-portal/site/templates/bootstrap/menu.tpl
621 @@ -146,9 +146,13 @@
622 <!-- Logo (optional) -->
623 <TMPL_IF NAME="applogo">
624 <div class="col-3">
625 + <TMPL_IF NAME="applogo_icon">
626 + <span class="applogo fa-3x fa fa-<TMPL_VAR NAME="applogo"> <TMPL_VAR NAME="appid">"></span>
627 + <TMPL_ELSE>
628 <img src="<TMPL_VAR NAME="STATIC_PREFIX">common/apps/<TMPL_VAR NAME="applogo">"
629 class="applogo <TMPL_VAR NAME="appid"> img-fluid"
630 alt="" />
631 + </TMPL_IF>
632 </div>
633 <div class="col-9">
634 <TMPL_ELSE>
635
636 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
637
638 Password policy
639 ^^^^^^^^^^^^^^^
640
641 It is recommended to update your theme's ``passwordpolicy.tpl`` to correctly display special characters in password policies:
642
643 .. code-block:: diff
644
645 --- a/lemonldap-ng-portal/site/templates/bootstrap/passwordpolicy.tpl
646 +++ b/lemonldap-ng-portal/site/templates/bootstrap/passwordpolicy.tpl
647 @@ -34,7 +34,7 @@
648 <TMPL_IF NAME="PPOLICY_ALLOWEDSPECHAR">
649 <li>
650 <i id="ppolicy-allowedspechar-feedback" class="fa fa-li"> </i>
651 - <span trspan="passwordPolicySpecialChar">Allowed special characters:</span> <TMPL_VAR NAME="PPOLICY_ALLOWEDSPECHAR">
652 + <span trspan="passwordPolicySpecialChar">Allowed special characters:</span> <TMPL_VAR NAME="PPOLICY_ALLOWEDSPECHAR" ESCAPE="html">
653 </li>
654 </TMPL_IF>
655 <TMPL_IF NAME="ENABLE_CHECKHIBP">
656
657 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
658
659
660 2.0.16
661 ------
662
663 Changes in templates
664 ^^^^^^^^^^^^^^^^^^^^
665
666 The default ``skin.min.js`` file has been updated in this release, be sure to copy ``skin.min.js`` from ``bootstrap`` into your custom theme.
667
668 Due to some internal changes in the way registrable second factors are handled, it is recommended to update your custom `2fregisters.tpl`
669
670 .. code-block:: diff
671
672 @@ -32,7 +32,14 @@
673 <td class="data-epoch"><TMPL_VAR NAME="epoch"></td>
674 <td>
675 <TMPL_IF NAME="delAllowed">
676 - <span device='<TMPL_VAR NAME="type">' epoch='<TMPL_VAR NAME="epoch">' class="btn btn-danger" role="button" data-toggle="modal" data-target="#remove2fModal">
677 + <span
678 + device='<TMPL_VAR NAME="type">'
679 + epoch='<TMPL_VAR NAME="epoch">'
680 + prefix='<TMPL_VAR NAME="prefix">'
681 + class="btn btn-danger"
682 + role="button"
683 + data-toggle="modal"
684 + data-target="#remove2fModal">
685 <span class="fa fa-minus-circle"></span>
686 <span trspan="unregister">Unregister</span>
687 </span>
688
689 To fix behavior of checkbox "generate my password" in password reset screen, update your custom `mail.tpl` (see `commit <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/7875d3c762649aa401c16e8546f2a81a24c9019a>`__)
690
691 To have the new tooltip feature on IDP choice screen, update your custom `idpchoice.tpl` (see `commit <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/15508470b6285a08e178f914fc3c828489f47e47#9b667b5f99a71a2740979a69f8baa66120a6471e>`__)
692
693 For the message box in menu when no applications are allowed, update your custom `menu.tpl` (see `commit <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/d6aa04291f74a92a04177ded34ac416caf0c78a2>`__)
694
695 For the new password policy balcklist feature, update your custom `passwordpolicy.tpl` (see `commit <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/merge_requests/318/diffs?commit_id=a1a6c2b84b9d5852d4561709d8c78f4b836cbacb#25b8124a904b66761e518050b617b093ca6ea929>`__)
696
697 New template files that should be linked or copied in your custom theme:
698
699 * `generic2fregister.tpl`
700 * `password2fcheck.tpl`
701 * `password2fregister.tpl`
702
703 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
704
705 2.0.15
706 ------
707
708 Re-send 2FA code
709 ^^^^^^^^^^^^^^^^
710
711 The :doc:`mail <mail2f>`, :doc:`external <external2f>` and :doc:`REST <rest2f>` based 2FA types can now re-send the user code if delivery failed for some reason. If you use custom templates, you must update ``ext2fcheck.tpl``
712
713 .. code-block:: diff
714
715 --- a/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
716 +++ b/lemonldap-ng-portal/site/templates/bootstrap/ext2fcheck.tpl
717 @@ -26,6 +26,12 @@
718 </button>
719 </div>
720 <div class="buttons">
721 + <TMPL_IF "RESENDTARGET">
722 + <button type="submit" class="btn btn-primary" formaction="<TMPL_VAR "RESENDTARGET">">
723 + <span class="fa fa-repeat"></span>
724 + <span trspan="resendCode">Re-send code</span>
725 + </button>
726 + </TMPL_IF>
727 <a href="<TMPL_VAR NAME="PORTAL_URL">?cancel=1&skin=<TMPL_VAR NAME="SKIN">" class="btn btn-primary" role="button">
728 <span class="fa fa-home"></span>
729 <span trspan="cancel">Cancel</span>
730
731
732 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
733
734 Customizing the 2FA logo in the registration screen
735 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
736
737 The 2FA registration screen now displays the custom logo and label set in configuration. If you use custom templates, you should update ``2fregisters.tpl``
738
739 .. code-block:: diff
740
741 @@ -77,10 +77,16 @@
742 <div class="card border-secondary">
743 <div class="card-body py-3">
744 <a href="<TMPL_VAR NAME="URL">" class="nodecor">
745 - <img src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/<TMPL_VAR NAME="LOGO">" alt="<TMPL_VAR NAME="CODE">2F" title="<TMPL_VAR NAME="CODE">2F" />
746 + <img src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/<TMPL_VAR NAME="LOGO">" alt="<TMPL_VAR NAME="CODE">2f" title="<TMPL_VAR NAME="LABEL">" />
747 </a>
748 </div>
749 - <div class="card-footer text-white text-uppercase bg-secondary"><TMPL_VAR NAME="CODE">2F</div>
750 + <div class="card-footer text-white text-uppercase bg-secondary">
751 + <TMPL_IF LABEL>
752 + <p><TMPL_VAR NAME="LABEL"></p>
753 + <TMPL_ELSE>
754 + <p trspan="<TMPL_VAR NAME="CODE">2f"></p>
755 + </TMPL_IF>
756 + </div>
757 </div>
758 </div>
759 </TMPL_LOOP>
760
761 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
762
763 Remember authentication choice
764 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
765
766 A :doc:`new plugin<rememberauthchoice>` can be enabled to display a checkbox in :doc:`authentication choice<authchoice>` module to allow users remembering their choice, which will automatically redirect them to the selected choice the next time they connect to the portal.
767
768 If you use custom templates, you should update ``login.tpl``
769
770 .. code-block:: diff
771
772 --- a/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
773 +++ b/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
774 @@ -66,6 +66,12 @@
775
776 <TMPL_IF NAME="sslform">
777 <TMPL_INCLUDE NAME="sslformChoice.tpl">
778 +
779 + <!-- Remember my authentication choice for this module -->
780 + <TMPL_IF NAME="REMEMBERAUTHCHOICE">
781 + <input type="hidden" id="rememberauthchoice" name="rememberauthchoice" value="<TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">true</TMPL_IF>" />
782 + </TMPL_IF>
783 +
784 </TMPL_IF>
785
786 <TMPL_IF NAME="gpgform">
787 @@ -92,6 +98,11 @@
788
789 </div>
790
791 + <!-- Remember my authentication choice for this module -->
792 + <TMPL_IF NAME="REMEMBERAUTHCHOICE">
793 + <input type="hidden" id="rememberauthchoice" name="rememberauthchoice" value="<TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">true</TMPL_IF>" />
794 + </TMPL_IF>
795 +
796 </TMPL_IF>
797
798 </form>
799 @@ -104,6 +115,34 @@
800
801 </div> <!-- end authMenu -->
802
803 + <TMPL_IF NAME="REMEMBERAUTHCHOICE">
804 + <div class="input-group col-md-6 offset-md-3">
805 +
806 + <!-- Global checkbox for remembering the authentication choice for all modules -->
807 + <div id="globalrememberauthchoicecontainer" class="input-group-prepend input-group">
808 + <div class="input-group-text">
809 + <input type="checkbox" id="globalrememberauthchoice" name="globalrememberauthchoice" aria-describedby="globalrememberauthchoiceLabel" <TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">checked</TMPL_IF> />
810 + <input id="rememberCookieName" name="rememberCookieName" type="hidden" value="<TMPL_VAR NAME="REMEMBERAUTHCHOICECOOKIENAME">">
811 + </div>
812 + <p class="form-control">
813 + <label id="globalrememberauthchoiceLabel" for="globalrememberauthchoice" trspan="rememberChoice">Remember my choice</label>
814 + </p>
815 + </div>
816 +
817 + <!-- Timer + stop button for triggering the remembered authentication choice -->
818 + <div id="remembertimercontainer" class="input-group">
819 + <p class="form-control">
820 + <span id="remembertimer"><TMPL_VAR NAME="REMEMBERAUTHCHOICETIMER"></span>
821 + <label id="rememberTimerLabel" trspan="rememberTimerLabel">s before automatic authentication</label>
822 + </p>
823 + <input id="rememberStopped" name="rememberStopped" type="hidden" value="">
824 + <div class="input-group-append inout-group">
825 + <button class="btn btn-danger" id="buttonRememberStopped"><i class="fa fa-stop-circle-o"></i> Stop</button>
826 + </div>
827 + </div>
828 + </div>
829 + </TMPL_IF>
830 +
831 </TMPL_IF>
832
833 <TMPL_IF NAME="DISPLAY_FORM">
834
835 Copy also ``styles.min.css`` and ``skin.min.js`` from ``bootstrap`` into your custom theme.
836
837 If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
838
839
840 2.0.14
841 ------
842
843
844 If you defined the "Register page URL" or the password "Reset page URL" to an external application, you need to fix the ``standardform.tpl`` template by applying the following patch:
845
846 .. code-block:: diff
847
848 --- a/lemonldap-ng-portal/site/templates/bootstrap/standardform.tpl
849 +++ b/lemonldap-ng-portal/site/templates/bootstrap/standardform.tpl
850 @@ -48,14 +48,14 @@
851
852 <div class="actions">
853 <TMPL_IF NAME="DISPLAY_RESETPASSWORD">
854 - <a class="btn btn-secondary" href="<TMPL_VAR NAME="MAIL_URL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF>">
855 + <a class="btn btn-secondary" href="<TMPL_VAR NAME="MAIL_URL"><TMPL_UNLESS NAME="MAIL_URL_EXTERNAL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF></TMPL_UNLESS>">
856 <span class="fa fa-info-circle"></span>
857 <span trspan="resetPwd">Reset my password</span>
858 </a>
859 </TMPL_IF>
860
861 <TMPL_IF NAME="DISPLAY_UPDATECERTIF">
862 - <a class="btn btn-secondary" href="<TMPL_VAR NAME="MAILCERTIF_URL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF>">
863 + <a class="btn btn-secondary" href="<TMPL_VAR NAME="MAILCERTIF_URL"><TMPL_UNLESS NAME="MAILCERTIF_URL_EXTERNAL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF></TMPL_UNLESS>">
864 <span class="fa fa-refresh"></span>
865 <span trspan="certificateReset">Reset my certificate</span>
866 </a>
867 @@ -69,7 +69,7 @@
868 </TMPL_IF>
869
870 <TMPL_IF NAME="DISPLAY_REGISTER">
871 - <a class="btn btn-secondary" href="<TMPL_VAR NAME="REGISTER_URL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF>">
872 + <a class="btn btn-secondary" href="<TMPL_VAR NAME="REGISTER_URL"><TMPL_UNLESS NAME="REGISTER_URL_EXTERNAL">?skin=<TMPL_VAR NAME="SKIN"><TMPL_IF NAME="key">&<TMPL_VAR NAME="CHOICE_PARAM">=<TMPL_VAR NAME="key"></TMPL_IF><TMPL_IF NAME="AUTH_URL">&url=<TMPL_VAR NAME="AUTH_URL"></TMPL_IF></TMPL_UNLESS>">
873 <span class="fa fa-plus-circle"></span>
874 <span trspan="createAccount">Create an account</span>
875 </a>
876
877
878
879 2.0.13
880 ------
881
882 Some ``autocomplete`` attributes have been added to improve accessibility in the following files: ``checkdevops.tpl``, ``checkuser.tpl``, ``register.tpl``, ``ext2fcheck.tpl``, ``totp2fcheck.tpl``.
883
884
885
886 2.0.12
887 ------
888
889 Email templates
890 ^^^^^^^^^^^^^^^
891
892 If you customized the HTML email templates, you must update them to use HTML::Template variables (this was changed to fix XSS injections).
893
894 In the following files: ``mail_2fcode.tpl`` ``mail_certificateReset.tpl`` ``mail_footer.tpl`` ``mail_password.tpl`` ``mail_register_done.tpl`` ``mail_certificateConfirm.tpl`` ``mail_confirm.tpl`` ``mail_header.tpl`` ``mail_register_confirm.tpl``
895
896 Replace the following variables:
897
898
899 .. list-table::
900 :header-rows: 1
901
902 * - Old syntax
903 - New syntax
904 * - ``$code``
905 - ``<TMPL_VAR NAME="code" ESCAPE=HTML>``
906 * - ``$url``
907 - ``<TMPL_VAR NAME="url" ESCAPE=HTML>``
908 * - ``$login``
909 - ``<TMPL_VAR NAME="login" ESCAPE=HTML>``
910 * - ``$password``
911 - ``<TMPL_VAR NAME="password" ESCAPE=HTML>``
912 * - ``$firstname``
913 - ``<TMPL_VAR NAME="firstname" ESCAPE=HTML>``
914 * - ``$lastname``
915 - ``<TMPL_VAR NAME="lastname" ESCAPE=HTML>``
916
917 Replace all other variables such as ``$cn`` by ``<TMPL_VAR NAME="session_cn" ESCAPE=HTML>``.
918
919 Login form
920 ^^^^^^^^^^
921 To benefit from the new feature allowing to show password on login form, adapt ``standardform.tpl`` (see `changes <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/bdeb1e70d98ddc89316b0912d9d5ee6d11d0bee5#fbbcec1fdc36cc042eeaa83274a32ef2231fe977_23_23>`__)
922
923 To disable password store in browser when changing password (this was already possible for login form), adapt ``password.tpl`` (see `changes <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/466b6a3241fff5013d27b3dd22982e5e26ed7dfb#0ae060b3d1e289f08f510c268ed72de5dcafe425_36_35>`__)
924
925 To fix placeholder display in password field when password store is disabled in browser, adapt ``password.tpl`` (see `changes <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/commit/547d80985290495d33ed72a388e9ddf482980354#fbbcec1fdc36cc042eeaa83274a32ef2231fe977_21_20>`__)
926
927 Simplification of TOTP options
928 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
929
930 In ``totp2fregister.tpl`` template:
931
932 * Move ``#divToHide`` from the ``.col-md-6`` div to the ``.card`` div
933 * Change::
934
935 <pre id="serialized"></pre>
936
937 * to::
938
939 <br/><tt id="secret"></tt>
940
941 * Remove the ``#changekey`` button
942
943 FindUser, CheckDevOps templates
944 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
945
946 Some changes have been made to include new plugins (FindUser and CheckDevOps), you need to report them only if you have a custom theme and you want to use these plugins
947
948
949 2.0.11
950 ------
951
952 If you created your own skin and modified some template files, you may need to update them.
953 No change is required if you are using the default ``bootstrap`` theme.
954
955 A new plugin has been introduced, in beta version: :doc:`FindUser <finduser>`. It requires a modification of ``login.tpl`` to include ``finduser.tpl``.
956
957
958 2.0.10
959 ------
960
961 2FA manager
962 ^^^^^^^^^^^
963
964 If you use a custom theme, even if you did not modify ``2fregisters.tpl``, you need to copy ``skin.min.js`` from the ``htdocs/static/bootstrap/js`` folder to your custom theme's ``js`` folder.
965
966 If you modified ``2fregisters.tpl`` you need to add the ``remove2f`` class to the button that triggers second factor removal:
967
968 .. code-block:: diff
969
970 - <span device='<TMPL_VAR NAME="type">' epoch='<TMPL_VAR NAME="epoch">' class="btn btn-danger" role="button">
971 + <span device='<TMPL_VAR NAME="type">' epoch='<TMPL_VAR NAME="epoch">' class="btn btn-danger remove2f" role="button">
972
973 Or, better yet, integrate the changes in ``2fregisters.tpl`` into your custom theme to benefit from the `new 2F removal confirmation dialog <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2438>`__
974
975 Checkboxes
976 ^^^^^^^^^^
977
978 A CSS change has been done in ``styles.css`` to avoid checkbox labels overflow. See `issue 2301 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2301>`__.
979
980 The ``form-check-input`` class is missing in ``register.tpl`` and ``notifinclude.tpl``. See `issue 2374 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2374>`__.
981
982 Password checker
983 ^^^^^^^^^^^^^^^^
984
985 Input id values have been modified in ``mail.tpl`` to work with password checker. See `issue 2355 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2355>`__.
986
987 Tables caption
988 ^^^^^^^^^^^^^^
989
990 Tables captions have been added in ``sessionArray.tpl``. See `issue 2356 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2356>`__.
991
992 Stay connected
993 ^^^^^^^^^^^^^^
994
995 A small change is required in ``checklogins.tpl`` for `issue 2365 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2365>`__.
996
997 Other changes needed in ``2fchoice.tpl``, ``ext2check.tpl`` and ``totp2fcheck.tpl`` for `issue 2366 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2366>`__.
998
999 Mails
1000 ^^^^^
1001
1002 The HTML ``alt`` attribute has been added on ``img`` in all ``mail_*.tpl``. See `issue 2422 <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2422>`__.
1003