Merge pull request #7185 from nextcloud/enh/noid/reset-backup-button

aio-interface: always offer a reset backup location button
This commit is contained in:
Simon L. 2025-11-28 17:16:12 +01:00 committed by GitHub
commit 75775c4c87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -476,23 +476,6 @@
<input type="submit" value="Create backup" onclick="return confirm('Create backup? Are you sure that you want to create a backup? This will stop all running containers and create the backup.')" />
</form>
{% if has_backup_run_once == false %}
<h3>Reset backup location</h3>
<p>
If the configured backup host location <strong>{{ borg_backup_host_location }}</strong>
{% if borg_remote_repo %}
or the remote repo <strong>{{ borg_remote_repo }}</strong>
{% endif %}
is wrong, you can reset it by clicking on the button below.
</p>
<form method="POST" action="api/configuration" class="xhr">
<input type="hidden" name="delete_borg_backup_location_vars" value="yes"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Reset backup location" />
</form>
{% endif %}
{% if has_backup_run_once == true %}
<h3>Backup Viewer</h3>
<p>There is now a community container that allows to access your backups in a web session. See <a target="_blank" href="https://github.com/nextcloud/all-in-one/tree/main/community-containers/borgbackup-viewer"><strong>this documentation</strong></a>.</p>
@ -558,6 +541,21 @@
<p>This option is currently set. You can disable it again by clearing the field and submitting your changes.</p>
{% endif %}
{% endif %}
<h3>Reset backup location</h3>
<p>
If the configured backup host location <strong>{{ borg_backup_host_location }}</strong>
{% if borg_remote_repo %}
or the remote repo <strong>{{ borg_remote_repo }}</strong>
{% endif %}
is wrong or if you want to reset the backup location due to other reasons, you can do so by clicking on the button below.
</p>
<form method="POST" action="api/configuration" class="xhr">
<input type="hidden" name="delete_borg_backup_location_vars" value="yes"/>
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="submit" value="Reset backup location" onclick="return confirm('Are you sure that you want to reset the backup location?')" />
</form>
{% endif %}
{% if has_backup_run_once == true %}
</details>