File tree 1 file changed +0
-23
lines changed
openwisp_notifications/static/openwisp-notifications/js
1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -251,29 +251,6 @@ if (typeof gettext === 'undefined') {
251
251
} ) ;
252
252
}
253
253
254
- function updateIndividualSetting ( settingId , isWebChecked , isEmailChecked ) {
255
- const userId = $ ( '.settings-container' ) . data ( 'user-id' ) ;
256
- const data = {
257
- web : isWebChecked ,
258
- email : isEmailChecked
259
- } ;
260
- $ . ajax ( {
261
- type : 'PATCH' ,
262
- url : '/api/v1/notifications/user/' + userId + '/user-setting/' + settingId + '/' ,
263
- headers : { 'X-CSRFToken' : $ ( 'input[name="csrfmiddlewaretoken"]' ) . val ( ) } ,
264
- contentType : 'application/json' ,
265
- data : JSON . stringify ( data ) ,
266
- success : function ( ) {
267
- showToast ( 'success' , gettext ( 'Settings updated successfully.' ) ) ;
268
- } ,
269
- error : function ( ) {
270
- showToast ( 'error' , gettext ( 'Something went wrong. Please try again.' ) ) ;
271
- $ ( `.web-checkbox[data-pk="${ settingId } "]` ) . prop ( 'checked' , ! isWebChecked ) ;
272
- $ ( `.email-checkbox[data-pk="${ settingId } "]` ) . prop ( 'checked' , ! isEmailChecked ) ;
273
- }
274
- } ) ;
275
- }
276
-
277
254
function updateOrgLevelCheckboxes ( organizationId ) {
278
255
const webCheckboxes = $ ( '.web-checkbox[data-organization-id="' + organizationId + '"]' ) ;
279
256
const emailCheckboxes = $ ( '.email-checkbox[data-organization-id="' + organizationId + '"]' ) ;
You can’t perform that action at this time.
0 commit comments