mirror of https://github.com/apache/cloudstack.git
Only show enter token button if no invitations are present
This commit is contained in:
parent
36e4f00c56
commit
a77f04f5f6
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue