aio-interface: always offer a reset backup button

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-11-24 18:03:08 +01:00
parent 473ddbfcee
commit 9ec7c08754

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, 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" onclick="return confirm('Are you sure that you want to reset the backup location?')" />
</form>
{% endif %}
{% if has_backup_run_once == true %}
</details>