From b932af4c1de7bae4e5e9a5bb78c647002614891a Mon Sep 17 00:00:00 2001 From: Zandre Engelbrecht Date: Thu, 7 May 2026 15:02:22 +0200 Subject: [PATCH 1/2] chore: apply djlint reformat to all Django templates --- commcare_connect/templates/403.html | 13 +- commcare_connect/templates/404.html | 13 +- commcare_connect/templates/500.html | 12 +- .../templates/account/account_inactive.html | 8 +- commcare_connect/templates/account/base.html | 44 +- commcare_connect/templates/account/email.html | 186 ++--- .../templates/account/email_confirm.html | 44 +- commcare_connect/templates/account/login.html | 147 ++-- .../templates/account/logout.html | 33 +- .../templates/account/password_change.html | 22 +- .../templates/account/password_reset.html | 36 +- .../account/password_reset_done.html | 11 +- .../account/password_reset_from_key.html | 118 ++- .../account/password_reset_from_key_done.html | 7 +- .../templates/account/password_set.html | 29 +- .../templates/account/signup.html | 176 ++-- .../templates/account/signup_closed.html | 8 +- .../templates/account/verification_sent.html | 12 +- .../account/verified_email_required.html | 27 +- commcare_connect/templates/base.html | 90 +-- commcare_connect/templates/base_table.html | 242 +++--- .../templates/components/avatar.html | 6 +- .../components/badges/badge_sm_dropdown.html | 82 +- .../templates/components/breadcrumbs.html | 8 +- .../components/cards/user_status_card.html | 91 ++- .../templates/components/confirm_modal.html | 72 +- .../dropdowns/text_button_dropdown.html | 88 +- .../templates/components/filter_modal.html | 76 +- .../templates/components/form.html | 11 +- .../components/invoice_confirm_modal.html | 69 +- .../add_org_member_modal.html | 20 +- .../remove_org_member_confirm_modal.html | 79 +- .../templates/components/partial_form.html | 1 - .../progressbar/simple-progressbar.html | 10 +- .../templates/components/sidenav-items.html | 45 +- .../components/upload_progress_bar.html | 73 +- .../delete_invites_confirm_modal.html | 82 +- .../worker_page/deliver_column.html | 52 +- .../components/worker_page/export_modal.html | 27 +- .../worker_page/fetch_flag_counts.html | 39 +- .../components/worker_page/flag_counts.html | 13 +- .../components/worker_page/import_modal.html | 78 +- .../components/worker_page/last_paid.html | 54 +- .../worker_page/payment_history.html | 36 +- .../components/worker_page/profile.html | 124 +-- .../worker_page/visit_task_tabs.html | 1 - .../worker_page/worker_profile_kpi.html | 75 +- commcare_connect/templates/email/base.html | 45 +- commcare_connect/templates/favicon.html | 13 +- .../templates/flags/feature_flags.html | 112 ++- .../templates/layouts/footer.html | 72 +- .../templates/layouts/header.html | 223 +++-- .../templates/layouts/sidenav.html | 109 ++- .../cluster_work_area_final_status.html | 5 +- .../cluster_work_area_modal.html | 56 +- .../cluster_work_area_modal_status.html | 13 +- .../templates/microplanning/home.html | 762 +++++++++--------- .../microplanning/import_work_area_modal.html | 242 +++--- .../templates/microplanning/map_handler.html | 1 - .../microplanning/work_area_form.html | 55 +- .../opportunity/add_payment_units.html | 31 +- .../add_visits_existing_users.html | 290 ++++--- .../assigned_task_edit_button.html | 19 +- .../opportunity/assigned_task_list.html | 167 ++-- .../bulk_approval_reject_modal.html | 86 +- .../templates/opportunity/dashboard.html | 225 +++--- .../templates/opportunity/deliver.html | 126 +-- .../opportunity/edit_assigned_task_form.html | 19 +- .../opportunity/edit_assigned_task_modal.html | 69 +- .../opportunity/edit_task_type_form.html | 15 +- .../opportunity/edit_task_type_modal.html | 47 +- .../email/automated_invoice_created.html | 54 +- .../opportunity/email/invoice_paid.html | 59 +- .../extendable_payment_unit_row.html | 73 +- .../templates/opportunity/invoice_base.html | 65 +- .../templates/opportunity/invoice_create.html | 16 +- .../templates/opportunity/invoice_detail.html | 175 ++-- .../opportunity/invoice_download.html | 52 +- .../templates/opportunity/invoice_list.html | 48 +- .../opportunity/invoice_payment_report.html | 65 +- .../templates/opportunity/learn.html | 1 - .../opportunity/new_task_type_modal.html | 66 +- .../opportunity/opportunities_list.html | 122 ++- .../opportunity_delivery_stat.html | 141 ++-- .../opportunity/opportunity_edit.html | 154 ++-- .../opportunity/opportunity_finalize.html | 9 +- .../opportunity_funnel_progress.html | 87 +- .../opportunity/opportunity_init.html | 57 +- .../opportunity/opportunity_menu.html | 103 ++- .../opportunity_resource_modal.html | 152 ++-- .../opportunity/opportunity_worker.html | 107 +-- .../opportunity/opportunity_worker_learn.html | 42 +- .../opportunity_worker_progress.html | 112 ++- .../partials/active_toggle_metadata.html | 30 +- .../partials/invoice_line_items.html | 5 +- .../partials/revoke_suspension.html | 10 +- .../templates/opportunity/payments.html | 32 +- .../templates/opportunity/send_message.html | 71 +- .../templates/opportunity/steps.html | 18 +- .../opportunity/suspended_users.html | 2 - .../opportunity/task_types_config.html | 90 +-- .../templates/opportunity/tasks.html | 1 - .../opportunity/user_task_details.html | 288 +++---- .../templates/opportunity/user_tasks.html | 219 +++-- .../opportunity/user_visit_details.html | 523 +++++------- .../opportunity/user_visit_verification.html | 82 +- .../user_visit_verification_table.html | 108 ++- .../verification_flags_config.html | 109 ++- .../opportunity/worker_list_base.html | 33 +- .../opportunity/worker_list_work_areas.html | 1 - .../opportunity/worker_visit_table.html | 8 +- .../templates/opportunity/workers.html | 24 +- .../organization/organization_create.html | 48 +- .../organization/organization_home.html | 97 +-- .../templates/pages/connect_user_otp.html | 10 +- commcare_connect/templates/pages/home.html | 65 +- .../email/monthly_delivery_reminder.html | 24 +- .../program/email/opportunity_created.html | 22 +- .../email/opportunity_expiry_reminder.html | 30 +- .../program/email/program_invite_applied.html | 19 +- .../email/program_invite_notification.html | 11 +- .../templates/program/nm_home.html | 115 ++- .../templates/program/pm_home.html | 298 +++---- .../templates/program/program_base.html | 143 ++-- .../templates/program/program_form.html | 15 +- commcare_connect/templates/reports/admin.html | 5 +- .../templates/reports/invoice_report.html | 179 ++-- .../templates/reports/report_table.html | 54 +- .../templates/tables/single_table.html | 4 +- .../templates/tables/table_manage_action.html | 13 +- .../templates/tables/table_placeholder.html | 24 +- .../templates/tasks/new_task_modal.html | 89 +- .../users/accept_invite_confirm.html | 19 +- .../templates/users/demo_tokens.html | 42 +- .../templates/users/internal_features.html | 26 +- .../users/permission_management.html | 48 +- .../users/permission_management_results.html | 57 +- .../templates/users/user_detail.html | 10 +- .../templates/users/user_form.html | 15 +- 139 files changed, 4799 insertions(+), 5489 deletions(-) diff --git a/commcare_connect/templates/403.html b/commcare_connect/templates/403.html index b9cfc06d58..5d06c5a915 100644 --- a/commcare_connect/templates/403.html +++ b/commcare_connect/templates/403.html @@ -1,9 +1,12 @@ {% extends "base.html" %} - {% block title %}Forbidden (403){% endblock %} - {% block content %} -

