Remove Restore Strategy toggle from restore page
Always defaults to merge (overwrite) strategy. The terminate & re-create option is removed from the UI to simplify the restore workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -247,15 +247,6 @@ sub handle_step2 {
|
||||
print qq{ </div>\n};
|
||||
print qq{</div>\n};
|
||||
|
||||
# Restore strategy (visible only for Full Account mode)
|
||||
print qq{<div id="strategy-panel" class="flex items-center gap-3 mb-2.5">\n};
|
||||
print qq{ <label class="w-44 font-medium text-sm whitespace-nowrap">Restore Strategy <span class="tooltip tooltip-top" data-tip="Overwrite merges into the existing account; Terminate deletes the account first and re-creates it from the backup">ⓘ</span></label>\n};
|
||||
print qq{ <div class="join inline-flex items-stretch">\n};
|
||||
print qq{ <input type="radio" name="strategy" class="join-item btn btn-sm m-0" aria-label="Overwrite (merge)" value="merge" checked>\n};
|
||||
print qq{ <input type="radio" name="strategy" class="join-item btn btn-sm m-0" aria-label="Terminate & re-create" value="terminate">\n};
|
||||
print qq{ </div>\n};
|
||||
print qq{</div>\n};
|
||||
|
||||
# Exclude paths (visible in both Full Account and Selective modes)
|
||||
print qq{<div class="card bg-white shadow-sm border border-base-300 mb-3 mt-3">\n};
|
||||
print qq{<div class="card-body py-3 px-4">\n};
|
||||
@@ -452,7 +443,6 @@ function gnizaModeChanged() {
|
||||
var mode = document.querySelector('input[name="restore_mode"]:checked').value;
|
||||
var selective = mode === 'selective';
|
||||
document.getElementById('selective-panel').hidden = !selective;
|
||||
document.getElementById('strategy-panel').hidden = selective;
|
||||
document.getElementById('type_account_hidden').disabled = selective;
|
||||
if (selective) {
|
||||
gnizaTypesChanged();
|
||||
@@ -897,12 +887,6 @@ sub handle_step3 {
|
||||
print qq{<tr><td class="font-medium">Snapshot</td><td>$esc_timestamp</td></tr>\n};
|
||||
print qq{<tr><td class="font-medium">Restore Types</td><td>$types_display</td></tr>\n};
|
||||
|
||||
if (grep { $_ eq 'account' } @selected_types) {
|
||||
my %strategy_labels = (merge => 'Overwrite (merge)', terminate => 'Terminate & re-create');
|
||||
my $strategy_display = GnizaWHM::UI::esc($strategy_labels{$strategy} // $strategy);
|
||||
print qq{<tr><td class="font-medium">Strategy</td><td>$strategy_display</td></tr>\n};
|
||||
}
|
||||
|
||||
# Show sub-field details for applicable types
|
||||
if (grep { $_ eq 'files' } @selected_types) {
|
||||
my $path_display = $path ne '' ? GnizaWHM::UI::esc($path) : 'All files';
|
||||
@@ -952,7 +936,6 @@ sub handle_step3 {
|
||||
print qq{<input type="hidden" name="emails" value="} . GnizaWHM::UI::esc($emails) . qq{">\n};
|
||||
print qq{<input type="hidden" name="domain_names" value="} . GnizaWHM::UI::esc($domain_names) . qq{">\n};
|
||||
print qq{<input type="hidden" name="ssl_names" value="} . GnizaWHM::UI::esc($ssl_names) . qq{">\n};
|
||||
print qq{<input type="hidden" name="strategy" value="} . GnizaWHM::UI::esc($strategy) . qq{">\n};
|
||||
print qq{<input type="hidden" name="exclude_paths" value="} . GnizaWHM::UI::esc($exclude_paths) . qq{">\n};
|
||||
print GnizaWHM::UI::csrf_hidden_field();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user