diff --git a/react/components/Events/ExistingEvent.tsx b/react/components/Events/ExistingEvent.tsx index 62ea1a793a..593f3cd5d1 100644 --- a/react/components/Events/ExistingEvent.tsx +++ b/react/components/Events/ExistingEvent.tsx @@ -172,12 +172,11 @@ class ExistingEvent extends React.Component { delete() { fetch(CRMRoot + "/api/events/" + this.props.eventId, { credentials: "include", - method: "POST", + method: "DELETE", headers: { Accept: "application/json", "Content-Type": "application/json", }, - body: JSON.stringify({ _METHOD: "DELETE" }), }).then(() => this.exit()); } diff --git a/src/skin/js/CRMJSOM.js b/src/skin/js/CRMJSOM.js index 9cade00915..cd4ae74af1 100644 --- a/src/skin/js/CRMJSOM.js +++ b/src/skin/js/CRMJSOM.js @@ -125,9 +125,9 @@ window.CRM.cart = { }, removePerson: function (Persons, callback) { window.CRM.APIRequest({ - method: "POST", + method: "DELETE", path: "cart/", - data: JSON.stringify({ _METHOD: "DELETE", Persons: Persons }), + data: JSON.stringify({ Persons: Persons }), }).done(function (data) { window.CRM.cart.refresh(); if (callback) { @@ -394,7 +394,7 @@ window.CRM.groups = { window.CRM.groups .getRoles(selectOptions.GroupID) .done(function (rdata) { - rolesList = $.map(rdata.ListOptions, function (item) { + rolesList = $.map(rdata, function (item) { var o = { text: i18next.t(item.OptionName), // to translate the Teacher and Student in localize text id: item.OptionId, @@ -426,7 +426,7 @@ window.CRM.groups = { bootbox.dialog(options).init(initFunction).show(); window.CRM.groups.get().done(function (rdata) { - groupsList = $.map(rdata.Groups, function (item) { + groupsList = $.map(rdata, function (item) { var o = { text: item.Name, id: item.Id, @@ -442,14 +442,14 @@ window.CRM.groups = { $groupSelect2.on("select2:select", function (e) { var targetGroupId = $( - "#targetGroupSelection option:selected", + "#targetGroupSelection option:selected" ).val(); $parent = $("#targetRoleSelection").parent(); $("#targetRoleSelection").empty(); window.CRM.groups .getRoles(targetGroupId) .done(function (rdata) { - rolesList = $.map(rdata.ListOptions, function (item) { + rolesList = $.map(rdata, function (item) { var o = { text: i18next.t(item.OptionName), // this is for the Teacher and Student role id: item.OptionId, diff --git a/src/skin/js/FamilyView.js b/src/skin/js/FamilyView.js index 7327247889..fa71096f56 100644 --- a/src/skin/js/FamilyView.js +++ b/src/skin/js/FamilyView.js @@ -298,7 +298,7 @@ $(document).ready(function () { $("#deletePhoto").click(function () { $.ajax({ - type: "POST", + type: "DELETE", url: window.CRM.root + "/api/family/" + @@ -306,9 +306,6 @@ $(document).ready(function () { "/photo", encode: true, dataType: "json", - data: { - _METHOD: "DELETE", - }, }).done(function (data) { location.reload(); }); diff --git a/src/skin/js/GroupEditor.js b/src/skin/js/GroupEditor.js index 82e8468acd..b6d668fc71 100644 --- a/src/skin/js/GroupEditor.js +++ b/src/skin/js/GroupEditor.js @@ -109,11 +109,10 @@ $("document").ready(function () { $(document).on("click", ".deleteRole", function (e) { var roleID = e.currentTarget.id.split("-")[1]; $.ajax({ - method: "POST", + method: "DELETE", url: window.CRM.root + "/api/groups/" + groupID + "/roles/" + roleID, encode: true, - data: { _METHOD: "DELETE" }, dataType: "json", }).done(function (data) { dataT.clear(); diff --git a/src/skin/js/users.js b/src/skin/js/users.js index 36a68591a1..c29bd12cb6 100644 --- a/src/skin/js/users.js +++ b/src/skin/js/users.js @@ -30,7 +30,6 @@ function deleteUser(userId, userName) { window.CRM.APIRequest({ method: "DELETE", path: "user/" + userId + "/", - data: { _METHOD: "DELETE" }, }).done(function () { window.location.href = window.CRM.root + "/UserList.php"; }); diff --git a/src/v2/templates/cart/cartlisting.php b/src/v2/templates/cart/cartlisting.php index bede264876..aa03d7676d 100644 --- a/src/v2/templates/cart/cartlisting.php +++ b/src/v2/templates/cart/cartlisting.php @@ -33,7 +33,7 @@ getAddress() ?> getEmail() ?> - + getClassificationName() ?> getFamilyRoleName() ?>