From 45b4ac8ca0f1400c2348974b28e0f0fb9eb1bf53 Mon Sep 17 00:00:00 2001 From: Gerlof van Ek Date: Fri, 13 Jun 2025 14:46:16 +0200 Subject: [PATCH] GUI: Settings / Changepassword page updates + Various fixes. (#318) * GUI: Settings page updates / fixes. * Fix Enabled/Disabled logic. * GUI: Changepassword add warning / + disabled coins check / Various Fixes. --- basicswap/templates/changepassword.html | 81 ++++++++++++++++++++++++- basicswap/templates/settings.html | 6 +- basicswap/ui/page_encryption.py | 18 ++++++ 3 files changed, 99 insertions(+), 6 deletions(-) diff --git a/basicswap/templates/changepassword.html b/basicswap/templates/changepassword.html index 466f74f..07a677f 100644 --- a/basicswap/templates/changepassword.html +++ b/basicswap/templates/changepassword.html @@ -44,6 +44,48 @@ {% include 'inc_messages.html' %} + + {% set disabled_coins = [] %} + {% for c in chains_formatted %} + {% if c.connection_type == "none" %} + {% set _ = disabled_coins.append(c.display_name) %} + {% endif %} + {% endfor %} + + {% if disabled_coins|length > 0 %} + + {% endif %} +
@@ -52,7 +94,7 @@
-
+ 0 %}class="form-disabled"{% endif %}>
@@ -66,6 +108,7 @@ name="oldpassword" class="hover:border-blue-500 bg-gray-50 text-gray-900 appearance-none pr-10 dark:bg-gray-500 dark:text-white border border-gray-300 dark:border-gray-400 dark:text-gray-50 dark:placeholder-gray-400 text-sm rounded-lg outline-none focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 focus:ring-0" placeholder="Enter your current password" + {% if disabled_coins|length > 0 %}disabled{% endif %} required />