dont refresh the backup page when there's an error saving the config
This commit is contained in:
parent
2b1f7da654
commit
dbfd158388
|
@ -384,7 +384,7 @@ def backup_set_custom(env, target, target_user, target_pass, min_age):
|
|||
|
||||
write_backup_config(env, config)
|
||||
|
||||
return "Updated backup config"
|
||||
return "OK"
|
||||
|
||||
def get_backup_config(env, for_save=False, for_ui=False):
|
||||
backup_root = os.path.join(env["STORAGE_ROOT"], 'backup')
|
||||
|
|
|
@ -202,11 +202,12 @@ function set_custom_backup() {
|
|||
min_age: min_age
|
||||
},
|
||||
function(r) {
|
||||
// Responses are multiple lines of pre-formatted text.
|
||||
show_modal_error("Backup configuration", $("<pre/>").text(r), function() { show_system_backup(); }); // refresh after modal
|
||||
// use .text() --- it's a text response, not html
|
||||
show_modal_error("Backup configuration", $("<p/>").text(r), function() { if (r == "OK") show_system_backup(); }); // refresh after modal on success
|
||||
},
|
||||
function(r) {
|
||||
show_modal_error("Backup configuration (error)", r);
|
||||
// use .text() --- it's a text response, not html
|
||||
show_modal_error("Backup configuration", $("<p/>").text(r));
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue