diff options
Diffstat (limited to 'extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl')
-rw-r--r-- | extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl | 46 |
1 files changed, 0 insertions, 46 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 index 57f7da8ce..c79e1204e 100644 --- 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 @@ -1,51 +1,5 @@ [% IF Param('user_info_class').split(',').contains('BrowserID') && Param('browserid_includejs_url') %] - -[% USE Bugzilla %] -[% cgi = Bugzilla.cgi %] - -<script src="[% Param('browserid_includejs_url') %]" type="text/javascript"></script> - -<script type="text/javascript"> -function createHidden(name, value, form) { - var field = document.createElement('input'); - field.type = 'hidden'; - field.name = name; - field.value = value;; - form.appendChild(field); -} - -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. - var form = document.createElement('form'); - form.action = '[% target FILTER js %]'; - form.method = 'POST'; - form.style.display = 'none'; - - createHidden('token', '[% issue_hash_token(['login']) FILTER js %]', form); - createHidden('Bugzilla_remember', 'on', form); - createHidden('browserid_assertion', assertion, form); - - [% FOREACH field = cgi.param() %] - [% NEXT IF field.search("^(Bugzilla_(login|password|restrictlogin)|token|browserid_assertion)$") %] - [% FOREACH mvalue = cgi.param(field).slice(0) %] - createHidden('[% field FILTER js %]', - '[% mvalue FILTER html_linebreak FILTER js %]', - form); - [% END %] - [% END %] - - document.body.appendChild(form); - form.submit(); - return true; - } - }); -} -</script> - <p> Or, log in with BrowserID: <img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()"> |