Forbidden (403)

- -

{% if exception %}{{ exception }}{% else %}You're not allowed to access this page.{% endif %}

+

Forbidden (403)

+

+ {% if exception %} + {{ exception }} + {% else %} + You're not allowed to access this page. + {% endif %} +

{% endblock content %} diff --git a/commcare_connect/templates/404.html b/commcare_connect/templates/404.html index 4e82d3d83a..3689b58249 100644 --- a/commcare_connect/templates/404.html +++ b/commcare_connect/templates/404.html @@ -1,9 +1,12 @@ {% extends "base.html" %} - {% block title %}Page not found{% endblock %} - {% block content %} -

Page not found

- -

{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}

+

Page not found

+

+ {% if exception %} + {{ exception }} + {% else %} + This is not the page you were looking for. + {% endif %} +

{% endblock content %} diff --git a/commcare_connect/templates/500.html b/commcare_connect/templates/500.html index fec31eee60..25390cac9d 100644 --- a/commcare_connect/templates/500.html +++ b/commcare_connect/templates/500.html @@ -1,11 +1,9 @@ {% extends "base.html" %} - {% block title %}Server Error{% endblock %} - {% block content %} -

Ooops!!! 500

- -

Looks like something went wrong!

- -

We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.

+

Ooops!!! 500

