From 7ea06bd63550319cdc6dea19b51fd98bbf0f5ac9 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 21 Dec 2024 13:07:50 -0800 Subject: [PATCH] backups: Fix issue clicking on schedule buttons with Bootstrap 5 Closes: #2476. - The collapse click logic is triggered when clicking on the schedule button (or the other buttons). In case of other buttons they do activate eventually but the schedule button does not activate. - Solve this properly by making sure that collapse logic is not triggered when the buttons are clicked. Tests: - On stable and testing containers, ensure that collapse works. Collapse/expand icon works. The three buttons work. And mobile view looks good. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/backups/static/backups.css | 4 + .../backups/templates/backups_repository.html | 99 ++++++++++--------- 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/plinth/modules/backups/static/backups.css b/plinth/modules/backups/static/backups.css index 448fa8ab6..7f19b0ef9 100644 --- a/plinth/modules/backups/static/backups.css +++ b/plinth/modules/backups/static/backups.css @@ -23,3 +23,7 @@ .inline-block { display: inline-block; } + +.archive-operations { + width: 12.5rem; +} diff --git a/plinth/modules/backups/templates/backups_repository.html b/plinth/modules/backups/templates/backups_repository.html index 03d31eb61..b9df64ce9 100644 --- a/plinth/modules/backups/templates/backups_repository.html +++ b/plinth/modules/backups/templates/backups_repository.html @@ -6,67 +6,72 @@
- +
- - {% if repository.error %} - - {% elif repository.is_encrypted %} - - {% endif %} +
+
+ + {% if repository.error %} + + {% elif repository.is_encrypted %} + + {% endif %} - {{ repository.name }} + {{ repository.name }} +
- - - - {% trans "Schedule" %} - +
+ + + {% trans "Schedule" %} + - {% if repository.flags.mountable %} + {% if repository.flags.mountable %} - {% if repository.mounted %} + {% if repository.mounted %} -
- {% csrf_token %} - -
+
+ {% csrf_token %} + +
- {% else %} + {% else %} -
- {% csrf_token %} - -
+
+ {% csrf_token %} + +
+ + {% endif %} {% endif %} - {% endif %} + {% if repository.flags.removable %} - {% if repository.flags.removable %} + + + - - - - - {% endif %} - + {% endif %} +
+