diff options
Diffstat (limited to 'extensions/BrowserID/template')
2 files changed, 43 insertions, 0 deletions
diff --git a/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl b/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl new file mode 100644 index 000000000..4d8d8d3f0 --- /dev/null +++ b/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl @@ -0,0 +1,23 @@ +[% IF Param('user_info_class').split(',').contains('BrowserID') %] +<script src="https://browserid.org/include.js" type="text/javascript"></script> + +<script type="text/javascript"> +function browserid_sign_in() { + navigator.id.getVerifiedEmail(function(assertion) { + if (assertion) { + // This code will be invoked once the user has successfully + // selected an email address they control to sign in with. + window.location.href = "[% target FILTER none %]index.cgi?browserid_assertion=" + assertion; + } else { + // something went wrong! the user isn't logged in. + alert("Oh no! Something went wrong..."); + } + }); +} +</script> + +<p> +Or, you could login using BrowserID: +<img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()"> +</p> +[% END %]
\ No newline at end of file diff --git a/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl b/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl new file mode 100644 index 000000000..12bff015b --- /dev/null +++ b/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl @@ -0,0 +1,20 @@ +[% IF Param('user_info_class').split(',').contains('BrowserID') %] +<script src="https://browserid.org/include.js" type="text/javascript"></script> + +<script type="text/javascript"> +function browserid_sign_in() { + navigator.id.getVerifiedEmail(function(assertion) { + if (assertion) { + // This code will be invoked once the user has successfully + // selected an email address they control to sign in with. + window.location.href = "[% login_target FILTER none %]?browserid_assertion=" + assertion; + } else { + // something went wrong! the user isn't logged in. + alert("Oh no! Something went wrong..."); + } + }); +} +</script> + +<img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()" style="margin-bottom: -8px"> or +[% END %]
\ No newline at end of file |