CRM-13817 - Migrate simple success messages to mini-notifications
[civicrm-core.git] / templates / CRM / Contact / Page / View / GroupContact.tpl
index ccec5fe17fe88e1b0bf0cca74168e81b4e1528a9..f17dea5e80421b33c9be56d28d2d6858b9c7f695 100644 (file)
         params.status = status;
       }
       // This api is weird - 'delete' actually works for updating as well as deleting
-      CRM.api('group_contact', 'delete', params, {success: function() {
-        refresh();
-        // Normally you wouldn't put a variable within ts() but this works due to smarty hack below
-        CRM.alert('', ts(status), 'success');
-      }});
+      // Normally you wouldn't put a variable within ts() but this works due to smarty hack below
+      CRM.api3('group_contact', 'delete', params, {success: ts(status)}).done(refresh);
     }
     $('.view-contact-groups a.action-item').click(function() {
       that = this;