+

Looks like something went wrong!

+

+ We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing. +

{% endblock content %} diff --git a/commcare_connect/templates/account/account_inactive.html b/commcare_connect/templates/account/account_inactive.html index 31b4d8d435..1d39781bc5 100644 --- a/commcare_connect/templates/account/account_inactive.html +++ b/commcare_connect/templates/account/account_inactive.html @@ -1,13 +1,11 @@ {% extends "account/base.html" %} - {% load i18n %} - -{% block head_title %}{% translate "Account Inactive" %}{% endblock %} - +{% block head_title %} + {% translate "Account Inactive" %} +{% endblock %} {% block inner %}

{% translate "Account Inactive" %}

-

{% translate "This account is inactive." %}

{% endblock %} diff --git a/commcare_connect/templates/account/base.html b/commcare_connect/templates/account/base.html index 75676d4717..8a5b11c948 100644 --- a/commcare_connect/templates/account/base.html +++ b/commcare_connect/templates/account/base.html @@ -1,18 +1,24 @@ {% load static i18n %} - - {% block title %}Connect - {% block head_title %}{% endblock head_title %}{% endblock title %} + + {% block title %} + Connect - + {% block head_title %} + {% endblock head_title %} + {% endblock title %} + {% load static %} {% block css %} - - + + {% endblock %} - {% block javascript %} {{ GTM_VARS_JSON|json_script:"gtm-data" }} @@ -26,8 +32,12 @@
- Compact Logo - Compact Logo + Compact Logo + Compact Logo
@@ -40,16 +50,22 @@

10 +

-
- {% block inner %} - {% endblock %} +
+ {% block inner %}{% endblock %}
-
- Compact Logo +
+ Compact Logo
-
- Compact Logo +
+ Compact Logo
diff --git a/commcare_connect/templates/account/email.html b/commcare_connect/templates/account/email.html index 23220ac1a1..3156571b3f 100644 --- a/commcare_connect/templates/account/email.html +++ b/commcare_connect/templates/account/email.html @@ -1,107 +1,107 @@ {% extends "base.html" %} {% load i18n %} {% load crispy_forms_tags %} - {% block content %} -
- -

{% translate "Edit Name" %}

-
-
-
{% translate "Loading..." %}
+
+

{% translate "Edit Name" %}

+
+
+
{% translate "Loading..." %}
+
-
- - -
-

{% translate "E-mail Addresses" %}

- - {% if user.emailaddress_set.all %} -

{% translate 'The following e-mail addresses are associated with your account:' %}

- -
- {% csrf_token %} -
- {% for emailaddress in user.emailaddress_set.all %} -
- + +
+

{% translate "E-mail Addresses" %}

+ {% if user.emailaddress_set.all %} +

+ {% translate 'The following e-mail addresses are associated with your account:' %} +

+ + {% csrf_token %} +
+ {% for emailaddress in user.emailaddress_set.all %} +
+ +
+ {% endfor %} +
+ + +
- {% endfor %} - -
- - -
+ + {% else %} + - - - {% else %} - - {% endif %} - -
- - -
-

{% translate "Add E-mail Address" %}

- -
-
- {% csrf_token %} - {% crispy form %} -
- + {% endif %} +
+ +
+

{% translate "Add E-mail Address" %}

