Skip to content

Commit

Permalink
wip mantisbt-plugins#1 20180304
Browse files Browse the repository at this point in the history
  • Loading branch information
fmancardi committed Mar 4, 2018
1 parent 0c73742 commit 006c34c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions files/plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

$(document).ready(function() {
//allow admin to set password directly
//include input for new password
var frm = $('#login-form');
var redirectUri = $("meta[name='redirectUri']").attr('content');
var clientId = $("meta[name='clientId']").attr('content');
$('<a class="btn btn-primary btn-sm bigger-110" href="https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=' + redirectUri + '&client_id=' + clientId + '&scope=https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email&access_type=offline&approval_prompt=force&state=">Sign in with google</a>').appendTo(frm);

frm.children('#sign_with_google').on('click', function(){
return false;
});
});

0 comments on commit 006c34c

Please sign in to comment.