Upgrade notes for remember auth choice plugin (#2737)
This commit is contained in:
parent
62c40d5b49
commit
a989ad4bc7
|
@ -117,6 +117,109 @@ The 2FA registration screen now displays the custom logo and label set in config
|
|||
|
||||
If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
|
||||
|
||||
Remember authentication choice
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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.
|
||||
|
||||
If you use custom templates, you should update ``login.tpl``
|
||||
|
||||
.. code:: diff
|
||||
|
||||
--- a/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
|
||||
+++ b/lemonldap-ng-portal/site/templates/bootstrap/login.tpl
|
||||
@@ -66,6 +66,12 @@
|
||||
|
||||
<TMPL_IF NAME="sslform">
|
||||
<TMPL_INCLUDE NAME="sslformChoice.tpl">
|
||||
+
|
||||
+ <!-- Remember my authentication choice for this module -->
|
||||
+ <TMPL_IF NAME="REMEMBERAUTHCHOICE">
|
||||
+ <input type="hidden" id="rememberauthchoice" name="rememberauthchoice" value="<TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">true</TMPL_IF>" />
|
||||
+ </TMPL_IF>
|
||||
+
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="gpgform">
|
||||
@@ -92,6 +98,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
+ <!-- Remember my authentication choice for this module -->
|
||||
+ <TMPL_IF NAME="REMEMBERAUTHCHOICE">
|
||||
+ <input type="hidden" id="rememberauthchoice" name="rememberauthchoice" value="<TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">true</TMPL_IF>" />
|
||||
+ </TMPL_IF>
|
||||
+
|
||||
</TMPL_IF>
|
||||
|
||||
</form>
|
||||
@@ -104,6 +115,34 @@
|
||||
|
||||
</div> <!-- end authMenu -->
|
||||
|
||||
+ <TMPL_IF NAME="REMEMBERAUTHCHOICE">
|
||||
+ <div class="input-group col-md-6 offset-md-3">
|
||||
+
|
||||
+ <!-- Global checkbox for remembering the authentication choice for all modules -->
|
||||
+ <div id="globalrememberauthchoicecontainer" class="input-group-prepend input-group">
|
||||
+ <div class="input-group-text">
|
||||
+ <input type="checkbox" id="globalrememberauthchoice" name="globalrememberauthchoice" aria-describedby="globalrememberauthchoiceLabel" <TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">checked</TMPL_IF> />
|
||||
+ <input id="rememberCookieName" name="rememberCookieName" type="hidden" value="<TMPL_VAR NAME="REMEMBERAUTHCHOICECOOKIENAME">">
|
||||
+ </div>
|
||||
+ <p class="form-control">
|
||||
+ <label id="globalrememberauthchoiceLabel" for="globalrememberauthchoice" trspan="rememberChoice">Remember my choice</label>
|
||||
+ </p>
|
||||
...skipping...
|
||||
</div>
|
||||
|
||||
+ <!-- Remember my authentication choice for this module -->
|
||||
+ <TMPL_IF NAME="REMEMBERAUTHCHOICE">
|
||||
+ <input type="hidden" id="rememberauthchoice" name="rememberauthchoice" value="<TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">true</TMPL_IF>" />
|
||||
+ </TMPL_IF>
|
||||
+
|
||||
</TMPL_IF>
|
||||
|
||||
</form>
|
||||
@@ -104,6 +115,34 @@
|
||||
|
||||
</div> <!-- end authMenu -->
|
||||
|
||||
+ <TMPL_IF NAME="REMEMBERAUTHCHOICE">
|
||||
+ <div class="input-group col-md-6 offset-md-3">
|
||||
+
|
||||
+ <!-- Global checkbox for remembering the authentication choice for all modules -->
|
||||
+ <div id="globalrememberauthchoicecontainer" class="input-group-prepend input-group">
|
||||
+ <div class="input-group-text">
|
||||
+ <input type="checkbox" id="globalrememberauthchoice" name="globalrememberauthchoice" aria-describedby="globalrememberauthchoiceLabel" <TMPL_IF NAME="REMEMBERAUTHCHOICEDEFAULTCHECKED">checked</TMPL_IF> />
|
||||
+ <input id="rememberCookieName" name="rememberCookieName" type="hidden" value="<TMPL_VAR NAME="REMEMBERAUTHCHOICECOOKIENAME">">
|
||||
+ </div>
|
||||
+ <p class="form-control">
|
||||
+ <label id="globalrememberauthchoiceLabel" for="globalrememberauthchoice" trspan="rememberChoice">Remember my choice</label>
|
||||
+ </p>
|
||||
+ </div>
|
||||
+
|
||||
+ <!-- Timer + stop button for triggering the remembered authentication choice -->
|
||||
+ <div id="remembertimercontainer" class="input-group">
|
||||
+ <p class="form-control">
|
||||
+ <span id="remembertimer"><TMPL_VAR NAME="REMEMBERAUTHCHOICETIMER"></span>
|
||||
+ <label id="rememberTimerLabel" trspan="rememberTimerLabel">s before automatic authentication</label>
|
||||
+ </p>
|
||||
+ <input id="rememberStopped" name="rememberStopped" type="hidden" value="">
|
||||
+ <div class="input-group-append inout-group">
|
||||
+ <button class="btn btn-danger" id="buttonRememberStopped"><i class="fa fa-stop-circle-o"></i> Stop</button>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ </TMPL_IF>
|
||||
+
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_IF NAME="DISPLAY_FORM">
|
||||
|
||||
Copy also ``styles.min.css`` and ``skin.min.js`` from ``bootstrap`` into your custom theme.
|
||||
|
||||
If you are using the default templates from the ``bootstrap`` theme, you don't need to change anything.
|
||||
|
||||
2.0.14
|
||||
------
|
||||
|
||||
|
|
Loading…
Reference in New Issue