+
+ + {% csrf_token %} + {% crispy form %} +
+ +
+
- -
+
- -
{% endblock content %} - - {% block inline_javascript %} {{ block.super }} - {% endcomment %} - {% endblock inline_javascript %} + + {% endcomment %} + {% endblock inline_javascript %} diff --git a/commcare_connect/templates/base_table.html b/commcare_connect/templates/base_table.html index 6e861c7de8..ea6dafb3fd 100644 --- a/commcare_connect/templates/base_table.html +++ b/commcare_connect/templates/base_table.html @@ -1,147 +1,139 @@ {% load django_tables2 %} {% load i18n %} {% block table-wrapper %} -{% load sort_link %} -
- {% block table %} -
- - {% block table.thead %} - {% if table.show_header %} - - - {% for column in table.columns %} -
- {% if column.orderable %} - {% sortable_header column.name column.header table.use_view_url %} - {% else %} - {{ column.header }} + {% load sort_link %} +
+ {% block table %} +
+ + {% block table.thead %} + {% if table.show_header %} + + + {% for column in table.columns %} + + {% endfor %} + + {% endif %} - - {% endfor %} - - - {% endif %} - {% endblock table.thead %} - + {% endblock table.thead %} {% block table.tbody %} -
- {% for row in table.paginated_rows %} - {% block table.tbody.row %} -
- {% for column, cell in row.items %} - + {% for column, cell in row.items %} + - {% endfor %} - - {% endblock table.tbody.row %} + + {% endfor %} + + {% endblock table.tbody.row %} {% empty %} - {% if table.empty_text %} - {% block table.tbody.empty_text %} - - + {% if table.empty_text %} + {% block table.tbody.empty_text %} + + + + {% endblock table.tbody.empty_text %} + {% endif %} + {% endfor %} + {% block table.tfoot %} + {% if table.has_footer %} + + {% for column in table.columns %} + + {% endfor %} - {% endblock table.tbody.empty_text %} - {% endif %} - {% endfor %} - {% block table.tfoot %} - {% if table.has_footer %} - - {% for column in table.columns %} - - {% endfor %} - - {% endif %} - {% endblock table.tfoot %} - + {% endif %} + {% endblock table.tfoot %} + {% endblock table.tbody %} - - -
+ {% if column.orderable %} + {% sortable_header column.name column.header table.use_view_url %} + {% else %} + {{ column.header }} + {% endif %} +
- {% if column.localize == None %} - {{ cell }} - {% else %} - {% if column.localize %} - {{ cell|localize }} +
+ {% for row in table.paginated_rows %} + {% block table.tbody.row %} +
+ {% if column.localize == None %} + {{ cell }} {% else %} - {{ cell|unlocalize }} + {% if column.localize %} + {{ cell|localize }} + {% else %} + {{ cell|unlocalize }} + {% endif %} {% endif %} - {% endif %} -
- {{ table.empty_text }} -
{{ table.empty_text }}
{{ column.footer }} +
{{column.footer }}
-
- {% endblock table %} - {% block pagination %} - {% if table.page and table.paginator.count > DEFAULT_PAGE_SIZE %} -
+
+ {% endblock table %} + {% block pagination %} + {% if table.page and table.paginator.count > DEFAULT_PAGE_SIZE %} + - {% endif %} - - {% endblock pagination %} -
-{% endblock table-wrapper %} - -{% block inline_js %} - -{% endblock inline_js %} + + {% endblock inline_js %} diff --git a/commcare_connect/templates/components/avatar.html b/commcare_connect/templates/components/avatar.html index b96df4ca6c..c2ca45699a 100644 --- a/commcare_connect/templates/components/avatar.html +++ b/commcare_connect/templates/components/avatar.html @@ -1,6 +1,4 @@ -
+
{{ initials_text }}
diff --git a/commcare_connect/templates/components/badges/badge_sm_dropdown.html b/commcare_connect/templates/components/badges/badge_sm_dropdown.html index 658d8789ed..8a0247b256 100644 --- a/commcare_connect/templates/components/badges/badge_sm_dropdown.html +++ b/commcare_connect/templates/components/badges/badge_sm_dropdown.html @@ -1,71 +1,25 @@ - + +{{ list|length|add:-2 }} - -
+

{{ title|default:'Flags' }}

- {% for item in list %} -

{{ item }}

- {% endfor %} + {% for item in list %}

{{ item }}

{% endfor %}
diff --git a/commcare_connect/templates/components/breadcrumbs.html b/commcare_connect/templates/components/breadcrumbs.html index 06b1fd0ff1..e0e96be324 100644 --- a/commcare_connect/templates/components/breadcrumbs.html +++ b/commcare_connect/templates/components/breadcrumbs.html @@ -1,8 +1,8 @@ diff --git a/commcare_connect/templates/components/cards/user_status_card.html b/commcare_connect/templates/components/cards/user_status_card.html index eef643ab11..264e594649 100644 --- a/commcare_connect/templates/components/cards/user_status_card.html +++ b/commcare_connect/templates/components/cards/user_status_card.html @@ -1,6 +1,6 @@ {% load i18n %} - -
+

User Status Details

{% if opportunity_access.suspended %} @@ -10,25 +10,20 @@

User Status Details

- {% translate "Revoke Suspension" %} - + {% else %} - + {% endif %} {% endif %}
- {% if opportunity_access.suspended %}
{% if opportunity_access.suspension_date %} @@ -45,43 +40,53 @@

User Status Details

{% endif %} - -