<% if @result %>
  toastr.success('User has been successfully updated.');
  $('#users--team-partial').html("<%= j render("teams")%>");
  $('#users--status-partial').html("<%= j render("status")%>");
  var table = $("#target-table-admin-users").DataTable()
  table.ajax.reload();
  filterByTeams(table);
  filterByStatus(table);
  clearFilters(table);
  $('.users--edit-modal').removeClass('show');
  $('.users--edit-modal').addClass('hide');
<% else %>
  toastr.error('Unable to update user. Please check email is not already in use.');
<% end %>