From beb3f92c4da65a93a6f8df9b3772a221cf3637e5 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 13 Mar 2017 15:52:16 +0100 Subject: [PATCH] Remove the double password confirmation on changing cron Signed-off-by: Joas Schilling --- core/js/public/appconfig.js | 1 + settings/js/admin.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/js/public/appconfig.js b/core/js/public/appconfig.js index d84ddaab404..bba39c8b805 100644 --- a/core/js/public/appconfig.js +++ b/core/js/public/appconfig.js @@ -38,6 +38,7 @@ OCP.AppConfig = { return; } + options = options || {}; $.ajax({ type: method.toUpperCase(), url: OC.linkToOCS('apps/provisioning_api/api/v1', 2) + 'config/apps' + endpoint, diff --git a/settings/js/admin.js b/settings/js/admin.js index 094b12b2bab..985e318e34b 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -46,9 +46,12 @@ $(document).ready(function(){ if($(this).is(':checked')){ var mode = $(this).val(); if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') { - OCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode); - // clear cron errors on background job mode change - OCP.AppConfig.deleteKey('core', 'cronErrors'); + OCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode, { + success: function() { + // clear cron errors on background job mode change + OCP.AppConfig.deleteKey('core', 'cronErrors'); + } + }); } } }); -- 2.39.5