![Clément Oudot](/assets/img/avatar_default.png)
* Add autologin parameter * Add a form in standard mode (not Choice) for display type logo * Use POST instead of REDIRECT to keep all hidden fields * Fix warning in unit test
27 lines
484 B
JavaScript
27 lines
484 B
JavaScript
$(document).ready(function(){
|
|
|
|
// Manage auto login
|
|
if (browserIdAutoLogin.match('1')) {
|
|
launchRequest();
|
|
}
|
|
|
|
// Intercept submit the first time
|
|
var intercepted = 0;
|
|
$("form.login").submit(function( event ) {
|
|
if (!intercepted) {
|
|
event.preventDefault();
|
|
intercepted = 1;
|
|
launchRequest();
|
|
}
|
|
});
|
|
|
|
});
|
|
|
|
function launchRequest() {
|
|
navigator.id.request({
|
|
siteName: browserIdSiteName,
|
|
siteLogo: browserIdSiteLogo,
|
|
backgroundColor: browserIdBackgroundColor
|
|
});
|
|
}
|