contacts: display an error if adding a contact somehow failed
(currently it would go on an take 'undefined' as the user identifier, leading to further errors)
This commit is contained in:
parent
0261387a49
commit
c95840c2ee
|
@ -321,6 +321,10 @@ $(function() {
|
|||
|
||||
$(document).on('gadjo:dialog-done', function(ev, data) {
|
||||
if (ev.target && ev.target.id != 'create-new-contact') return;
|
||||
if (data.err == 1) {
|
||||
alert('error: ' + data.data);
|
||||
return true;
|
||||
}
|
||||
var source_type = $('div.source div[data-source-type]').data('source-type');
|
||||
var source_pk = $('div.source .active[data-source-pk]').data('source-pk');
|
||||
var selected_user_id = data.data.user_id;
|
||||
|
|
Loading…
Reference in New Issue