Only show enter token button if no invitations are present

This commit is contained in:
bfederle 2012-02-07 14:31:01 -08:00
parent 36e4f00c56
commit a77f04f5f6
1 changed files with 16 additions and 0 deletions

View File

@ -904,6 +904,22 @@
label: 'Enter Token',
isHeader: true,
addRow: false,
preFilter: function(args) {
var invitationsPresent = false;
$.ajax({
url: createURL('listProjectInvitations'),
data: { state: 'Pending' },
async: false,
success: function(json) {
if (json.listprojectinvitationsresponse.count) {
invitationsPresent = true;
}
}
});
return !invitationsPresent;
},
createForm: {
desc: 'Please enter the token that you were given in your invite e-mail.',
fields: {