VRFS-2263 added special handling for attempts to join session multiple times
This commit is contained in:
parent
f06ef0c716
commit
5564fd2cf7
|
|
@ -222,7 +222,16 @@
|
|||
rest.createJoinRequest(joinRequest)
|
||||
.done(function(response) {
|
||||
|
||||
}).error(context.JK.app.ajaxError);
|
||||
}).error(function(jqXHR, textStatus, errorMessage) {
|
||||
var joinErr = jqXHR.responseJSON['errors']
|
||||
if (joinErr && joinErr['user_id'] == 'has already been taken') {
|
||||
context.JK.app.notify({title: "Oops!",
|
||||
text: 'You have already requested to join this session.',
|
||||
"icon_url": "/assets/content/icon_alert_big.png"});
|
||||
} else {
|
||||
context.JK.app.ajaxError(jqXHR, textStatus, errorMessage);
|
||||
}
|
||||
});
|
||||
|
||||
context.JK.app.layout.closeDialog('alert');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue