Merge pull request #4236 from nextcloud/backport-3827-remove-double-password-confirmation

[stable11] Remove the double password confirmation on changing cron
This commit is contained in:
Morris Jobke 2017-04-06 10:46:30 -05:00 committed by GitHub
commit aabcb043f3
2 changed files with 7 additions and 3 deletions

View File

@ -38,6 +38,7 @@ OCP.AppConfig = {
return; return;
} }
options = options || {};
$.ajax({ $.ajax({
type: method.toUpperCase(), type: method.toUpperCase(),
url: OC.linkToOCS('apps/provisioning_api/api/v1', 2) + 'config/apps' + endpoint, url: OC.linkToOCS('apps/provisioning_api/api/v1', 2) + 'config/apps' + endpoint,

View File

@ -46,9 +46,12 @@ $(document).ready(function(){
if($(this).is(':checked')){ if($(this).is(':checked')){
var mode = $(this).val(); var mode = $(this).val();
if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') { if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') {
OCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode); OCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode, {
// clear cron errors on background job mode change success: function() {
OCP.AppConfig.deleteKey('core', 'cronErrors'); // clear cron errors on background job mode change
OCP.AppConfig.deleteKey('core', 'cronErrors');
}
});
} }
} }
}); });