From 4dc0b65319ed3a2c7c78002d2323221fe8a809c8 Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 22 May 2020 01:13:39 +0300 Subject: [PATCH] bootstrap 4.5 fixations & Update strings style to f-string --- accounts/templates/profile.html | 8 +++---- create/templates/create_instance_w1.html | 4 ++-- create/templates/create_instance_w2.html | 6 ++--- .../templates/add_instance_network_block.html | 2 +- instances/templates/add_instance_volume.html | 15 ++++++------- .../templates/allinstances_index_grouped.html | 16 +++++++------- instances/templates/edit_instance_volume.html | 22 +++++++++---------- instances/templates/instance.html | 8 +++---- instances/views.py | 18 +++++++-------- networks/views.py | 12 +++++----- nwfilters/views.py | 4 ++-- templates/base.html | 2 +- 12 files changed, 58 insertions(+), 59 deletions(-) diff --git a/accounts/templates/profile.html b/accounts/templates/profile.html index cc89a54..2a78c24 100644 --- a/accounts/templates/profile.html +++ b/accounts/templates/profile.html @@ -16,7 +16,7 @@
-
{% csrf_token %} + {% csrf_token %}
@@ -43,7 +43,7 @@ {% if show_profile_edit_password %} -
{% csrf_token %} + {% csrf_token %}
@@ -93,7 +93,7 @@
{% endif %} - {% csrf_token %} + {% csrf_token %}
@@ -114,7 +114,7 @@ {% if request.user.is_superuser %} -
{% csrf_token %} + {% csrf_token %}
diff --git a/create/templates/create_instance_w1.html b/create/templates/create_instance_w1.html index 4e3b53f..950671c 100644 --- a/create/templates/create_instance_w1.html +++ b/create/templates/create_instance_w1.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n %} {% load staticfiles %} -{% block title %}{% trans "Create new instance - Select Type" %}{% endblock %} +{% block title %}{% trans "Create new instanc" %} - {% trans "Select Type" %}{% endblock %} {% block content %} @@ -84,7 +84,7 @@
- {% csrf_token %} + {% csrf_token %}
diff --git a/create/templates/create_instance_w2.html b/create/templates/create_instance_w2.html index 7fe3463..18b671c 100644 --- a/create/templates/create_instance_w2.html +++ b/create/templates/create_instance_w2.html @@ -114,7 +114,7 @@
- {% if firmwares %} + {% if firmwares %}
@@ -286,7 +286,7 @@ - {% csrf_token %} + {% csrf_token %} - - + + +
diff --git a/instances/templates/allinstances_index_grouped.html b/instances/templates/allinstances_index_grouped.html index a93c7d1..9b4b503 100644 --- a/instances/templates/allinstances_index_grouped.html +++ b/instances/templates/allinstances_index_grouped.html @@ -2,18 +2,18 @@ - + - + {% for host, insts in all_host_vms.items %} - + @@ -23,9 +23,9 @@ @@ -74,14 +74,14 @@ function hide_all_host_instances() { all_host_rows = rows.filter('[host]'); all_host_rows.toggle(); $('span[id^=collapse_host_instances_]').toggleClass("fa-chevron-down").toggleClass("fa-chevron-up"); - $('span[id^=inst_count_badge_]').toggleClass("hidden"); + $('span[id^=inst_count_badge_]').toggleClass("d-none"); } function hide_host_instances(host) { var rows = $('table tr'); host_rows = rows.filter("[host='"+host+"']"); host_rows.toggle(); $("span[id='collapse_host_instances_"+host+"']").toggleClass("fa-chevron-down").toggleClass("fa-chevron-up"); - $("span[id='inst_count_badge_"+host+"']").toggleClass("hidden"); + $("span[id='inst_count_badge_"+host+"']").toggleClass("d-none"); } {% endblock %} diff --git a/instances/templates/edit_instance_volume.html b/instances/templates/edit_instance_volume.html index ca93e69..008b312 100644 --- a/instances/templates/edit_instance_volume.html +++ b/instances/templates/edit_instance_volume.html @@ -14,20 +14,20 @@
## {% trans "Name" %}
{% trans "Description" %}
{% trans "User"%} {% trans "Status" %} {% trans "VCPU" %} {% trans "Memory" %}{% trans "Actions & Mem Usage" %}{% trans "Actions" %} & {% trans "Mem Usage" %}
- {% ifequal host.2 1 %}{% trans "Active" %}{% endifequal %} - {% ifequal host.2 2 %}{% trans "Not Active" %}{% endifequal %} - {% ifequal host.2 3 %}{% trans "Connection Failed" %}{% endifequal %} + {% ifequal host.2 1 %}{% trans "Active" %}{% endifequal %} + {% ifequal host.2 2 %}{% trans "Not Active" %}{% endifequal %} + {% ifequal host.2 3 %}{% trans "Connection Failed" %}{% endifequal %} {{ host.3 }} {{ host.4|filesizeformat }}