From cb63be260c281ca938fc28ea629690800c09e978 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 13 Dec 2024 22:56:53 -0500 Subject: [PATCH] Adjust front end for snapshots option --- .../templates/panel/server_backup_edit.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/frontend/templates/panel/server_backup_edit.html b/app/frontend/templates/panel/server_backup_edit.html index 41ab53ae..68d03094 100644 --- a/app/frontend/templates/panel/server_backup_edit.html +++ b/app/frontend/templates/panel/server_backup_edit.html @@ -52,7 +52,7 @@ {% end %}
- {% if not data['backing_up'] %} + {% if not data['backing_up'] and not data.get("new_backup", False) %}
@@ -95,6 +95,17 @@ value="{{ data['backup_config']['max_backups'] }}" placeholder="{{ translate('serverBackups', 'maxBackups', data['lang']) }}">
+ {% if data.get("new_backup", False) %} +
+
+ + +
+
+ {% end %}
{% if data['backup_config']['compress'] %} @@ -468,6 +479,10 @@ //We need to make sure these are sent regardless of whether or not they're checked formDataObject.compress = $("#compress").prop('checked'); formDataObject.shutdown = $("#shutdown").prop('checked'); + // Only add snapshot if we're making a new backup + if (!backup_id) { + formDataObject.snapshot = $("#snapshot").prop('checked'); + } if ($("#root_files_button").hasClass("clicked")) { excluded = [] $('input.excluded:checkbox:checked').each(function () {