From e7168f2884d4f471d2ff1b4c2ab7ae53c9cdc684 Mon Sep 17 00:00:00 2001 From: Biyeun Buczyk Date: Mon, 4 Nov 2024 20:59:36 +0100 Subject: [PATCH 001/159] since there can be multiple alerts, also reference the index within those alerts --- .../templates/case_importer/partials/ko_import_status.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html b/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html index 2aa7572acf89..753af340edb1 100644 --- a/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html +++ b/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html @@ -60,14 +60,14 @@ class="btn btn-outline-primary btn-sm" data-bs-toggle="collapse" data-bind="attr: { - 'data-bs-target': '#rowDetailsCollapse-' + $parentContext.$index(), - 'aria-controls': 'rowDetailsCollapse-' + $parentContext.$index() + 'data-bs-target': '#rowDetailsCollapse-' + $parentContext.$index() + '-' + $index(), + 'aria-controls': 'rowDetailsCollapse-' + $parentContext.$index() + '-' + $index() }" aria-expanded="false"> {% trans "Toggle Affected Row(s)" %}
+ data-bind="attr: { id: 'rowDetailsCollapse-' + $parentContext.$index() + '-' + $index() }">
From 9e6d941e08972ff1e8e52cfb0895e053b6749ec4 Mon Sep 17 00:00:00 2001 From: Biyeun Buczyk Date: Mon, 4 Nov 2024 21:01:13 +0100 Subject: [PATCH 002/159] improve html formatting for readability, move away from unstyled list and have separate alerts --- .../partials/ko_import_status.html | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html b/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html index 753af340edb1..ff428c2be8d5 100644 --- a/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html +++ b/corehq/apps/case_importer/templates/case_importer/partials/ko_import_status.html @@ -27,56 +27,56 @@ -
-
    - - -
  • - -

    - - {% blocktrans %} - row had an invalid - "" cell and was not saved - {% endblocktrans %} + +

    + + +
    + + {% blocktrans %} + row had an invalid + "" cell and was not saved + {% endblocktrans %} + + + {% blocktrans %} + rows had invalid + "" cells and were not saved + {% endblocktrans %} + +
    - - {% blocktrans %} - rows had invalid - "" cells and were not saved - {% endblocktrans %} + +
    -

    - - -

    - -

    -

    -

    -

    -
    - -
    -
    +

    +

    +
    + +
    +
    +
    -
    -
  • - - -
-
+ + + From 8391a2d064a215d1b46567b72067334b2fc222b0 Mon Sep 17 00:00:00 2001 From: Ethan Soergel Date: Fri, 8 Nov 2024 13:38:19 -0500 Subject: [PATCH 003/159] Whitelist domains using post endpoint as API We'd like to phase out this code path - doing this will at least let us prevent new projects from using it accidentally (once we start enforcing the whitelist in a future commit) --- .../apps/receiverwrapper/tests/test_auth.py | 60 ++++++++++++++++++- corehq/apps/receiverwrapper/views.py | 4 ++ corehq/toggles/__init__.py | 7 ++- 3 files changed, 67 insertions(+), 4 deletions(-) diff --git a/corehq/apps/receiverwrapper/tests/test_auth.py b/corehq/apps/receiverwrapper/tests/test_auth.py index 0e02aed674c2..25634f5f3ed0 100644 --- a/corehq/apps/receiverwrapper/tests/test_auth.py +++ b/corehq/apps/receiverwrapper/tests/test_auth.py @@ -2,21 +2,26 @@ import uuid from datetime import datetime, timedelta from unittest import mock +from urllib.parse import urlencode from django.http import HttpResponse from django.test import Client, TestCase from django.urls import reverse +import django_digest.test from oauth2_provider.models import get_access_token_model -from urllib.parse import urlencode from couchforms import openrosa_response -import django_digest.test +from corehq import toggles from corehq.apps.app_manager.models import Application from corehq.apps.domain.shortcuts import create_domain from corehq.apps.receiverwrapper.util import DEMO_SUBMIT_MODE -from corehq.apps.receiverwrapper.views import post_api, secure_post +from corehq.apps.receiverwrapper.views import ( + _verify_access, + post_api, + secure_post, +) from corehq.apps.users.models import ( CommCareUser, HqPermissions, @@ -422,3 +427,52 @@ def test_edit_data_required(self): def test_access_api_required(self): self._create_user(edit_data=True, access_api=False) self.assert_api_response(403) + + +@mock.patch('corehq.apps.receiverwrapper.views.is_from_formplayer') +@mock.patch('corehq.toggles.set_toggle') +@mock.patch('corehq.apps.receiverwrapper.views.cache.get', mock.MagicMock(return_value=None)) +@mock.patch('corehq.apps.receiverwrapper.views.cache.set', mock.MagicMock) +class TestHasMobileAccess(TestCase): + domain = "test-has-mobile-access" + + @classmethod + def setUpClass(cls): + cls.domain_obj = create_domain(cls.domain) + cls.user_without_permission = cls._create_user(access_mobile_endpoints=False) + cls.user_with_permission = cls._create_user(access_mobile_endpoints=True) + + @classmethod + def tearDownClass(cls): + cls.domain_obj.delete() + + @classmethod + def _create_user(cls, access_mobile_endpoints=False): + role = UserRole.create( + cls.domain, 'api-user', permissions=HqPermissions(access_mobile_endpoints=access_mobile_endpoints) + ) + return WebUser.create(cls.domain, str(uuid.uuid4()), 'p@$$w0rd', + None, None, role_id=role.get_id) + + def _verify_access(self, user): + _verify_access(self.domain, user.user_id, mock.MagicMock(couch_user=user)) + + def test_formplayer_request_without_permission(self, set_toggle, is_from_formplayer): + is_from_formplayer.return_value = True + self._verify_access(self.user_without_permission) + set_toggle.assert_not_called() + + def test_regular_request_without_permission(self, set_toggle, is_from_formplayer): + is_from_formplayer.return_value = False + self._verify_access(self.user_without_permission) + set_toggle.assert_called_with('open_submission_endpoint', self.domain, True, toggles.NAMESPACE_DOMAIN) + + def test_formplayer_request_with_permission(self, set_toggle, is_from_formplayer): + is_from_formplayer.return_value = True + self._verify_access(self.user_with_permission) + set_toggle.assert_not_called() + + def test_regular_request_with_permission(self, set_toggle, is_from_formplayer): + is_from_formplayer.return_value = False + self._verify_access(self.user_with_permission) + set_toggle.assert_not_called() diff --git a/corehq/apps/receiverwrapper/views.py b/corehq/apps/receiverwrapper/views.py index df58cd1f8b9e..3e9f41e5a940 100644 --- a/corehq/apps/receiverwrapper/views.py +++ b/corehq/apps/receiverwrapper/views.py @@ -79,6 +79,10 @@ def _verify_access(domain, user_id, request): cache.set(cache_key, True, CACHE_EXPIRY_7_DAYS_IN_SECS) message = f"NoMobileEndpointsAccess: invalid request by {user_id} on {domain}" notify_exception(request, message=message) + if not toggles.OPEN_SUBMISSION_ENDPOINT.enabled(domain): + # Once we're confident this has enabled the flag for all active + # usage, we can make domains without the toggle fail hard + toggles.OPEN_SUBMISSION_ENDPOINT.set(domain, enabled=True, namespace=toggles.NAMESPACE_DOMAIN) @profile_dump('commcare_receiverwapper_process_form.prof', probability=PROFILE_PROBABILITY, limit=PROFILE_LIMIT) diff --git a/corehq/toggles/__init__.py b/corehq/toggles/__init__.py index 1234662bda34..f4cd8b9fab0b 100644 --- a/corehq/toggles/__init__.py +++ b/corehq/toggles/__init__.py @@ -1705,7 +1705,6 @@ def _commtrackify(domain_name, toggle_is_enabled): [NAMESPACE_DOMAIN] ) - DISABLE_MOBILE_ENDPOINTS = StaticToggle( 'disable_mobile_endpoints', 'Disable mobile endpoints for form submissions and restores', @@ -1719,6 +1718,12 @@ def _commtrackify(domain_name, toggle_is_enabled): ) ) +OPEN_SUBMISSION_ENDPOINT = StaticToggle( + 'open_submission_endpoint', + 'Leave submission endpoint open to let old APIs keep working', + TAG_DEPRECATED, + [NAMESPACE_DOMAIN], +) EMWF_WORKER_ACTIVITY_REPORT = StaticToggle( 'emwf_worker_activity_report', From 91d95ffe6e63d54bb24bb8581a533625e27ab7a0 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:27:49 +0000 Subject: [PATCH 004/159] "Bootstrap 5 Migration - marking domain as in progress" --- .../apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json b/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json index 5684aa10e77a..b652ac9d9c66 100644 --- a/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json +++ b/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json @@ -143,5 +143,8 @@ }, "locations": { "is_complete": true + }, + "domain": { + "in_progress": true } } From 36895919190d43aa6739362ba569cab1b23a086e Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:28:01 +0000 Subject: [PATCH 005/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/sms_rates.html, splitting templates" --- .../admin/{ => bootstrap3}/sms_rates.html | 0 .../domain/admin/bootstrap5/sms_rates.html | 44 +++++++++++++++++++ corehq/apps/domain/views/sms.py | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/sms_rates.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html diff --git a/corehq/apps/domain/templates/domain/admin/sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/sms_rates.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/sms_rates.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html new file mode 100644 index 000000000000..df9504a25988 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_rates.html @@ -0,0 +1,44 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %} + +{% block page_content %} +
{# todo B5: css-well #} +

+ {% blocktrans %} + Use this form to get a cost estimation per 160 character SMS, + given a connection, direction, + and country code. + {% endblocktrans %} +

+

+ {% blocktrans %} + The fee will be applied to the most specific criteria available. + A fee for a specific country code (if available) will be used + over the default of 'Any Country'. + {% endblocktrans %} +

+

+ {% blocktrans %} + Fees are subject to change based on updates to each carrier and are + computed at the time the SMS is sent. + {% endblocktrans %} +

+
+
+
+ {% crispy rate_calc_form %} {# todo B5: crispy #} +
+ {% blocktrans %} + Calculating SMS Rate... + {% endblocktrans %} +
+
+
+{% endblock %} diff --git a/corehq/apps/domain/views/sms.py b/corehq/apps/domain/views/sms.py index 7385eb14fd03..23482d8878ac 100644 --- a/corehq/apps/domain/views/sms.py +++ b/corehq/apps/domain/views/sms.py @@ -43,7 +43,7 @@ def post(self, request, *args, **kwargs): class SMSRatesView(BaseAdminProjectSettingsView, AsyncHandlerMixin): urlname = 'domain_sms_rates_view' page_title = gettext_lazy("SMS Rate Calculator") - template_name = 'domain/admin/sms_rates.html' + template_name = 'domain/admin/bootstrap3/sms_rates.html' async_handlers = [ SMSRatesAsyncHandler, SMSRatesSelect2AsyncHandler, From eb06d152601db9de80939b83839a4b0d76b38107 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:28:20 +0000 Subject: [PATCH 006/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/project_privacy.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/project_privacy.html | 0 .../templates/domain/admin/bootstrap5/project_privacy.html | 6 ++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/project_privacy.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/project_privacy.html diff --git a/corehq/apps/domain/templates/domain/admin/project_privacy.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/project_privacy.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/project_privacy.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/project_privacy.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/project_privacy.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_privacy.html new file mode 100644 index 000000000000..34b1d901c2dd --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_privacy.html @@ -0,0 +1,6 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} + +{% block page_content %} + {% crispy privacy_form %} {# todo B5: crispy #} +{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index 69567466f535..eba3b3a64190 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -279,7 +279,7 @@ def logo(request, domain): class EditPrivacySecurityView(BaseAdminProjectSettingsView): - template_name = "domain/admin/project_privacy.html" + template_name = "domain/admin/bootstrap3/project_privacy.html" urlname = "privacy_info" page_title = gettext_lazy("Privacy and Security") From eef156f22614315138df9b100785ddfd8bb463f0 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:29:00 +0000 Subject: [PATCH 007/159] "Bootstrap 5 Migration - initial auto-migration for domain/confirm_billing_info.html, splitting templates" --- .../confirm_billing_info.html | 0 .../bootstrap5/confirm_billing_info.html | 32 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/confirm_billing_info.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html diff --git a/corehq/apps/domain/templates/domain/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html similarity index 100% rename from corehq/apps/domain/templates/domain/confirm_billing_info.html rename to corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html new file mode 100644 index 000000000000..753e2dce0786 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html @@ -0,0 +1,32 @@ +{% extends "domain/base_change_plan.html" %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/confirm_billing_info' %} + +{% block form_content %} + {% initial_page_data "plan" plan %} + {% initial_page_data "cards" cards %} + {% initial_page_data "stripe_public_key" stripe_public_key %} + {% initial_page_data "downgrade_email_note" downgrade_email_note %} + {% registerurl "cards_view" domain %} +

+ {% blocktrans with plan.name as p%} + You are about to subscribe to the {{ p }} Software Plan.
+ Please update your billing information below before continuing. + {% endblocktrans %} +

+ +
{# todo B5: css-panel #} +
+ {% crispy billing_account_info_form %} {# todo B5: crispy #} +
+
+ +
{# todo B5: css-panel #} +
+ {% include 'domain/stripe_cards.html' %} +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 55fc866a5f44..72b44ffc2212 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1327,7 +1327,7 @@ def post(self, request, *args, **kwargs): class ConfirmBillingAccountInfoView(ConfirmSelectedPlanView, AsyncHandlerMixin): - template_name = 'domain/confirm_billing_info.html' + template_name = 'domain/bootstrap3/confirm_billing_info.html' urlname = 'confirm_billing_account_info' step_title = gettext_lazy("Confirm Billing Information") is_new = False From 0d0787287c469f7a6dd3ecf3bc40d9765199bfd1 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:29:18 +0000 Subject: [PATCH 008/159] "Bootstrap 5 Migration - initial auto-migration for domain/renew_plan.html, splitting templates" --- .../domain/{ => bootstrap3}/renew_plan.html | 0 .../domain/bootstrap5/renew_plan.html | 49 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/renew_plan.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html diff --git a/corehq/apps/domain/templates/domain/renew_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html similarity index 100% rename from corehq/apps/domain/templates/domain/renew_plan.html rename to corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html new file mode 100644 index 000000000000..6912137c82dd --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html @@ -0,0 +1,49 @@ +{% extends "domain/base_change_plan.html" %} +{% load hq_shared_tags %} +{% load i18n %} +{% load compress %} +{% load menu_tags %} + +{% requirejs_main_b5 'accounting/js/renew_plan_selection' %} + +{% block plan_breadcrumbs %}{% endblock %} + +{% block form_content %} + {% initial_page_data 'renewal_choices' renewal_choices %} + {% initial_page_data 'is_annual_plan' is_annual_plan %} + {% initial_page_data 'is_self_renewable_plan' is_self_renewable_plan %} + +

+ {% blocktrans with plan.name as p %} + You are renewing your {{ p }} subscription. + {% endblocktrans %} +

+ +
+ {% csrf_token %} + + {% if is_self_renewable_plan %} + {% include 'accounting/partials/renew_plan_selection.html' %} + {% else %} + {% include 'accounting/partials/confirm_plan_summary.html' %} + {% endif %} + + + + +
+ {% if downgrade_messages %} + + {% trans 'Talk to Sales' %} + + {% endif %} + +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 72b44ffc2212..b35a39c6359d 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1526,7 +1526,7 @@ class SubscriptionRenewalView(PlanViewBase, SubscriptionMixin): urlname = "domain_subscription_renewal" page_title = gettext_lazy("Renew Plan") step_title = gettext_lazy("Renew Plan") - template_name = "domain/renew_plan.html" + template_name = "domain/bootstrap3/renew_plan.html" @property def current_edition(self): From a3cd78f66d15bb328e4edc79650ea28ddaa9aa7f Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:30:08 +0000 Subject: [PATCH 009/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/recovery_measures_history.html, splitting templates" --- .../recovery_measures_history.html | 0 .../bootstrap5/recovery_measures_history.html | 63 +++++++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 64 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/recovery_measures_history.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/recovery_measures_history.html diff --git a/corehq/apps/domain/templates/domain/admin/recovery_measures_history.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/recovery_measures_history.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/recovery_measures_history.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/recovery_measures_history.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/recovery_measures_history.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/recovery_measures_history.html new file mode 100644 index 000000000000..9f77a7fc19c1 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/recovery_measures_history.html @@ -0,0 +1,63 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load i18n %} +{% load hq_shared_tags %} + +{% block page_content %} +
+
+ + {% for app_name, measures in measures_by_app %} + + + + + + + + + + + + + + + + {% for measure in measures %} + + + + + + + + + + {% endfor %} + + {% if not measures %} + + + + {% endif %} + + +
{{ app_name }}
{% trans "Measure" %}{% trans "Sequence Number" %}{% trans "App Versions" %}{% trans "CC Versions" %}{% trans "Created On" %}{% trans "User" %}{% trans "Notes" %}
{{ measure.get_measure_display }}{{ measure.sequence_number }} + {% if measure.app_all_versions %} + {% trans "All" %} + {% else %} + {{ measure.app_version_min }} - {{ measure.app_version_max }} + {% endif %} + + {% if measure.cc_all_versions %} + {% trans "All" %} + {% else %} + {{ measure.cc_version_min }} - {{ measure.cc_version_max }} + {% endif %} + {{ measure.created_on }}{{ measure.username }}{{ measure.notes }}
+ {% trans "No measures have been initiated for this application" %} +
+ {% endfor %} + +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index eba3b3a64190..4400187836ec 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -506,7 +506,7 @@ def post(self, request, *args, **kwargs): class RecoveryMeasuresHistory(BaseAdminProjectSettingsView): urlname = 'recovery_measures_history' page_title = gettext_lazy("Recovery Measures History") - template_name = 'domain/admin/recovery_measures_history.html' + template_name = 'domain/admin/bootstrap3/recovery_measures_history.html' @property def page_context(self): From 62b09cdd8f9b06ba0b3ae5c311edfeb6b21dd05c Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:30:15 +0000 Subject: [PATCH 010/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/calendar_fixture.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/calendar_fixture.html | 0 .../domain/admin/bootstrap5/calendar_fixture.html | 7 +++++++ 2 files changed, 7 insertions(+) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/calendar_fixture.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html diff --git a/corehq/apps/domain/templates/domain/admin/calendar_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/calendar_fixture.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/calendar_fixture.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/calendar_fixture.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html new file mode 100644 index 000000000000..4a8c2cddf31f --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/calendar_fixture.html @@ -0,0 +1,7 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load i18n %} +{% block page_content %} +

{% trans "Calendar Fixture Settings" %}

+ {% crispy form %} {# todo B5: crispy #} +{% endblock %} From 290385f605facbf42ef0b0be6c30e390d49168c8 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:30:25 +0000 Subject: [PATCH 011/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/edit_alert.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/edit_alert.html | 0 .../domain/admin/bootstrap5/edit_alert.html | 12 ++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/edit_alert.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/edit_alert.html diff --git a/corehq/apps/domain/templates/domain/admin/edit_alert.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/edit_alert.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/edit_alert.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/edit_alert.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/edit_alert.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/edit_alert.html new file mode 100644 index 000000000000..2da40402ae10 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/edit_alert.html @@ -0,0 +1,12 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% block page_content %} +
+
+ {% trans 'Edit Alert' %} + {% crispy form %} {# todo B5: crispy #} +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index 4400187836ec..edd0398a315d 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -616,7 +616,7 @@ def _create_alert(self): class EditDomainAlertView(BaseDomainAlertsView): - template_name = 'domain/admin/edit_alert.html' + template_name = 'domain/admin/bootstrap3/edit_alert.html' urlname = 'domain_edit_alert' page_title = gettext_lazy("Edit Project Alert") From 800bd0505e0dd0f33dbaf140b01e817c8ab025df Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:30:38 +0000 Subject: [PATCH 012/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/info_basic.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/info_basic.html | 0 .../domain/admin/bootstrap5/info_basic.html | 15 +++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/info_basic.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html diff --git a/corehq/apps/domain/templates/domain/admin/info_basic.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/info_basic.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html new file mode 100644 index 000000000000..fb9122791bb2 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html @@ -0,0 +1,15 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} + + +{% requirejs_main_b5 'domain/js/info_basic' %} + +{% block stylesheets %}{{ block.super }} + +{% endblock stylesheets %} + +{% block page_content %} + {% initial_page_data 'mapbox_access_token' mapbox_access_token %} + {% crispy basic_info_form %} {# todo B5: crispy #} +{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index edd0398a315d..7f0565c18b76 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -129,7 +129,7 @@ def main_context(self): class EditBasicProjectInfoView(BaseEditProjectInfoView): - template_name = 'domain/admin/info_basic.html' + template_name = 'domain/admin/bootstrap3/info_basic.html' urlname = 'domain_basic_info' page_title = gettext_lazy("Basic") From 50eef3e1bac927819f984c84a0b5a06500a15022 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:31:01 +0000 Subject: [PATCH 013/159] "Bootstrap 5 Migration - initial auto-migration for domain/internal_calculations.html, splitting templates" --- .../internal_calculations.html | 0 .../bootstrap5/internal_calculations.html | 28 +++++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/internal_calculations.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/internal_calculations.html diff --git a/corehq/apps/domain/templates/domain/internal_calculations.html b/corehq/apps/domain/templates/domain/bootstrap3/internal_calculations.html similarity index 100% rename from corehq/apps/domain/templates/domain/internal_calculations.html rename to corehq/apps/domain/templates/domain/bootstrap3/internal_calculations.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/internal_calculations.html b/corehq/apps/domain/templates/domain/bootstrap5/internal_calculations.html new file mode 100644 index 000000000000..0e44a7fbdecf --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/internal_calculations.html @@ -0,0 +1,28 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 "domain/js/internal_calculations" %} + +{% block page_content %} + {% registerurl 'calculated_properties' domain %} +
+

+
+ {% for calc_tag in order %} +
{# todo B5: css-form-group #} + +
+
{# todo B5: css-well #} +
+
+ +
+
+
+ {% endfor %} +
+{% endblock %} diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index b5d2720d1b67..1a50e7265898 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -222,7 +222,7 @@ def post(self, request, *args, **kwargs): class EditInternalCalculationsView(BaseInternalDomainSettingsView): urlname = 'domain_internal_calculations' page_title = gettext_lazy("Calculated Properties") - template_name = 'domain/internal_calculations.html' + template_name = 'domain/bootstrap3/internal_calculations.html' @method_decorator(always_allow_project_access) @method_decorator(login_and_domain_required) From 5a11d4461fd3c7fbfa9006d503607bf397ca03f1 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:31:16 +0000 Subject: [PATCH 014/159] "Bootstrap 5 Migration - initial auto-migration for domain/confirm_subscription_renewal.html, splitting templates" --- .../confirm_subscription_renewal.html | 0 .../confirm_subscription_renewal.html | 36 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/confirm_subscription_renewal.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html diff --git a/corehq/apps/domain/templates/domain/confirm_subscription_renewal.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html similarity index 100% rename from corehq/apps/domain/templates/domain/confirm_subscription_renewal.html rename to corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html new file mode 100644 index 000000000000..9166ac561f98 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html @@ -0,0 +1,36 @@ +{% extends "domain/base_change_plan.html" %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'accounting/js/widgets' %} + +{% block plan_breadcrumbs %}{% endblock %} + +{% block form_content %} +

+ {% blocktrans with next_plan.name as p_name%} + You are renewing your plan to {{ p_name }}. + {% endblocktrans %} + {% if next_plan.name == plan.name %} + {% trans "— which matches your current feature usage." %} + {% endif %} +
+ {% blocktrans with subscription.date_end as start_date %} + It will be renewed automatically on {{ start_date }}. + {% endblocktrans %} +

+ {% if next_plan.name != plan.name %} +
+ {% blocktrans with next_plan.monthly_fee as monthly_fee and subscription.date_end as start_date %} +

Note: You are renewing to a different plan

+

The new plan will take effect on {{ start_date }} and will cost {{ monthly_fee }}/month.

+ {% endblocktrans %} +
+ {% endif %} +
{# todo B5: css-panel #} +
+ {% crispy confirm_form %} {# todo B5: crispy #} +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index b35a39c6359d..41937d31aa00 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1592,7 +1592,7 @@ def page_context(self): class ConfirmSubscriptionRenewalView(PlanViewBase, DomainAccountingSettings, AsyncHandlerMixin, SubscriptionMixin): - template_name = 'domain/confirm_subscription_renewal.html' + template_name = 'domain/bootstrap3/confirm_subscription_renewal.html' urlname = 'domain_subscription_renewal_confirmation' page_title = gettext_lazy("Confirm Billing Information") step_title = gettext_lazy("Confirm Billing Information") From 6e3533b8c4f5bd8f6da7d21ab0b21bcc3aa8deb3 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:31:35 +0000 Subject: [PATCH 015/159] "Bootstrap 5 Migration - initial auto-migration for domain/tombstone_management.html, splitting templates" --- .../tombstone_management.html | 0 .../bootstrap5/tombstone_management.html | 60 +++++++++++++++++++ corehq/apps/domain/views/tombstone.py | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/tombstone_management.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/tombstone_management.html diff --git a/corehq/apps/domain/templates/domain/tombstone_management.html b/corehq/apps/domain/templates/domain/bootstrap3/tombstone_management.html similarity index 100% rename from corehq/apps/domain/templates/domain/tombstone_management.html rename to corehq/apps/domain/templates/domain/bootstrap3/tombstone_management.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/tombstone_management.html b/corehq/apps/domain/templates/domain/bootstrap5/tombstone_management.html new file mode 100644 index 000000000000..1f07f6a42abd --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/tombstone_management.html @@ -0,0 +1,60 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} + +{% block page_content %} +
+
+

{{ current_page.title }}

+

+ Please type comma-separated domain names of to check tombstones of. +

+ {% crispy form %} {# todo B5: crispy #} +
+
+ + + {% for name, projects in domains %} + + + + + {% endfor %} +
NameStatus
{{ name }} + {% if projects|length == 0 %} + Project does not exist + {% elif projects|length == 1 %} + {% with projects.0 as project %} + {% if project.doc_type == 'Domain-Deleted' %} + Project Tombstone + {% else %} + Normal Project + {% endif %} + (raw doc) + {% endwith %} + {% else %} + Multiple Projects with this name! + {% regroup projects by doc_type as doc_type_list %} +
    + {% for doc_type in doc_type_list %} +
  • + {% if doc_type.grouper == 'Domain-Deleted' %} + Project Tombstones: + {% else %} + Normal Projects: + {% endif %} + {{ doc_type.list|length }} + ({% for project in doc_type.list %}{% if not forloop.first %}, {% endif %}raw doc{% endfor %}) +
  • + {% endfor %} +
+ {% endif %} +
+
+ {% csrf_token %} + + {% if not projects|length %}{% endif %} +
+
+
+
+{% endblock %} diff --git a/corehq/apps/domain/views/tombstone.py b/corehq/apps/domain/views/tombstone.py index bf82ee7d3119..e5ee1cc4f05a 100644 --- a/corehq/apps/domain/views/tombstone.py +++ b/corehq/apps/domain/views/tombstone.py @@ -22,7 +22,7 @@ class TombstoneManagement(BaseAdminSectionView): urlname = 'tombstone_management' page_title = _("Prevent the use of specific domain names") - template_name = 'domain/tombstone_management.html' + template_name = 'domain/bootstrap3/tombstone_management.html' form = None domain_results = None From ed81ed995ee0de2a2e6e7c0bccc76cca42fd8fcb Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:32:19 +0000 Subject: [PATCH 016/159] "Bootstrap 5 Migration - initial auto-migration for domain/manage_releases_by_app_profile.html, splitting templates" --- .../manage_releases_by_app_profile.html | 0 .../manage_releases_by_app_profile.html | 70 +++++++++++++++++++ corehq/apps/domain/views/releases.py | 2 +- 3 files changed, 71 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/manage_releases_by_app_profile.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_app_profile.html diff --git a/corehq/apps/domain/templates/domain/manage_releases_by_app_profile.html b/corehq/apps/domain/templates/domain/bootstrap3/manage_releases_by_app_profile.html similarity index 100% rename from corehq/apps/domain/templates/domain/manage_releases_by_app_profile.html rename to corehq/apps/domain/templates/domain/bootstrap3/manage_releases_by_app_profile.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_app_profile.html b/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_app_profile.html new file mode 100644 index 000000000000..01125ef05cdb --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_app_profile.html @@ -0,0 +1,70 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'app_manager/js/manage_releases_by_app_profile' %} + +{% block page_content %} + {% initial_page_data 'app_releases_by_app_profile' app_releases_by_app_profile %} + {% initial_page_data 'appVersionSelectInitialValue' selected_build_details %} + {% initial_page_data 'appBuildProfileInitialValues' initial_app_build_profile_details %} + {% initial_page_data 'appVersionOnlyShowReleased' True %} + {% initial_page_data 'buildProfilesPerApp' build_profiles_per_app %} + {% registerurl 'toggle_release_restriction_by_app_profile' domain '---'%} + {% registerurl "paginate_releases" domain '---' %} + +
+
+
+
+ {% crispy search_form %} {# todo B5: crispy #} +
+
+
+
+ {% crispy creation_form %} {# todo B5: crispy #} +
+
+
+ + {% if app_releases_by_app_profile %} + + + + + + + + + + + + + + + + + + + +
{% trans 'Application' %}{% trans 'Profile' %}{% trans 'Version' %}{% trans 'Status' %}{% trans 'Action' %}
+ +
+ + {% trans 'Could not update!' %} + + +
+ {% endif %} + +{% endblock %} diff --git a/corehq/apps/domain/views/releases.py b/corehq/apps/domain/views/releases.py index d3e211fc3bb9..1f7eed90af3b 100644 --- a/corehq/apps/domain/views/releases.py +++ b/corehq/apps/domain/views/releases.py @@ -96,7 +96,7 @@ def post(self, request, *args, **kwargs): @method_decorator([toggles.RELEASE_BUILDS_PER_PROFILE.required_decorator(), require_can_edit_apps], name='dispatch') class ManageReleasesByAppProfile(BaseProjectSettingsView): - template_name = 'domain/manage_releases_by_app_profile.html' + template_name = 'domain/bootstrap3/manage_releases_by_app_profile.html' urlname = 'manage_releases_by_app_profile' page_title = gettext_lazy("Manage Releases By App Profile") From 43bf5dab107b13851f826c11e84166a4fff77a3b Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:32:42 +0000 Subject: [PATCH 017/159] "Bootstrap 5 Migration - initial auto-migration for domain/email/domain_invite.html, splitting templates" --- .../email/{ => bootstrap3}/domain_invite.html | 0 .../email/bootstrap5/domain_invite.html | 44 +++++++++++++++++++ corehq/apps/users/models.py | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/email/{ => bootstrap3}/domain_invite.html (100%) create mode 100644 corehq/apps/domain/templates/domain/email/bootstrap5/domain_invite.html diff --git a/corehq/apps/domain/templates/domain/email/domain_invite.html b/corehq/apps/domain/templates/domain/email/bootstrap3/domain_invite.html similarity index 100% rename from corehq/apps/domain/templates/domain/email/domain_invite.html rename to corehq/apps/domain/templates/domain/email/bootstrap3/domain_invite.html diff --git a/corehq/apps/domain/templates/domain/email/bootstrap5/domain_invite.html b/corehq/apps/domain/templates/domain/email/bootstrap5/domain_invite.html new file mode 100644 index 000000000000..fbb3907ff5bd --- /dev/null +++ b/corehq/apps/domain/templates/domain/email/bootstrap5/domain_invite.html @@ -0,0 +1,44 @@ +{% extends 'registration/email/confirm_account.html' %} +{% load i18n %} + +{% block preview_text %} + {% blocktrans %} + {{ inviter }} has invited you to join the {{ domain }} project at CommCare HQ! + {% endblocktrans %} +{% endblock %} + +{% block cta_headline %} + {% blocktrans %} + You're invited to join {{ domain }}! + {% endblocktrans %} +{% endblock %} + +{% block cta_url %}{{ url }}{% endblock %} + +{% block cta_text %} + {% blocktrans %} + Accept Invitation + {% endblocktrans %} +{% endblock %} + +{% block lead_text %} + {% blocktrans %} + {{ inviter }} has invited you to join the {{ domain }} project on CommCare HQ. + This invitation expires in {{ days }} day(s). + {% endblocktrans %} +{% endblock %} + +{% block secondary_text %} + {% blocktrans %} + CommCare HQ is a data management tool used by over 500 organizations + to help frontline workers around the world. + Learn more about CommCare. {# todo B5: inline-style #} + {% endblocktrans %} +{% endblock %} + +{% block reason_for_email %} + {% blocktrans %} + You received this message because we received an invitation request from + {{ inviter }} from the project "{{ domain }}" + {% endblocktrans %} +{% endblock %} diff --git a/corehq/apps/users/models.py b/corehq/apps/users/models.py index 5312cf1fe9d6..6ff3d05de508 100644 --- a/corehq/apps/users/models.py +++ b/corehq/apps/users/models.py @@ -2794,7 +2794,7 @@ def send_activation_email(self, remaining_days=30): with override_language(lang): if domain_request is None: text_content = render_to_string("domain/email/domain_invite.txt", params) - html_content = render_to_string("domain/email/domain_invite.html", params) + html_content = render_to_string("domain/email/bootstrap3/domain_invite.html", params) subject = _('Invitation from %s to join CommCareHQ') % inviter.formatted_name else: text_content = render_to_string("domain/email/domain_request_approval.txt", params) From cc241037b4ae6814c5d755518600ea7d625e1319 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:32:50 +0000 Subject: [PATCH 018/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/commtrack_settings.html, splitting templates" --- corehq/apps/commtrack/views.py | 2 +- .../admin/{ => bootstrap3}/commtrack_settings.html | 0 .../domain/admin/bootstrap5/commtrack_settings.html | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/commtrack_settings.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_settings.html diff --git a/corehq/apps/commtrack/views.py b/corehq/apps/commtrack/views.py index 8cd69e26d214..b1652032b397 100644 --- a/corehq/apps/commtrack/views.py +++ b/corehq/apps/commtrack/views.py @@ -56,7 +56,7 @@ def dispatch(self, request, *args, **kwargs): class CommTrackSettingsView(BaseCommTrackManageView): urlname = 'commtrack_settings' page_title = gettext_noop("Advanced Settings") - template_name = 'domain/admin/commtrack_settings.html' + template_name = 'domain/admin/bootstrap3/commtrack_settings.html' @property @memoized diff --git a/corehq/apps/domain/templates/domain/admin/commtrack_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/commtrack_settings.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/commtrack_settings.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/commtrack_settings.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_settings.html new file mode 100644 index 000000000000..c72f5e48a7fe --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_settings.html @@ -0,0 +1,10 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} +{% load crispy_forms_tags %} + +{% requirejs_main_b5 "domain/js/commtrack_settings" %} + +{% block page_content %} + {% crispy form %} {# todo B5: crispy #} +{% endblock %} From bf8b5b7bc3b13d37a47202f0c96a7c4baf0e5f05 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:33:34 +0000 Subject: [PATCH 019/159] "Bootstrap 5 Migration - initial auto-migration for domain/partials/payment_modal.html, splitting templates" --- .../templates/domain/billing_statements.html | 6 +- .../domain/current_subscription.html | 2 +- .../{ => bootstrap3}/payment_modal.html | 0 .../partials/bootstrap5/payment_modal.html | 117 ++++++++++++++++++ 4 files changed, 121 insertions(+), 4 deletions(-) rename corehq/apps/domain/templates/domain/partials/{ => bootstrap3}/payment_modal.html (100%) create mode 100644 corehq/apps/domain/templates/domain/partials/bootstrap5/payment_modal.html diff --git a/corehq/apps/domain/templates/domain/billing_statements.html b/corehq/apps/domain/templates/domain/billing_statements.html index d5b2cd1a0b66..72cd885d37d8 100644 --- a/corehq/apps/domain/templates/domain/billing_statements.html +++ b/corehq/apps/domain/templates/domain/billing_statements.html @@ -187,12 +187,12 @@

{% trans 'Billing Statements' %} {% block modals %}{{ block.super }} {% with process_invoice_payment_url as process_payment_url %} - {% include 'domain/partials/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} + {% include 'domain/partials/bootstrap3/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} {% endwith %} {% with process_bulk_payment_url as process_payment_url %} - {% include 'domain/partials/payment_modal.html' with payment_modal_id="bulkPaymentModal" title_template="bulk-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} + {% include 'domain/partials/bootstrap3/payment_modal.html' with payment_modal_id="bulkPaymentModal" title_template="bulk-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} {% endwith %} {% with process_wire_invoice_url as process_payment_url %} - {% include 'domain/partials/payment_modal.html' with payment_modal_id="bulkWirePaymentModal" title_template="bulk-wire-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_wire" %} + {% include 'domain/partials/bootstrap3/payment_modal.html' with payment_modal_id="bulkWirePaymentModal" title_template="bulk-wire-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_wire" %} {% endwith %} {% endblock %} diff --git a/corehq/apps/domain/templates/domain/current_subscription.html b/corehq/apps/domain/templates/domain/current_subscription.html index 0224f98bda02..376e27690b65 100644 --- a/corehq/apps/domain/templates/domain/current_subscription.html +++ b/corehq/apps/domain/templates/domain/current_subscription.html @@ -391,5 +391,5 @@

{% endblock %} {% block modals %}{{ block.super }} - {% include 'domain/partials/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment-complete-template" %} + {% include 'domain/partials/bootstrap3/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment-complete-template" %} {% endblock %} diff --git a/corehq/apps/domain/templates/domain/partials/payment_modal.html b/corehq/apps/domain/templates/domain/partials/bootstrap3/payment_modal.html similarity index 100% rename from corehq/apps/domain/templates/domain/partials/payment_modal.html rename to corehq/apps/domain/templates/domain/partials/bootstrap3/payment_modal.html diff --git a/corehq/apps/domain/templates/domain/partials/bootstrap5/payment_modal.html b/corehq/apps/domain/templates/domain/partials/bootstrap5/payment_modal.html new file mode 100644 index 000000000000..a7ddd9253764 --- /dev/null +++ b/corehq/apps/domain/templates/domain/partials/bootstrap5/payment_modal.html @@ -0,0 +1,117 @@ +{% load i18n %} + + From f69e288fea1e93ed54ad1bc71306edf47ade57e2 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:33:59 +0000 Subject: [PATCH 020/159] "Bootstrap 5 Migration - initial auto-migration for domain/update_billing_contact_info.html, splitting templates" --- .../update_billing_contact_info.html | 0 .../update_billing_contact_info.html | 21 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/update_billing_contact_info.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html diff --git a/corehq/apps/domain/templates/domain/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html similarity index 100% rename from corehq/apps/domain/templates/domain/update_billing_contact_info.html rename to corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html new file mode 100644 index 000000000000..0a225d2f9bf7 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html @@ -0,0 +1,21 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/update_billing_contact_info' %} + +{% block additional_initial_page_data %}{{ block.super }} + {% initial_page_data "stripe_public_key" stripe_public_key %} + {% initial_page_data "cards" cards %} + {% registerurl "cards_view" domain %} +{% endblock %} + +{% block page_content %} +
+ {% crispy billing_account_info_form %} {# todo B5: crispy #} +
+
{# todo B5: inline-style #} + {% include 'domain/stripe_cards.html' %} +
+{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 41937d31aa00..578f62c3b906 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -382,7 +382,7 @@ def page_context(self): class EditExistingBillingAccountView(DomainAccountingSettings, AsyncHandlerMixin): - template_name = 'domain/update_billing_contact_info.html' + template_name = 'domain/bootstrap3/update_billing_contact_info.html' urlname = 'domain_update_billing_info' page_title = gettext_lazy("Billing Information") async_handlers = [ From 58f017a1f0f5fe59152fdd01aa33676d8a79755a Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:35:07 +0000 Subject: [PATCH 021/159] "Bootstrap 5 Migration - initial auto-migration for domain/stripe_cards.html, splitting templates" --- .../bootstrap3/confirm_billing_info.html | 2 +- .../domain/{ => bootstrap3}/stripe_cards.html | 0 .../update_billing_contact_info.html | 2 +- .../bootstrap5/confirm_billing_info.html | 2 +- .../domain/bootstrap5/stripe_cards.html | 108 ++++++++++++++++++ .../update_billing_contact_info.html | 2 +- 6 files changed, 112 insertions(+), 4 deletions(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/stripe_cards.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/stripe_cards.html diff --git a/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html index c0d2a0339600..33f41c448ec5 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html @@ -26,7 +26,7 @@
- {% include 'domain/stripe_cards.html' %} + {% include 'domain/bootstrap3/stripe_cards.html' %}
{% endblock %} diff --git a/corehq/apps/domain/templates/domain/stripe_cards.html b/corehq/apps/domain/templates/domain/bootstrap3/stripe_cards.html similarity index 100% rename from corehq/apps/domain/templates/domain/stripe_cards.html rename to corehq/apps/domain/templates/domain/bootstrap3/stripe_cards.html diff --git a/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html index a3e44c626750..46dda5d2d669 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html @@ -16,6 +16,6 @@ {% crispy billing_account_info_form %}
- {% include 'domain/stripe_cards.html' %} + {% include 'domain/bootstrap3/stripe_cards.html' %}
{% endblock %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html index 753e2dce0786..641dc6260602 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html @@ -26,7 +26,7 @@
{# todo B5: css-panel #}
- {% include 'domain/stripe_cards.html' %} + {% include 'domain/bootstrap5/stripe_cards.html' %}
{% endblock %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/stripe_cards.html b/corehq/apps/domain/templates/domain/bootstrap5/stripe_cards.html new file mode 100644 index 000000000000..2689ae57f888 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/stripe_cards.html @@ -0,0 +1,108 @@ +{% load hq_shared_tags %} +{% load i18n %} + +
+ {% trans 'Saved Credit Cards' %} + + +
+ + + +
+ {% include 'accounting/partials/new_stripe_card_template.html' %} + +
+ + + + + + diff --git a/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html index 0a225d2f9bf7..17b0b76d97fd 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html @@ -16,6 +16,6 @@ {% crispy billing_account_info_form %} {# todo B5: crispy #}
{# todo B5: inline-style #} - {% include 'domain/stripe_cards.html' %} + {% include 'domain/bootstrap5/stripe_cards.html' %}
{% endblock %} From ce6bcbf15785581dd8e0e6e8550f5bcdf4ea4c84 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:35:30 +0000 Subject: [PATCH 022/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/transfer_domain_pending.html, splitting templates" --- .../transfer_domain_pending.html | 0 .../bootstrap5/transfer_domain_pending.html | 34 +++++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/transfer_domain_pending.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain_pending.html diff --git a/corehq/apps/domain/templates/domain/admin/transfer_domain_pending.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/transfer_domain_pending.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/transfer_domain_pending.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/transfer_domain_pending.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain_pending.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain_pending.html new file mode 100644 index 000000000000..f9b342e5d16d --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain_pending.html @@ -0,0 +1,34 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + + +{% block page_content %} +
+
+

+ {% blocktrans with username=transfer.to_username %} + You have a pending transfer with {{ username }} + {% endblocktrans %} +

+
+
+ +{% endblock %} + + diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index 1a50e7265898..73a320c4320b 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -340,7 +340,7 @@ def transfer_domain_form(self): def get(self, request, *args, **kwargs): if self.active_transfer: - self.template_name = 'domain/admin/transfer_domain_pending.html' + self.template_name = 'domain/admin/bootstrap3/transfer_domain_pending.html' if request.GET.get('resend', None): self.active_transfer.send_transfer_request() From a72acc4936a426c90041b0f74d981069ce75feeb Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:36:05 +0000 Subject: [PATCH 023/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/global_sms_rates.html, splitting templates" --- .../{ => bootstrap3}/global_sms_rates.html | 0 .../admin/bootstrap5/global_sms_rates.html | 95 +++++++++++++++++++ corehq/apps/domain/views/sms.py | 2 +- 3 files changed, 96 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/global_sms_rates.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html diff --git a/corehq/apps/domain/templates/domain/admin/global_sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/global_sms_rates.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/global_sms_rates.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html new file mode 100644 index 000000000000..a6a16ec4bd51 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/global_sms_rates.html @@ -0,0 +1,95 @@ +{% extends "hqwebapp/bootstrap5/two_column.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'smsbillables/js/smsbillables.rate_calc' %} + +{% block title %}{% trans "SMS Pricing" %}{% endblock %} + +{% block page_title %}{% trans "SMS Pricing" %}{% endblock page_title %} + +{% block page_breadcrumbs %} + +{% endblock %} + +{% block page_content %} +

+ {% blocktrans %} + View SMS prices for using Dimagi's connections in each country. + {% endblocktrans %} +

+

+ {% blocktrans %} + You can choose a connection for your project under Messaging -> SMS Connectivity + {% endblocktrans %} +

+
+
+ {% crispy rate_calc_form %} {# todo B5: crispy #} +
+ {% blocktrans %} + Calculating SMS Rate... + {% endblocktrans %} +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ {% trans "Connection" %} + + {% trans "Incoming" %} + + {% trans "Outgoing" %} +
+ + + + + +
+ {% trans "Your own Android Gateway" %} + + USD 0.01 + + USD 0.01 +
+
+
+ {% blocktrans %} + Pricing is per message sent or received. Fees are subject to change based on provider rates and exchange rates and are computed at the time the SMS is sent or received. + {% endblocktrans %} +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/sms.py b/corehq/apps/domain/views/sms.py index 23482d8878ac..5563c8c39616 100644 --- a/corehq/apps/domain/views/sms.py +++ b/corehq/apps/domain/views/sms.py @@ -20,7 +20,7 @@ class PublicSMSRatesView(BasePageView, AsyncHandlerMixin): urlname = 'public_sms_rates_view' page_title = gettext_lazy("SMS Rate Calculator") - template_name = 'domain/admin/global_sms_rates.html' + template_name = 'domain/admin/bootstrap3/global_sms_rates.html' async_handlers = [PublicSMSRatesAsyncHandler] def dispatch(self, request, *args, **kwargs): From 210ad401518a7675a7d0f2334a31194d56703134 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:37:00 +0000 Subject: [PATCH 024/159] "Bootstrap 5 Migration - initial auto-migration for domain/partials/license_explanations.html, splitting templates" --- .../license_explanations.html | 0 .../bootstrap5/license_explanations.html | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+) rename corehq/apps/domain/templates/domain/partials/{ => bootstrap3}/license_explanations.html (100%) create mode 100644 corehq/apps/domain/templates/domain/partials/bootstrap5/license_explanations.html diff --git a/corehq/apps/domain/templates/domain/partials/license_explanations.html b/corehq/apps/domain/templates/domain/partials/bootstrap3/license_explanations.html similarity index 100% rename from corehq/apps/domain/templates/domain/partials/license_explanations.html rename to corehq/apps/domain/templates/domain/partials/bootstrap3/license_explanations.html diff --git a/corehq/apps/domain/templates/domain/partials/bootstrap5/license_explanations.html b/corehq/apps/domain/templates/domain/partials/bootstrap5/license_explanations.html new file mode 100644 index 000000000000..08482c387fbe --- /dev/null +++ b/corehq/apps/domain/templates/domain/partials/bootstrap5/license_explanations.html @@ -0,0 +1,32 @@ +{% load i18n %} +More information about licenses... + +{% if extra %} +
{{ extra }}
{# todo B5: inline-style #} +{% endif %} From a4074b7aa7a5cc106d04f244622359fd2e2bdf6d Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:37:25 +0000 Subject: [PATCH 025/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/case_search.html, splitting templates" --- .../admin/{ => bootstrap3}/case_search.html | 0 .../domain/admin/bootstrap5/case_search.html | 155 ++++++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 156 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/case_search.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html diff --git a/corehq/apps/domain/templates/domain/admin/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/case_search.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html new file mode 100644 index 000000000000..a7088c4d74bd --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html @@ -0,0 +1,155 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/case_search_main' %} + +{% block page_content %} + {% include 'domain/admin/partials/case_search_templates.html' %} + {% initial_page_data 'case_types' case_types %} + {% initial_page_data 'values' values %} + {% registerurl 'case_search_config' request.domain %} +

{% trans "Enable Case Search" %}

+ +
+
+
+ {% csrf_token %} +
+

+ +

+ {% blocktrans %}Enabling case search for the project will allow mobile users to look up cases + that don't necessarily belong to them, and claim them. Possible applications range from cases + for patients who move from one location to another, and other lost-to-follow-up scenarios, to + any scenario involving searching for information, products, people or items.{% endblocktrans %} +

+

+ {% blocktrans %}WARNING: Enabling Case Search allows users to read the data of + other users' cases, and take ownership of them, from modules whose case lists are configured + for searching.{% endblocktrans %} +

+ +

+ {# todo B5: css-checkbox #} + +

+ + {% if request.user.is_superuser %} +
+ {% blocktrans %} + Visit Case Search to test out your configuration. + {% endblocktrans %} +
+ {% endif %} + +
+

{% trans "Fuzzy Search Properties" %}

+

+ {% blocktrans %} + Add a list of all fuzzy search properties by case type below. These are + properties that might be spelled inexactly by a user, e.g. "name". +

+ When working with related case properties, add them to the case type that + you will be searching on, not the related case type. For example, if fuzzy matching + on the parent's case name, add parent/name here as a property of + the child case type. + {% endblocktrans %} +

+ +
+ +
+ +
+

{% trans "Synchronous Web Apps Submissions" %}

+

+ {# todo B5: css-checkbox #} + +

+

+ {% blocktrans %} + This will slow down submissions but prevent case search data from going stale. + {% endblocktrans %} +

+
+ +
+

{% trans "Sync Cases On Form Entry" %}

+

+ {# todo B5: css-checkbox #} + +

+

+ {% blocktrans %} + This will slow down form entry, but will prevent stale case data from populating the form. + {% endblocktrans %} +

+
+ +
+

{% trans "Remove Special Characters" %}

+

+ {% blocktrans %} + Remove characters from incoming search queries for particular case properties. For example, you can remove '+' from phone numbers or '-' from ID queries. + {% endblocktrans %} +

+ + + + + + + + + + + + + + + +
+ Case Type + + Case Property + + String to remove +
+ + + + + + + +
+ +
+
+
+
+ +{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index 7f0565c18b76..de9edb6329fa 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -327,7 +327,7 @@ def post(self, request, *args, **kwargs): class CaseSearchConfigView(BaseAdminProjectSettingsView): urlname = 'case_search_config' page_title = gettext_lazy('Case Search') - template_name = 'domain/admin/case_search.html' + template_name = 'domain/admin/bootstrap3/case_search.html' @method_decorator(domain_admin_required) @method_decorator(toggles.SYNC_SEARCH_CASE_CLAIM.required_decorator()) From cc8761f736c382205ba1e036fb61a4fd0996ee3b Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:37:35 +0000 Subject: [PATCH 026/159] "Bootstrap 5 Migration - initial auto-migration for domain/data_migration_in_progress.html, splitting templates" --- corehq/apps/domain/middleware.py | 2 +- .../{ => bootstrap3}/data_migration_in_progress.html | 0 .../domain/bootstrap5/data_migration_in_progress.html | 9 +++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/data_migration_in_progress.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/data_migration_in_progress.html diff --git a/corehq/apps/domain/middleware.py b/corehq/apps/domain/middleware.py index e02a9af2e043..8b4b0eb90c05 100644 --- a/corehq/apps/domain/middleware.py +++ b/corehq/apps/domain/middleware.py @@ -73,7 +73,7 @@ def process_view(self, request, view_func, view_args, view_kwargs): if DATA_MIGRATION.enabled(request.domain): return TemplateResponse( request=request, - template='domain/data_migration_in_progress.html', + template='domain/bootstrap3/data_migration_in_progress.html', status=503, context={ 'domain': request.domain diff --git a/corehq/apps/domain/templates/domain/data_migration_in_progress.html b/corehq/apps/domain/templates/domain/bootstrap3/data_migration_in_progress.html similarity index 100% rename from corehq/apps/domain/templates/domain/data_migration_in_progress.html rename to corehq/apps/domain/templates/domain/bootstrap3/data_migration_in_progress.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/data_migration_in_progress.html b/corehq/apps/domain/templates/domain/bootstrap5/data_migration_in_progress.html new file mode 100644 index 000000000000..9051ec90f382 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/data_migration_in_progress.html @@ -0,0 +1,9 @@ +{% extends "hqwebapp/bootstrap5/base_page.html" %} +{% load i18n %} + +{% block page_content %} +

{% block title %}{% trans "Domain Temporarily Unavailable" %}{% endblock %}

+ +

{% blocktrans %}The page you requested is currently unavailable due to a + data migration. Please check back later.{% endblocktrans %}

+{% endblock %} From 55b591124fdf13982f5a48acc4314f44916c1bb5 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:38:08 +0000 Subject: [PATCH 027/159] "Bootstrap 5 Migration - initial auto-migration for domain/activate_transfer_domain.html, splitting templates" --- .../activate_transfer_domain.html | 0 .../bootstrap5/activate_transfer_domain.html | 42 +++++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/activate_transfer_domain.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/activate_transfer_domain.html diff --git a/corehq/apps/domain/templates/domain/activate_transfer_domain.html b/corehq/apps/domain/templates/domain/bootstrap3/activate_transfer_domain.html similarity index 100% rename from corehq/apps/domain/templates/domain/activate_transfer_domain.html rename to corehq/apps/domain/templates/domain/bootstrap3/activate_transfer_domain.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/activate_transfer_domain.html b/corehq/apps/domain/templates/domain/bootstrap5/activate_transfer_domain.html new file mode 100644 index 000000000000..08eddbc4bc5d --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/activate_transfer_domain.html @@ -0,0 +1,42 @@ +{% extends 'hqwebapp/bootstrap5/base_navigation.html' %} +{% load hq_shared_tags %} +{% load i18n %} + +{% block content %} +
+
+ +
+ {% if transfer %} +

+ {% blocktrans with domain=transfer.domain%} + By clicking "accept" below you acknowledge that you accept full ownership of this project space ("{{ domain }}"). + You agree to be bound by the terms of Dimagi's Terms of Service and Business Agreement. + By accepting this agreement, your are acknowledging you have permission and authority to accept these terms. A Dimagi representative will notify you when the transfer is complete. + {% endblocktrans %} +

+
+
+
{% csrf_token %} + +
+
+
+
{% csrf_token %} + +
+
+
+ {% else %} +

+ {% blocktrans %} + Sorry this transfer request has expired. + {% endblocktrans %} +

+ {% endif %} +
+
+
+{% endblock content %} diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index 73a320c4320b..3de34e55ecbf 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -377,7 +377,7 @@ def dispatch(self, request, *args, **kwargs): class ActivateTransferDomainView(BasePageView): urlname = 'activate_transfer_domain' page_title = 'Activate Domain Transfer' - template_name = 'domain/activate_transfer_domain.html' + template_name = 'domain/bootstrap3/activate_transfer_domain.html' @property @memoized From 8ebba6209542b11b25b0709b062c992ad8027f83 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:38:46 +0000 Subject: [PATCH 028/159] "Bootstrap 5 Migration - initial auto-migration for domain/confirm_plan.html, splitting templates" --- .../domain/{ => bootstrap3}/confirm_plan.html | 0 .../domain/bootstrap5/confirm_plan.html | 182 ++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 183 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/confirm_plan.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html diff --git a/corehq/apps/domain/templates/domain/confirm_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html similarity index 100% rename from corehq/apps/domain/templates/domain/confirm_plan.html rename to corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html new file mode 100644 index 000000000000..d7134be023b3 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html @@ -0,0 +1,182 @@ +{% extends "domain/base_change_plan.html" %} +{% load i18n %} +{% load hq_shared_tags %} +{% requirejs_main_b5 'accounting/js/confirm_plan' %} + +{% block form_content %} + {% initial_page_data 'is_upgrade' is_upgrade %} + {% initial_page_data 'is_same_edition' is_same_edition %} + {% initial_page_data 'is_paused' is_paused %} + {% initial_page_data 'next_invoice_date' next_invoice_date %} + {% initial_page_data 'current_plan' current_plan %} + {% initial_page_data 'new_plan_edition' new_plan_edition %} + {% initial_page_data 'is_downgrade_before_minimum' is_downgrade_before_minimum %} + {% initial_page_data 'current_subscription_end_date' current_subscription_end_date %} + {% initial_page_data 'start_date_after_minimum_subscription' start_date_after_minimum_subscription %} + {% registerurl 'email_on_downgrade' domain %} + {% registerurl 'confirm_billing_account_info' domain %} + +
+ {% if is_paused %} + {% include 'accounting/partials/confirm_pause_summary.html' %} + {% else %} + {% include 'accounting/partials/confirm_plan_summary.html' %} + {% endif %} + +
+ {% csrf_token %} + + + + + + + {% if not is_paused %} +
+

+ {% blocktrans %} + Clicking the 'Confirm Plan' button below will bring you to a page where you can confirm your billing information. + {% endblocktrans %} +

+ {% endif %} +
+ + {% if is_paused %} + {% trans 'Select different option' %} + {% else %} + {% trans 'Select different plan' %} + {% endif %} + + +
+
+ +
+{% endblock %} + +{% block modals %}{{ block.super }} + +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 578f62c3b906..aa2fde405f5d 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1205,7 +1205,7 @@ def back_button(self): class ConfirmSelectedPlanView(PlanViewBase): - template_name = 'domain/confirm_plan.html' + template_name = 'domain/bootstrap3/confirm_plan.html' urlname = 'confirm_selected_plan' @property From c120b7bb48f16d1109578b8159306f66cc09ce15 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:38:56 +0000 Subject: [PATCH 029/159] "Bootstrap 5 Migration - initial auto-migration for domain/pro_bono/page_content.html, splitting templates" --- .../{ => bootstrap3}/page_content.html | 0 .../pro_bono/bootstrap5/page_content.html | 21 +++++++++++++++++++ .../templates/domain/pro_bono/domain.html | 2 +- .../templates/domain/pro_bono/static.html | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) rename corehq/apps/domain/templates/domain/pro_bono/{ => bootstrap3}/page_content.html (100%) create mode 100644 corehq/apps/domain/templates/domain/pro_bono/bootstrap5/page_content.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/page_content.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap3/page_content.html similarity index 100% rename from corehq/apps/domain/templates/domain/pro_bono/page_content.html rename to corehq/apps/domain/templates/domain/pro_bono/bootstrap3/page_content.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/page_content.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/page_content.html new file mode 100644 index 000000000000..3ee2b8f0b5f1 --- /dev/null +++ b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/page_content.html @@ -0,0 +1,21 @@ +{% load crispy_forms_tags %} +{% load hq_shared_tags %} +{% load i18n %} + +{% block page_content %} + {% if is_submitted %} +

{% trans "Thank you for your submission. A representative will be in contact with you shortly." %}

+

Contact email(s): {{ pro_bono_form.contact_email.value }}

+

Organization: {{ pro_bono_form.organization.value }}

+

Project Space: {% if domain %}{{ domain }}{% else %}{{ pro_bono_form.domain.value }}{% endif %}

+

Project overview: {{ pro_bono_form.project_overview.value }}

+

Estimated annual expenditures on airtime: {{ pro_bono_form.airtime_expense.value }}

+

Estimated annual expenditures on devices: {{ pro_bono_form.device_expense.value }}

+

Pay only features needed: {{ pro_bono_form.pay_only_features_needed.value }}

+

Duration of project: {{ pro_bono_form.duration_of_project.value }}

+

Number of expected users: {{ pro_bono_form.num_expected_users.value }}

+

Dimagi contact: {{ pro_bono_form.dimagi_contact.value }}

+ {% else %} + {% crispy pro_bono_form %} {# todo B5: crispy #} + {% endif %} +{% endblock %} diff --git a/corehq/apps/domain/templates/domain/pro_bono/domain.html b/corehq/apps/domain/templates/domain/pro_bono/domain.html index 8977b75a3d6c..1207b6d20c82 100644 --- a/corehq/apps/domain/templates/domain/pro_bono/domain.html +++ b/corehq/apps/domain/templates/domain/pro_bono/domain.html @@ -4,5 +4,5 @@ {% requirejs_main 'domain/js/pro-bono' %} {% block page_content %} - {% include 'domain/pro_bono/page_content.html' %} + {% include 'domain/pro_bono/bootstrap3/page_content.html' %} {% endblock %} diff --git a/corehq/apps/domain/templates/domain/pro_bono/static.html b/corehq/apps/domain/templates/domain/pro_bono/static.html index 4afbc24c303c..da68a3107139 100644 --- a/corehq/apps/domain/templates/domain/pro_bono/static.html +++ b/corehq/apps/domain/templates/domain/pro_bono/static.html @@ -4,5 +4,5 @@ {% requirejs_main 'domain/js/pro-bono' %} {% block page_content %} - {% include 'domain/pro_bono/page_content.html' %} + {% include 'domain/pro_bono/bootstrap3/page_content.html' %} {% endblock %} From 2300a0bcc5c22835823ce6a80a60cbe761cbf953 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:39:12 +0000 Subject: [PATCH 030/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/flags_and_privileges.html, splitting templates" --- .../flags_and_privileges.html | 0 .../bootstrap5/flags_and_privileges.html | 145 ++++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 146 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/flags_and_privileges.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html diff --git a/corehq/apps/domain/templates/domain/admin/flags_and_privileges.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/flags_and_privileges.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html new file mode 100644 index 000000000000..16abbae24638 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html @@ -0,0 +1,145 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% js_entry_b3 'domain/js/toggles' %} + +{% block page_content %} + + {% initial_page_data 'domain' domain %} + {% initial_page_data 'toggles' toggles %} + {% registerurl 'set_toggle' '---' %} + {% registerurl 'edit_toggle' '---' %} + +
+
+

+ Features can be enabled or disabled based on feature flags or privileges. This page + is intended to provide a list of what features a domain has access to. +

+
+
+ +
+
+

Privileges

+

+ {% url "domain_subscription_view" domain as software_plan_url %} + Access to some features is dependent on a the software plan to which the domain + is subscribed. + Current Subscription +

+
+
+ + + + + + + {% for privilege_name, enabled_for_domain in privileges %} + + + + + {% endfor %} + +
PrivilegeEnabled for domain?
{{ privilege_name }} + {% if enabled_for_domain %} + + {% else %} + + {% endif %} +
+
+
+ +
+
+

Feature Flags

+

+ {% url 'toggle_list' as toggle_url %} + Feature Flags turn on features for individual users or projects. They are editable only by + super users, in the Feature Flag edit UI. + In addition, some feature flags are randomly enabled by domain. +

+

+ Following are all flags enabled for this domain and/or for you. + This does not include any flags set for other users in this domain. +

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
TagFeatureEnabled for me?Enabled for domain?
+ + + + +
+ + + +
+ +
+
+

+ + Documentation + + +
+ + + + +
+ +
+
+
+ + +
+ +
+
---
+
+
+
+{% endblock %} diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index 3de34e55ecbf..8b7c97e30086 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -243,7 +243,7 @@ def page_context(self): class FlagsAndPrivilegesView(BaseAdminProjectSettingsView): urlname = 'feature_flags_and_privileges' page_title = gettext_lazy("Feature Flags and Privileges") - template_name = 'domain/admin/flags_and_privileges.html' + template_name = 'domain/admin/bootstrap3/flags_and_privileges.html' def _get_toggles(self): From 94b77174ef4e240d81ac2e18561146bd3d3d53f1 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:39:44 +0000 Subject: [PATCH 031/159] "Bootstrap 5 Migration - initial auto-migration for domain/insufficient_privilege_notification.html, splitting templates" --- .../insufficient_privilege_notification.html | 0 .../insufficient_privilege_notification.html | 32 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/insufficient_privilege_notification.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/insufficient_privilege_notification.html diff --git a/corehq/apps/domain/templates/domain/insufficient_privilege_notification.html b/corehq/apps/domain/templates/domain/bootstrap3/insufficient_privilege_notification.html similarity index 100% rename from corehq/apps/domain/templates/domain/insufficient_privilege_notification.html rename to corehq/apps/domain/templates/domain/bootstrap3/insufficient_privilege_notification.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/insufficient_privilege_notification.html b/corehq/apps/domain/templates/domain/bootstrap5/insufficient_privilege_notification.html new file mode 100644 index 000000000000..e719d619f002 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/insufficient_privilege_notification.html @@ -0,0 +1,32 @@ +{% extends 'hqwebapp/bootstrap5/base_page.html' %} +{% load i18n %} + +{% block page_content %} + {% if is_paused %} + {% include 'hqwebapp/partials/bootstrap5/paused_plan_notice.html' %} + {% else %} +

+ {% blocktrans %} + {{ feature_name }} is only available to projects + subscribed to {{ plan_name }} plan or higher. + To access this feature, you must subscribe to the + {{ plan_name }} plan. + {% endblocktrans %} +

+ {% if not is_domain_admin %} +
+ + {% blocktrans %} + You must be a Project Administrator to make Subscription changes. + {% endblocktrans %} +
+ {% endif %} +
+ {% trans 'Read more about our plans' %} + {% if is_domain_admin %} + {% trans 'Change My Plan' %} + {% endif %} +
+ {% endif %} +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index aa2fde405f5d..d553e3b7587f 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -126,7 +126,7 @@ class SubscriptionUpgradeRequiredView(LoginAndDomainMixin, BasePageView, DomainViewMixin): page_title = gettext_lazy("Upgrade Required") - template_name = "domain/insufficient_privilege_notification.html" + template_name = "domain/bootstrap3/insufficient_privilege_notification.html" @property def page_url(self): From 6e7d2b3ee1382885577e47a0b27f57f8532b6045 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:40:03 +0000 Subject: [PATCH 032/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/transfer_domain.html, splitting templates" --- .../admin/{ => bootstrap3}/transfer_domain.html | 0 .../admin/bootstrap5/transfer_domain.html | 17 +++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/transfer_domain.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain.html diff --git a/corehq/apps/domain/templates/domain/admin/transfer_domain.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/transfer_domain.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/transfer_domain.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/transfer_domain.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain.html new file mode 100644 index 000000000000..fc81be4601dc --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/transfer_domain.html @@ -0,0 +1,17 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + + +{% block page_content %} + + {% crispy form %} {# todo B5: crispy #} +{% endblock %} + diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index 8b7c97e30086..b87443b342b2 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -322,7 +322,7 @@ def _get_rate_limits(scope, rate_limiter): class TransferDomainView(BaseAdminProjectSettingsView): urlname = 'transfer_domain_view' page_title = gettext_lazy("Transfer Project") - template_name = 'domain/admin/transfer_domain.html' + template_name = 'domain/admin/bootstrap3/transfer_domain.html' @property @memoized From 80edf8becf3450ce4bd5ea5ca25c9766ce8f99d4 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:41:05 +0000 Subject: [PATCH 033/159] "Bootstrap 5 Migration - initial auto-migration for domain/pro_bono/domain.html, splitting templates" --- .../domain/pro_bono/{ => bootstrap3}/domain.html | 0 .../templates/domain/pro_bono/bootstrap5/domain.html | 8 ++++++++ corehq/apps/domain/views/pro_bono.py | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/pro_bono/{ => bootstrap3}/domain.html (100%) create mode 100644 corehq/apps/domain/templates/domain/pro_bono/bootstrap5/domain.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/domain.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap3/domain.html similarity index 100% rename from corehq/apps/domain/templates/domain/pro_bono/domain.html rename to corehq/apps/domain/templates/domain/pro_bono/bootstrap3/domain.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/domain.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/domain.html new file mode 100644 index 000000000000..e5734285e89f --- /dev/null +++ b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/domain.html @@ -0,0 +1,8 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} + +{% requirejs_main_b5 'domain/js/pro-bono' %} + +{% block page_content %} + {% include 'domain/pro_bono/bootstrap5/page_content.html' %} +{% endblock %} diff --git a/corehq/apps/domain/views/pro_bono.py b/corehq/apps/domain/views/pro_bono.py index 7d2346f5a465..d00c8d03139b 100644 --- a/corehq/apps/domain/views/pro_bono.py +++ b/corehq/apps/domain/views/pro_bono.py @@ -57,7 +57,7 @@ def requesting_domain(self): class ProBonoView(ProBonoMixin, DomainAccountingSettings): - template_name = 'domain/pro_bono/domain.html' + template_name = 'domain/pro_bono/bootstrap3/domain.html' urlname = 'pro_bono' use_domain_field = False From ecc598da7951cff2b8fd8d1489dae2d4adf69e15 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:41:50 +0000 Subject: [PATCH 034/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/project_limits.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/project_limits.html | 0 .../domain/admin/bootstrap5/project_limits.html | 10 ++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/project_limits.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html diff --git a/corehq/apps/domain/templates/domain/admin/project_limits.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/project_limits.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html new file mode 100644 index 000000000000..f675e86c2d54 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html @@ -0,0 +1,10 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} + +{% block page_content %} + + {% initial_page_data 'domain' domain %} + + {% include "domain/admin/partials/project_limits_table.html" %} + +{% endblock %} diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index b87443b342b2..4683db4c5365 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -289,7 +289,7 @@ def page_context(self): class ProjectLimitsView(BaseAdminProjectSettingsView): urlname = 'internal_project_limits_summary' page_title = gettext_lazy("Project Limits") - template_name = 'domain/admin/project_limits.html' + template_name = 'domain/admin/bootstrap3/project_limits.html' @property def page_context(self): From 1e9403f6cf90f6105ea397e397b8c21007d84e3d Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:42:32 +0000 Subject: [PATCH 035/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/manage_alerts.html, splitting templates" --- .../admin/{ => bootstrap3}/manage_alerts.html | 0 .../admin/bootstrap5/manage_alerts.html | 104 ++++++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 105 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/manage_alerts.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/manage_alerts.html diff --git a/corehq/apps/domain/templates/domain/admin/manage_alerts.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/manage_alerts.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/manage_alerts.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/manage_alerts.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/manage_alerts.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/manage_alerts.html new file mode 100644 index 000000000000..b7428d991fcb --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/manage_alerts.html @@ -0,0 +1,104 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 "domain/js/manage_alerts" %} + +{% block page_content %} + {% initial_page_data 'alerts' alerts %} + {% registerurl 'domain_edit_alert' domain '---' %} + +
+
+ {% trans 'Add New Alert' %} + {% crispy form %} {# todo B5: crispy #} +
+
+
+

+ {% trans "Available Alerts" %} +

+

+ {% trans "You can only have 3 alerts activated at any one time" %} +

+ + + + + + + + + + + {% if alerts %} + + + + + + + + + + {% else %} + + + + + + {% endif %} +
+ {% trans "Start Time" %} + + {% trans "End Time" %} + + {% trans "Message" %} + + {% trans "Added By" %} + + {% trans "Actions" %} +
+
+
+ +
{# todo B5: inline-style #} + {% csrf_token %} + + + +
+ {# todo B5: inline-style #} + + {% trans "Edit" %} + +
{# todo B5: inline-style #} + {% csrf_token %} + + +
+
{% trans "No alerts added yet for the project." %}
+
+{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index de9edb6329fa..227de2eb6a02 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -548,7 +548,7 @@ def _convert_server_time_to_user_time(timestamp, timezone): class ManageDomainAlertsView(BaseDomainAlertsView): - template_name = 'domain/admin/manage_alerts.html' + template_name = 'domain/admin/bootstrap3/manage_alerts.html' urlname = 'domain_manage_alerts' page_title = gettext_lazy("Manage Project Alerts") From 555978242bfe1ec5d3f5e3d6f53688b9017752b9 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:46:35 +0000 Subject: [PATCH 036/159] "Bootstrap 5 Migration - initial auto-migration for domain/current_subscription.html, splitting templates" --- .../current_subscription.html | 0 .../bootstrap5/current_subscription.html | 395 ++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 396 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/current_subscription.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/current_subscription.html diff --git a/corehq/apps/domain/templates/domain/current_subscription.html b/corehq/apps/domain/templates/domain/bootstrap3/current_subscription.html similarity index 100% rename from corehq/apps/domain/templates/domain/current_subscription.html rename to corehq/apps/domain/templates/domain/bootstrap3/current_subscription.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/current_subscription.html b/corehq/apps/domain/templates/domain/bootstrap5/current_subscription.html new file mode 100644 index 000000000000..ca87ebfdecbb --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/current_subscription.html @@ -0,0 +1,395 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/current_subscription' %} + +{% block page_content %} + {% initial_page_data "stripe_public_key" stripe_public_key %} + {% initial_page_data "payment_error_messages" payment_error_messages %} + {% initial_page_data "wire_email" user_email %} + {% initial_page_data "plan" plan %} + {% initial_page_data "can_purchase_credits" can_purchase_credits %} + {% initial_page_data "can_change_subscription" can_change_subscription %} + {% registerurl "domain_credits_payment" domain %} + {% registerurl "domain_wire_payment" domain %} + +
+
+
+ {% trans 'Current Subscription' %} +
{# todo B5: css-form-group #} + +
+
+

+ {% if plan.is_paused %} + {% blocktrans %} + Your Subscription is Paused + {% endblocktrans %} + {% elif plan.is_trial %} + {{ plan.trial_length }}{% trans ' Day Trial' %} + {% else %} + {{ plan.name }} + {% endif %} +

+

+ {% if plan.is_paused %} + {% blocktrans with date_paused=plan.date_start pe=plan.previous_subscription_edition %} + Your {{ pe }} Edition subscription was paused on {{ date_paused }}. Please subscribe to a plan to gain access to your project again. + {% endblocktrans %} + {% elif plan.is_trial %} + {% blocktrans with pn=plan.name trial_length=plan.trial_length %} + The {{ trial_length }} Day Trial includes all the features present in the + {{ pn }} Software Plan, which is our full set of features. + {% endblocktrans %} + {% else %}{{ plan.description }}{% endif %}

+
+ {% if plan.do_not_invoice and not plan.is_paused %} +
+ {% blocktrans %} + Note: This subscription will not be invoiced. + {% endblocktrans %} +
+ {% endif %} + {% if can_change_subscription %} + {% if plan.is_annual_plan %} +
+
{# todo B5: inline-style #} + + +
+
+ {% else %} +

+ {# todo B5: inline-style #} + {% if plan.is_paused %} + {% trans "Subscribe to Plan" %} + {% else %} + {% trans "Change Plan" %} + {% endif %} + +

+ {% endif %} + {% if plan.next_subscription.exists and plan.next_subscription.is_paused %} +
+ + {% blocktrans with plan.next_subscription.date_start as next_date %} + This subscription will be paused on {{ next_date }}. + {% endblocktrans %} +
+ {% endif %} + {% endif %} + + {% if plan.is_trial %} +
+ + {% blocktrans with plan.date_end as date_end %} + Your trial expires on {{ date_end }}. + {% endblocktrans %} +
+ {% endif %} +
+
+ {% if not plan.is_trial and not plan.is_paused %} + {% if plan.date_start %} +
{# todo B5: css-form-group #} + +
+

{{ plan.date_start }}

+
+
+ {% endif %} + {% if plan.date_end %} +
{# todo B5: css-form-group #} + +
+

{{ plan.date_end }}

+ {% if plan.next_subscription.can_renew %} + + {% trans "Renew Plan" %} + + {% endif %} +
+
+ {% endif %} +
+
{# todo B5: css-form-group #} + +
+

+
+
+
+ {% endif %} + {% if plan.next_subscription.exists and not plan.next_subscription.is_paused %} +
{# todo B5: css-form-group #} + +
+

+ {{ plan.next_subscription.date_start }} +

+
+
+
{# todo B5: css-form-group #} + +
+

+ {{ plan.next_subscription.name }} +

+
+
+
{# todo B5: css-form-group #} + +
+

+ {{ plan.next_subscription.price }} +

+
+
+ {% endif %} + {% if plan.has_account_level_credit %} + {% trans 'Subscription Credit' %} + {% endif %} +
+ {% if plan.has_credits_in_non_general_credit_line %} +
+
{# todo B5: css-form-group #} + +
+

+
+
+
+ {% endif %} + {% if plan.general_credit and plan.general_credit.is_visible or not plan.has_credits_in_non_general_credit_line %} +
{# todo B5: css-form-group #} + +
+

{{ plan.general_credit.amount }}

+
+
+ {% endif %} +
+
{# todo B5: css-form-group #} +
+ {% if can_purchase_credits %} + + + {% else %} + + + {% trans "Not Billing Admin, Can't Add Credit" %} + + {% endif %} +
+
+
+
+ {% if plan.has_account_level_credit %} + {% trans 'Account Credit' %} +
+
+
{# todo B5: css-form-group #} + +
+

+
+
+
+ {% if plan.account_general_credit and plan.account_general_credit.is_visible %} +
{# todo B5: css-form-group #} + +
+

{{ plan.account_general_credit.amount }}

+
+
+ {% endif %} +
+ {% endif %} + {% if not plan.is_paused %} + {% trans 'Usage Summary' %} + {% if plan.has_credits_in_non_general_credit_line %} + + + + + + + + {% if show_account_credits %} + + {% endif %} + + + + + + + + + {% if show_account_credits %} + + {% endif %} + + +
{% trans "Feature" %}{% trans "Current Use" %}{% trans "Remaining" %}{% trans "Credits Available" %}{% trans "Account Credits Available" %}
+ {% else %} + + + + + + + {% if show_account_credits %} + + {% endif %} + + + + + + + + {% if show_account_credits %} + + {% endif %} + + +
{% trans "Feature" %}{% trans "Included in Software Plan" %}{% trans "Current Usage" %}{% trans "Account Credits Available" %}
+ {% endif %} + {% endif %} +
+
+
+ + {% include 'accounting/partials/stripe_card_ko_template.html' %} + + + + + + + +{% endblock %} + +{% block modals %}{{ block.super }} + {% include 'domain/partials/bootstrap5/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment-complete-template" %} +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index d553e3b7587f..201c1678a10c 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -202,7 +202,7 @@ def main_context(self): class DomainSubscriptionView(DomainAccountingSettings): urlname = 'domain_subscription_view' - template_name = 'domain/current_subscription.html' + template_name = 'domain/bootstrap3/current_subscription.html' page_title = gettext_lazy("Current Subscription") @property From 65ea295d6e2f425a897200107e4304c698b819b8 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:46:47 +0000 Subject: [PATCH 037/159] "Bootstrap 5 Migration - initial auto-migration for domain/internal_subscription_management.html, splitting templates" --- .../internal_subscription_management.html | 0 .../internal_subscription_management.html | 37 +++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/internal_subscription_management.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html diff --git a/corehq/apps/domain/templates/domain/internal_subscription_management.html b/corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html similarity index 100% rename from corehq/apps/domain/templates/domain/internal_subscription_management.html rename to corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html b/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html new file mode 100644 index 000000000000..c1d457031c38 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html @@ -0,0 +1,37 @@ +{% extends 'hqwebapp/bootstrap5/base_section.html' %} +{% load i18n %} +{% load crispy_forms_tags %} +{% load hq_shared_tags %} + +{% requirejs_main_b5 'domain/js/internal_subscription_management' %} + +{% block page_content %} + {% blocktrans %} +

+ This page is visible to Dimagi employees only (you have an @dimagi.com email address). You can use this page + to set up a subscription for this project space. + + Use this tool only for projects that are: +

    +
  • an internal test project
  • +
  • part of a contracted project
  • +
  • a short term extended trial for biz dev
  • +
+

+ +

+ Your project is currently subscribed to {{ plan_name }}. +

+ {% endblocktrans %} + +
+ {% crispy select_subscription_type_form %} {# todo B5: crispy #} + + {% for form in subscription_management_forms %} +
+ {% crispy form %} {# todo B5: crispy #} +
+ {% endfor %} +
+ +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 201c1678a10c..87fbd9506ae2 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -866,7 +866,7 @@ def get(self, request, *args, **kwargs): class InternalSubscriptionManagementView(BaseAdminProjectSettingsView): - template_name = 'domain/internal_subscription_management.html' + template_name = 'domain/bootstrap3/internal_subscription_management.html' urlname = 'internal_subscription_mgmt' page_title = gettext_lazy("Dimagi Internal Subscription Management") form_classes = INTERNAL_SUBSCRIPTION_MANAGEMENT_FORMS From abfe58cca3db5e2c35d8a2cc2c6ce7e71d1ce935 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:47:37 +0000 Subject: [PATCH 038/159] "Bootstrap 5 Migration - initial auto-migration for domain/partials/restrictive_license.html, splitting templates" --- .../bootstrap5/restrictive_license.html | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 corehq/apps/domain/templates/domain/partials/bootstrap5/restrictive_license.html diff --git a/corehq/apps/domain/templates/domain/partials/bootstrap5/restrictive_license.html b/corehq/apps/domain/templates/domain/partials/bootstrap5/restrictive_license.html new file mode 100644 index 000000000000..17a1101b1970 --- /dev/null +++ b/corehq/apps/domain/templates/domain/partials/bootstrap5/restrictive_license.html @@ -0,0 +1,37 @@ +{% load i18n %} +{% blocktrans %} + This license doesn't cover all your multimedia. +{% endblocktrans %} +{% trans 'More info...' %} + From 3aa3e3b01a0dc83ded47dcb980d0f0a15cd03274 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:47:49 +0000 Subject: [PATCH 039/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/partials/project_limits_table.html, splitting templates" --- .../admin/bootstrap3/project_limits.html | 2 +- .../admin/bootstrap5/project_limits.html | 2 +- .../project_limits_table.html | 0 .../bootstrap5/project_limits_table.html | 38 +++++++++++++++++++ .../templates/hqadmin/global_thresholds.html | 2 +- 5 files changed, 41 insertions(+), 3 deletions(-) rename corehq/apps/domain/templates/domain/admin/partials/{ => bootstrap3}/project_limits_table.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html index ba5f3a0ff58f..c41d0d1377a8 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/project_limits.html @@ -5,6 +5,6 @@ {% initial_page_data 'domain' domain %} - {% include "domain/admin/partials/project_limits_table.html" %} + {% include "domain/admin/partials/bootstrap3/project_limits_table.html" %} {% endblock %} diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html index f675e86c2d54..cc4b23fb7ea6 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/project_limits.html @@ -5,6 +5,6 @@ {% initial_page_data 'domain' domain %} - {% include "domain/admin/partials/project_limits_table.html" %} + {% include "domain/admin/partials/bootstrap5/project_limits_table.html" %} {% endblock %} diff --git a/corehq/apps/domain/templates/domain/admin/partials/project_limits_table.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap3/project_limits_table.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/partials/project_limits_table.html rename to corehq/apps/domain/templates/domain/admin/partials/bootstrap3/project_limits_table.html diff --git a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html new file mode 100644 index 000000000000..6cb3dcc1263e --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/project_limits_table.html @@ -0,0 +1,38 @@ +{% comment %} +This page is for internal admin use only, and thus is not marked up for translation. +If this page is ever converted to a user-facing UI +or otherwise intended for a non-English-only audience, it should be translated. +{% endcomment %} + +
+
+ {% for header, rate_infos in project_limits %} +

{{ header }}

+ + + + + + + + + + + {% for rate_info in rate_infos %} + + + + + + + {% endfor %} + +
Window Size% UsageUsageLimit
{{ rate_info.key }} + {{ rate_info.percent_usage }}% +
{# todo B5: css-progress #} +
{# todo B5: inline-style #} +
+
{{ rate_info.current_usage }}{{ rate_info.limit }}
+ {% endfor %} +
+
diff --git a/corehq/apps/hqadmin/templates/hqadmin/global_thresholds.html b/corehq/apps/hqadmin/templates/hqadmin/global_thresholds.html index 7ff8ad978204..610e22b16a2d 100644 --- a/corehq/apps/hqadmin/templates/hqadmin/global_thresholds.html +++ b/corehq/apps/hqadmin/templates/hqadmin/global_thresholds.html @@ -3,6 +3,6 @@ {% block reportcontent %} - {% include "domain/admin/partials/project_limits_table.html" %} + {% include "domain/admin/partials/bootstrap3/project_limits_table.html" %} {% endblock %} From ff96a52264e49e344bd2d4a8be5727697552b1fb Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:51:21 +0000 Subject: [PATCH 040/159] "Bootstrap 5 Migration - initial auto-migration for domain/base_change_plan.html, splitting templates" --- .../{ => bootstrap3}/base_change_plan.html | 0 .../bootstrap3/confirm_billing_info.html | 2 +- .../domain/bootstrap3/confirm_plan.html | 2 +- .../confirm_subscription_renewal.html | 2 +- .../domain/bootstrap3/renew_plan.html | 2 +- .../domain/bootstrap5/base_change_plan.html | 30 +++++++++++++++++++ .../bootstrap5/confirm_billing_info.html | 2 +- .../domain/bootstrap5/confirm_plan.html | 2 +- .../confirm_subscription_renewal.html | 2 +- .../domain/bootstrap5/renew_plan.html | 2 +- .../domain/templates/domain/select_plan.html | 2 +- .../domain/selected_plan_contact.html | 2 +- 12 files changed, 40 insertions(+), 10 deletions(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/base_change_plan.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/base_change_plan.html diff --git a/corehq/apps/domain/templates/domain/base_change_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/base_change_plan.html similarity index 100% rename from corehq/apps/domain/templates/domain/base_change_plan.html rename to corehq/apps/domain/templates/domain/bootstrap3/base_change_plan.html diff --git a/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html index 33f41c448ec5..a757e5041f99 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/confirm_billing_info.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load crispy_forms_tags %} {% load hq_shared_tags %} {% load i18n %} diff --git a/corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html index 9d85be9b2b5e..42803337aece 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/confirm_plan.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load i18n %} {% load hq_shared_tags %} {% requirejs_main 'accounting/js/confirm_plan' %} diff --git a/corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html b/corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html index dd8a3371aab4..fb1641b34d7c 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/confirm_subscription_renewal.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load crispy_forms_tags %} {% load hq_shared_tags %} {% load i18n %} diff --git a/corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html index 9b48a1ebaaa0..e5e3c46b8a6c 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/renew_plan.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load hq_shared_tags %} {% load i18n %} {% load compress %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/base_change_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/base_change_plan.html new file mode 100644 index 000000000000..e496f42ac9f7 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/base_change_plan.html @@ -0,0 +1,30 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load i18n %} +{% load hq_shared_tags %} +{% load compress %} + +{% block stylesheets %}{{ block.super }} + {% compress css %} + + {% endcompress %} +{% endblock %} + +{% block page_content %} + {% block plan_breadcrumbs %} + + {% endblock %} +
+

{{ step_title }}

+
+ {% block form_content %} + {% endblock %} +{% endblock %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html index 641dc6260602..12b1bdef12f0 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_billing_info.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap5/base_change_plan.html" %} {% load crispy_forms_tags %} {% load hq_shared_tags %} {% load i18n %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html index d7134be023b3..16699c59d563 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_plan.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap5/base_change_plan.html" %} {% load i18n %} {% load hq_shared_tags %} {% requirejs_main_b5 'accounting/js/confirm_plan' %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html b/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html index 9166ac561f98..58d9b04f14f2 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/confirm_subscription_renewal.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap5/base_change_plan.html" %} {% load crispy_forms_tags %} {% load hq_shared_tags %} {% load i18n %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html index 6912137c82dd..b00b78e6366c 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/renew_plan.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap5/base_change_plan.html" %} {% load hq_shared_tags %} {% load i18n %} {% load compress %} diff --git a/corehq/apps/domain/templates/domain/select_plan.html b/corehq/apps/domain/templates/domain/select_plan.html index c2ce7b4827ee..747694058e72 100644 --- a/corehq/apps/domain/templates/domain/select_plan.html +++ b/corehq/apps/domain/templates/domain/select_plan.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load hq_shared_tags %} {% load i18n %} {% load menu_tags %} diff --git a/corehq/apps/domain/templates/domain/selected_plan_contact.html b/corehq/apps/domain/templates/domain/selected_plan_contact.html index 7ffb5a9c5f0a..a9f83b213613 100644 --- a/corehq/apps/domain/templates/domain/selected_plan_contact.html +++ b/corehq/apps/domain/templates/domain/selected_plan_contact.html @@ -1,4 +1,4 @@ -{% extends "domain/base_change_plan.html" %} +{% extends "domain/bootstrap3/base_change_plan.html" %} {% load crispy_forms_tags %} {% load i18n %} From dff58753b1d240f0f24d5285da721e4fd9c8e198 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:53:18 +0000 Subject: [PATCH 041/159] "Bootstrap 5 Migration - initial auto-migration for domain/selected_plan_contact.html, splitting templates" --- .../{ => bootstrap3}/selected_plan_contact.html | 0 .../domain/bootstrap5/selected_plan_contact.html | 15 +++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/selected_plan_contact.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/selected_plan_contact.html diff --git a/corehq/apps/domain/templates/domain/selected_plan_contact.html b/corehq/apps/domain/templates/domain/bootstrap3/selected_plan_contact.html similarity index 100% rename from corehq/apps/domain/templates/domain/selected_plan_contact.html rename to corehq/apps/domain/templates/domain/bootstrap3/selected_plan_contact.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/selected_plan_contact.html b/corehq/apps/domain/templates/domain/bootstrap5/selected_plan_contact.html new file mode 100644 index 000000000000..4d33af0560da --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/selected_plan_contact.html @@ -0,0 +1,15 @@ +{% extends "domain/bootstrap5/base_change_plan.html" %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% block form_content %} +

+ {{ lead_text }} +

+ +
{# todo B5: css-panel #} +
+ {% crispy contact_form %} {# todo B5: crispy #} +
+
+{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 87fbd9506ae2..2c1483408ed9 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1107,7 +1107,7 @@ def can_change_subscription(self): class ContactFormViewBase(PlanViewBase): - template_name = 'domain/selected_plan_contact.html' + template_name = 'domain/bootstrap3/selected_plan_contact.html' step_title = gettext_lazy("Contact Dimagi") lead_text = gettext_lazy("Please submit the following form and a member of our sales team will be " "in touch shortly about your plan.") From 2f64ad85d59072414b946f45e4abec86b5de3b50 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:53:30 +0000 Subject: [PATCH 042/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/feature_previews.html, splitting templates" --- .../{ => bootstrap3}/feature_previews.html | 0 .../admin/bootstrap5/feature_previews.html | 140 ++++++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 141 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/feature_previews.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/feature_previews.html diff --git a/corehq/apps/domain/templates/domain/admin/feature_previews.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/feature_previews.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/feature_previews.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/feature_previews.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/feature_previews.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/feature_previews.html new file mode 100644 index 000000000000..1efbf65cb4a4 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/feature_previews.html @@ -0,0 +1,140 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load i18n %} +{% load hq_shared_tags %} + +{% block page_content %} +

+ {% trans "Feature Previews" %} +

+
+
+

+ + {% trans "What are Feature Previews?" %} + +
+ {% blocktrans %} + Before we invest in making certain product features generally + available, we release them as Feature Previews to learn the + following two things from usage data and qualitative feedback. + {% endblocktrans %} +

+
    +
  • +

    + {% blocktrans %} + Perceived Value: + The biggest risk in product development is to + build something that offers little value to our users. As such, + we make Feature Previews generally available only if they have + high perceived value. + {% endblocktrans %} +

    +
  • +
  • +

    + {% blocktrans %} + User Experience: + Even if a feature has high perceived value, + it is important that the user experience of the feature is + optimized such that our users actually receive the value. + As such, we make high value Feature Previews generally + available after we optimize the user experience. + {% endblocktrans %} +

    +
  • +
+

+ {% blocktrans %} + Feature Previews are in active product development, therefore + should not be used for business critical workflows. We encourage + you to use Feature Previews and provide us feedback, however + please note that Feature Previews: + {% endblocktrans %} +

+
    +
  • +

    + {% blocktrans %} + May not be optimized for performance + {% endblocktrans %} +

    +
  • +
  • +

    + {% blocktrans %} + Are not supported by the CommCare Support Team + {% endblocktrans %} +

    +
  • +
  • +

    + {% blocktrans %} + May change at any time without notice + {% endblocktrans %} +

    +
  • +
  • +

    + {% blocktrans %} + Are not subject to any warranties on current and future + availability. Please refer to our + terms to + learn more. + {% endblocktrans %} +

    +
  • +
+
+

+ {% blocktrans %} + Looking for something that used to be here? + {% endblocktrans %} +

+

+ {% blocktrans %} + The feature flags Control Mapping in Case List, + Custom Calculations in Case List, Custom + Single and Multiple Answer Questions, and Icons in + Case List are now add-ons for individual apps. To turn + them on, go to the application's settings and choose the + Add-Ons tab. + {% endblocktrans %} +

+
+
+
+ +
+
+
+ {% csrf_token %} + + + + + + + + + {% for feature, enabled in features %} + + + + + + {% endfor %} + +
{% trans "Feature Name" %}{% trans "Description" %}{% trans "Enable" %}
{{ feature.label }} + {{ feature.description }}
+ {% if feature.help_link %} + {% trans "More information" %} + {% endif %} +
+ {# todo B5: css-checkbox #} +
+
+
+
+{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index 227de2eb6a02..b71ba4d819ef 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -414,7 +414,7 @@ def page_context(self): class FeaturePreviewsView(BaseAdminProjectSettingsView): urlname = 'feature_previews' page_title = gettext_lazy("Feature Previews") - template_name = 'domain/admin/feature_previews.html' + template_name = 'domain/admin/bootstrap3/feature_previews.html' @method_decorator(domain_admin_required) def dispatch(self, request, *args, **kwargs): From b0eee376308fdc4a696eb3edc58a3c0720752e7e Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:55:01 +0000 Subject: [PATCH 043/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/commtrack_action_table.html, splitting templates" --- .../commtrack_action_table.html | 0 .../bootstrap5/commtrack_action_table.html | 31 +++++++++++++++++++ .../templates/domain/admin/sms_settings.html | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/commtrack_action_table.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html diff --git a/corehq/apps/domain/templates/domain/admin/commtrack_action_table.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/commtrack_action_table.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/commtrack_action_table.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/commtrack_action_table.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html new file mode 100644 index 000000000000..5cc795aae177 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html @@ -0,0 +1,31 @@ +{% load i18n %} +
{# todo B5: css-panel #} + + + + + + + + + + + + + + + + + +
{% trans "Name" %}{% trans "SMS Keyword" %}{% trans "Action Type" %}
{# todo B5: css-form-group, css-has-error #} + +
+
{# todo B5: css-form-group, css-has-error #} + +
+
{# todo B5: css-form-group #} + + + +
+
diff --git a/corehq/apps/domain/templates/domain/admin/sms_settings.html b/corehq/apps/domain/templates/domain/admin/sms_settings.html index 96720b3d968e..b0f48245abf2 100644 --- a/corehq/apps/domain/templates/domain/admin/sms_settings.html +++ b/corehq/apps/domain/templates/domain/admin/sms_settings.html @@ -12,7 +12,7 @@
{% trans 'Stock Actions' %}
- {% include "domain/admin/commtrack_action_table.html" %} + {% include "domain/admin/bootstrap3/commtrack_action_table.html" %} From 5ed05fd577450af8a36bc70ba25e1ff7bb754846 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:55:38 +0000 Subject: [PATCH 044/159] "Bootstrap 5 Migration - initial auto-migration for domain/manage_releases_by_location.html, splitting templates" --- .../manage_releases_by_location.html | 0 .../manage_releases_by_location.html | 74 +++++++++++++++++++ corehq/apps/domain/views/releases.py | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/manage_releases_by_location.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_location.html diff --git a/corehq/apps/domain/templates/domain/manage_releases_by_location.html b/corehq/apps/domain/templates/domain/bootstrap3/manage_releases_by_location.html similarity index 100% rename from corehq/apps/domain/templates/domain/manage_releases_by_location.html rename to corehq/apps/domain/templates/domain/bootstrap3/manage_releases_by_location.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_location.html b/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_location.html new file mode 100644 index 000000000000..7457e55a9880 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/manage_releases_by_location.html @@ -0,0 +1,74 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'app_manager/js/manage_releases_by_location' %} + +{% block page_content %} + {% initial_page_data 'app_releases_by_location' app_releases_by_location %} + {% initial_page_data 'appVersionSelectInitialValue' selected_build_details %} + {% initial_page_data 'locationSearchSelectInitialValue' selected_location_details %} + {% initial_page_data 'appVersionOnlyShowReleased' True %} + {% registerurl 'deactivate_release_restriction' domain '---'%} + {% registerurl 'activate_release_restriction' domain '---'%} + {% registerurl "paginate_releases" domain '---' %} + {% registerurl 'location_search' domain %} + +
+
+
{# todo B5: css-panel #} +
+
+ {% crispy manage_releases_by_location_form %} {# todo B5: crispy #} +
+ {% if app_releases_by_location %} + + + + + + + + + + + + + + + + + + + +
{% trans 'Application' %}{% trans 'Location' %}{% trans 'Version' %}{% trans 'Last Activity' %}{% trans 'Action' %}
+
+ {% trans 'Activated On : ' %} + +
+
+ {% trans 'Deactivated On : ' %} + +
+
+ +
+ + {% trans 'Could not update!' %} + + +
+ {% endif %} +
+
+
+
+{% endblock %} diff --git a/corehq/apps/domain/views/releases.py b/corehq/apps/domain/views/releases.py index 1f7eed90af3b..20a196d30989 100644 --- a/corehq/apps/domain/views/releases.py +++ b/corehq/apps/domain/views/releases.py @@ -34,7 +34,7 @@ @method_decorator([toggles.MANAGE_RELEASES_PER_LOCATION.required_decorator(), require_can_edit_apps], name='dispatch') class ManageReleasesByLocation(BaseProjectSettingsView): - template_name = 'domain/manage_releases_by_location.html' + template_name = 'domain/bootstrap3/manage_releases_by_location.html' urlname = 'manage_releases_by_location' page_title = gettext_lazy("Manage Releases By Location") From 6889f862904d96c6621c807fb93dcea57896384a Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:56:19 +0000 Subject: [PATCH 045/159] "Bootstrap 5 Migration - initial auto-migration for domain/select_plan.html, splitting templates" --- .../domain/{ => bootstrap3}/select_plan.html | 0 .../domain/bootstrap5/select_plan.html | 261 ++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- 3 files changed, 262 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/select_plan.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/select_plan.html diff --git a/corehq/apps/domain/templates/domain/select_plan.html b/corehq/apps/domain/templates/domain/bootstrap3/select_plan.html similarity index 100% rename from corehq/apps/domain/templates/domain/select_plan.html rename to corehq/apps/domain/templates/domain/bootstrap3/select_plan.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/select_plan.html b/corehq/apps/domain/templates/domain/bootstrap5/select_plan.html new file mode 100644 index 000000000000..4d78bc5796df --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/select_plan.html @@ -0,0 +1,261 @@ +{% extends "domain/bootstrap5/base_change_plan.html" %} +{% load hq_shared_tags %} +{% load i18n %} +{% load menu_tags %} + +{% requirejs_main_b5 'accounting/js/pricing_table' %} + +{% block form_content %} + {% initial_page_data 'editions' editions %} + {% initial_page_data 'planOptions' plan_options %} + {% initial_page_data 'currentPlan' current_edition %} + {% initial_page_data 'is_renewal' is_renewal %} + {% initial_page_data 'start_date_after_minimum_subscription' start_date_after_minimum_subscription %} + {% initial_page_data 'subscription_below_minimum' subscription_below_minimum %} + {% initial_page_data 'next_subscription_edition' next_subscription_edition %} + {% initial_page_data 'invoicing_contact_email' INVOICING_CONTACT_EMAIL %} + {% initial_page_data 'current_price' current_price %} + {% initial_page_data 'is_price_discounted' is_price_discounted %} + {% registerurl 'email_on_downgrade' domain %} + +

+ {{ lead_text }} + + {% trans "Learn More" %} + +

+ +
+ +

+ {% trans "Pay Monthly" %} + + {% trans "Pay Annually" %} +

+ +

+ {% blocktrans %} + Save close to 20% when you pay annually. {# todo B5: css-close #} + {% endblocktrans %} +

+ +

+ + + {% trans '90 day refund policy' %} + +

+ + + + + +
+

+ {% if can_domain_unpause %} + + {% blocktrans %} + Your subscription is currently paused. + {% endblocktrans %} + {% else %} + {% url 'domain_billing_statements' domain as url_statements %} + + {% blocktrans %} + Your subscription is currently paused because you have + past-due invoices. + {% endblocktrans %} +
+ {% blocktrans %} + You will not be allowed to un-pause your project until + these invoices are paid. + {% endblocktrans %} + {% endif %} +

+
+ +
+ + {% blocktrans %} + Your subscription will be pausing on + unless + you select a different plan above. + {% endblocktrans %} +
+ +
+ + {% blocktrans %} + Your subscription will be downgrading to + on + unless + you select a different plan above. + {% endblocktrans %} +
+ +
+

+ {% blocktrans %} + You are currently on the FREE CommCare Community plan. + {% endblocktrans %} +

+
+ + + +
+ {% csrf_token %} + +
+ +
+
+ +
+{% endblock %} + +{% block modals %}{{ block.super }} + +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 2c1483408ed9..940bf8fbea5b 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -1090,7 +1090,7 @@ def page_context(self): class SelectPlanView(PlanViewBase): - template_name = 'domain/select_plan.html' + template_name = 'domain/bootstrap3/select_plan.html' urlname = 'domain_select_plan' step_title = gettext_lazy("Select Plan") From 3b3e6190c19656dcf3b23d3dd490801b19036f55 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:56:40 +0000 Subject: [PATCH 046/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/location_fixture.html, splitting templates" --- .../domain/admin/{ => bootstrap3}/location_fixture.html | 0 .../domain/admin/bootstrap5/location_fixture.html | 7 +++++++ corehq/apps/domain/views/fixtures.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/location_fixture.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/location_fixture.html diff --git a/corehq/apps/domain/templates/domain/admin/location_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/location_fixture.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/location_fixture.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/location_fixture.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/location_fixture.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/location_fixture.html new file mode 100644 index 000000000000..f6f06763df0c --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/location_fixture.html @@ -0,0 +1,7 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load crispy_forms_tags %} +{% load i18n %} +{% block page_content %} +

{% trans "Location Fixture Settings" %}

+ {% crispy form %} {# todo B5: crispy #} +{% endblock %} diff --git a/corehq/apps/domain/views/fixtures.py b/corehq/apps/domain/views/fixtures.py index 61650a763638..0f9398a004cc 100644 --- a/corehq/apps/domain/views/fixtures.py +++ b/corehq/apps/domain/views/fixtures.py @@ -13,7 +13,7 @@ class LocationFixtureConfigView(BaseAdminProjectSettingsView): urlname = 'location_fixture_config' page_title = gettext_lazy('Location Fixture') - template_name = 'domain/admin/location_fixture.html' + template_name = 'domain/admin/bootstrap3/location_fixture.html' @method_decorator(domain_admin_required) @method_decorator(toggles.HIERARCHICAL_LOCATION_FIXTURE.required_decorator()) From 312c29eac2542c1f43a8bf1fdeae708957e3b845 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:58:12 +0000 Subject: [PATCH 047/159] "Bootstrap 5 Migration - initial auto-migration for domain/billing_statements.html, splitting templates" --- .../{ => bootstrap3}/billing_statements.html | 0 .../domain/bootstrap5/billing_statements.html | 198 ++++++++++++++++++ corehq/apps/domain/views/accounting.py | 2 +- corehq/apps/enterprise/views.py | 2 +- 4 files changed, 200 insertions(+), 2 deletions(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/billing_statements.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html diff --git a/corehq/apps/domain/templates/domain/billing_statements.html b/corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html similarity index 100% rename from corehq/apps/domain/templates/domain/billing_statements.html rename to corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html b/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html new file mode 100644 index 000000000000..a431bab6e886 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html @@ -0,0 +1,198 @@ +{% extends 'hqwebapp/bootstrap5/base_paginated_crud.html' %} +{% load i18n %} +{% load hq_shared_tags %} + +{% requirejs_main_b5 'domain/js/billing_statements' %} + +{% block paginated_list_top %} + {% initial_page_data 'pagination' pagination %} {# todo B5: css-pagination #} + {% initial_page_data 'stripe_options' stripe_options %} + {% initial_page_data 'payment_urls' payment_urls %} + {% initial_page_data 'payment_error_messages' payment_error_messages %} + {% initial_page_data 'item_creation_allowed' pagination.create.is_allowed %} + {% initial_page_data 'total_balance' total_balance %} + {% initial_page_data 'show_plan' show_plan %} + +
+

{% trans 'Total Due:' %} + +

+ {% if not is_ops_user_but_not_admin %} +

+ +

+

+ +

+ {% else %} + + + {% trans "Not Billing Admin, Can't Make Payment" %} + + {% endif %} +
+

{% trans 'Billing Statements' %} ({% trans 'Unpaid' %})

+

+ + +

+{% endblock %} + +{% block pagination_templates %} + + + {% include 'accounting/partials/stripe_card_ko_template.html' %} + + + + + + + + + + + + +{% endblock %} + +{% block modals %}{{ block.super }} + {% with process_invoice_payment_url as process_payment_url %} + {% include 'domain/partials/bootstrap5/payment_modal.html' with payment_modal_id="paymentModal" title_template="payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} + {% endwith %} + {% with process_bulk_payment_url as process_payment_url %} + {% include 'domain/partials/bootstrap5/payment_modal.html' with payment_modal_id="bulkPaymentModal" title_template="bulk-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_simple" %} + {% endwith %} + {% with process_wire_invoice_url as process_payment_url %} + {% include 'domain/partials/bootstrap5/payment_modal.html' with payment_modal_id="bulkWirePaymentModal" title_template="bulk-wire-payment-method-modal-title" cost_item_template="cost-item-template" payment_complete_template="payment_complete_template_wire" %} + {% endwith %} +{% endblock %} diff --git a/corehq/apps/domain/views/accounting.py b/corehq/apps/domain/views/accounting.py index 940bf8fbea5b..f7a3e3f5cab5 100644 --- a/corehq/apps/domain/views/accounting.py +++ b/corehq/apps/domain/views/accounting.py @@ -444,7 +444,7 @@ def post(self, request, *args, **kwargs): class DomainBillingStatementsView(DomainAccountingSettings, CRUDPaginatedViewMixin): - template_name = 'domain/billing_statements.html' + template_name = 'domain/bootstrap3/billing_statements.html' urlname = 'domain_billing_statements' page_title = gettext_lazy("Billing Statements") diff --git a/corehq/apps/enterprise/views.py b/corehq/apps/enterprise/views.py index 7883da63ffb1..169d1ed15ef6 100644 --- a/corehq/apps/enterprise/views.py +++ b/corehq/apps/enterprise/views.py @@ -229,7 +229,7 @@ def page_url(self): @method_decorator(require_enterprise_admin, name='dispatch') class EnterpriseBillingStatementsView(DomainAccountingSettings, CRUDPaginatedViewMixin): - template_name = 'domain/billing_statements.html' + template_name = 'domain/bootstrap3/billing_statements.html' urlname = 'enterprise_billing_statements' page_title = gettext_lazy("Billing Statements") From 46b053f540c33b0b638104dd6f2ef7c897af272b Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 18:59:20 +0000 Subject: [PATCH 048/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/partials/case_search_templates.html, splitting templates" --- .../domain/admin/bootstrap3/case_search.html | 2 +- .../domain/admin/bootstrap5/case_search.html | 2 +- .../case_search_templates.html | 0 .../bootstrap5/case_search_templates.html | 37 +++++++++++++++++++ 4 files changed, 39 insertions(+), 2 deletions(-) rename corehq/apps/domain/templates/domain/admin/partials/{ => bootstrap3}/case_search_templates.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html index 03f9c71f60a6..2717a7e75b83 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html @@ -5,7 +5,7 @@ {% requirejs_main 'domain/js/case_search_main' %} {% block page_content %} - {% include 'domain/admin/partials/case_search_templates.html' %} + {% include 'domain/admin/partials/bootstrap3/case_search_templates.html' %} {% initial_page_data 'case_types' case_types %} {% initial_page_data 'values' values %} {% registerurl 'case_search_config' request.domain %} diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html index a7088c4d74bd..95c1036be5a9 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html @@ -5,7 +5,7 @@ {% requirejs_main_b5 'domain/js/case_search_main' %} {% block page_content %} - {% include 'domain/admin/partials/case_search_templates.html' %} + {% include 'domain/admin/partials/bootstrap5/case_search_templates.html' %} {% initial_page_data 'case_types' case_types %} {% initial_page_data 'values' values %} {% registerurl 'case_search_config' request.domain %} diff --git a/corehq/apps/domain/templates/domain/admin/partials/case_search_templates.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap3/case_search_templates.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/partials/case_search_templates.html rename to corehq/apps/domain/templates/domain/admin/partials/bootstrap3/case_search_templates.html diff --git a/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html new file mode 100644 index 000000000000..7e5eb3531828 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/partials/bootstrap5/case_search_templates.html @@ -0,0 +1,37 @@ +{% load i18n %} + +
+
{# todo B5: css-form-group, css-form-inline #} + + +
+
+ +
+
{# todo B5: css-panel #} +
{# todo B5: css-form-inline #} + {% trans "Case type" %} + + +
+
+
+ +
+
+ +
From f605acdaed25017563c4bb8b4e4f52266a8f6576 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:00:03 +0000 Subject: [PATCH 049/159] "Bootstrap 5 Migration - initial auto-migration for domain/select.html, splitting templates" --- .../domain/{ => bootstrap3}/select.html | 0 .../templates/domain/bootstrap5/select.html | 70 +++++++++++++++++++ corehq/apps/domain/views/base.py | 2 +- 3 files changed, 71 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/select.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/select.html diff --git a/corehq/apps/domain/templates/domain/select.html b/corehq/apps/domain/templates/domain/bootstrap3/select.html similarity index 100% rename from corehq/apps/domain/templates/domain/select.html rename to corehq/apps/domain/templates/domain/bootstrap3/select.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/select.html b/corehq/apps/domain/templates/domain/bootstrap5/select.html new file mode 100644 index 000000000000..21fbbc5e42c6 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/select.html @@ -0,0 +1,70 @@ +{% extends "hqwebapp/bootstrap5/base_page.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% block title %}{% trans "My Projects" %}{% endblock title %} + +{% requirejs_main_b5 'domain/js/select' %} + +{% block page_content %} + {% initial_page_data 'invitation_links' invitation_links %} + {% initial_page_data 'domain_links' domain_links %} + + +{% endblock %} diff --git a/corehq/apps/domain/views/base.py b/corehq/apps/domain/views/base.py index e22f9bfa6b79..940e5a651737 100644 --- a/corehq/apps/domain/views/base.py +++ b/corehq/apps/domain/views/base.py @@ -53,7 +53,7 @@ def select(request, do_not_redirect=False, next_view=None): 'current_page': {'page_name': _('Select A Project')}, } - domain_select_template = "domain/select.html" + domain_select_template = "domain/bootstrap3/select.html" last_visited_domain = request.session.get('last_visited_domain') if open_invitations \ or do_not_redirect \ From e972b5d78e346ebb93becac8707ed640a898bc82 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:00:45 +0000 Subject: [PATCH 050/159] "Bootstrap 5 Migration - initial auto-migration for domain/pro_bono/static.html, splitting templates" --- .../domain/pro_bono/{ => bootstrap3}/static.html | 0 .../templates/domain/pro_bono/bootstrap5/static.html | 8 ++++++++ corehq/apps/domain/views/pro_bono.py | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/pro_bono/{ => bootstrap3}/static.html (100%) create mode 100644 corehq/apps/domain/templates/domain/pro_bono/bootstrap5/static.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/static.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap3/static.html similarity index 100% rename from corehq/apps/domain/templates/domain/pro_bono/static.html rename to corehq/apps/domain/templates/domain/pro_bono/bootstrap3/static.html diff --git a/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/static.html b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/static.html new file mode 100644 index 000000000000..dbe80f3564b6 --- /dev/null +++ b/corehq/apps/domain/templates/domain/pro_bono/bootstrap5/static.html @@ -0,0 +1,8 @@ +{% extends 'hqwebapp/bootstrap5/base_page.html' %} +{% load hq_shared_tags %} + +{% requirejs_main_b5 'domain/js/pro-bono' %} + +{% block page_content %} + {% include 'domain/pro_bono/bootstrap5/page_content.html' %} +{% endblock %} diff --git a/corehq/apps/domain/views/pro_bono.py b/corehq/apps/domain/views/pro_bono.py index d00c8d03139b..c3c5092b655c 100644 --- a/corehq/apps/domain/views/pro_bono.py +++ b/corehq/apps/domain/views/pro_bono.py @@ -47,7 +47,7 @@ def post(self, request, *args, **kwargs): class ProBonoStaticView(ProBonoMixin, BasePageView): - template_name = 'domain/pro_bono/static.html' + template_name = 'domain/pro_bono/bootstrap3/static.html' urlname = 'pro_bono_static' use_domain_field = True From 135b940ca7ab2a0687efbb225b302e8ef993ff3b Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:01:41 +0000 Subject: [PATCH 051/159] "Bootstrap 5 Migration - initial auto-migration for domain/internal_settings.html, splitting templates" --- .../{ => bootstrap3}/internal_settings.html | 0 .../domain/bootstrap5/internal_settings.html | 24 +++++++++++++++++++ corehq/apps/domain/views/internal.py | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/{ => bootstrap3}/internal_settings.html (100%) create mode 100644 corehq/apps/domain/templates/domain/bootstrap5/internal_settings.html diff --git a/corehq/apps/domain/templates/domain/internal_settings.html b/corehq/apps/domain/templates/domain/bootstrap3/internal_settings.html similarity index 100% rename from corehq/apps/domain/templates/domain/internal_settings.html rename to corehq/apps/domain/templates/domain/bootstrap3/internal_settings.html diff --git a/corehq/apps/domain/templates/domain/bootstrap5/internal_settings.html b/corehq/apps/domain/templates/domain/bootstrap5/internal_settings.html new file mode 100644 index 000000000000..fc1cc9fba803 --- /dev/null +++ b/corehq/apps/domain/templates/domain/bootstrap5/internal_settings.html @@ -0,0 +1,24 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/internal_settings' %} + +{% block stylesheets %} + {{ block.super }} + + +{% endblock %} + +{% block page_content %} + {% initial_page_data 'areas' areas %} + {% initial_page_data 'current_values' form.current_values %} +
+ {% crispy form %} {# todo B5: crispy #} +
+{% endblock %} diff --git a/corehq/apps/domain/views/internal.py b/corehq/apps/domain/views/internal.py index 4683db4c5365..d4044a973a2b 100644 --- a/corehq/apps/domain/views/internal.py +++ b/corehq/apps/domain/views/internal.py @@ -75,7 +75,7 @@ def page_name(self): class EditInternalDomainInfoView(BaseInternalDomainSettingsView): urlname = 'domain_internal_settings' page_title = gettext_lazy("Project Information") - template_name = 'domain/internal_settings.html' + template_name = 'domain/bootstrap3/internal_settings.html' strict_domain_fetching = True @method_decorator(always_allow_project_access) From c0548f07b441258111265110cc3d69fb3995b52c Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:02:40 +0000 Subject: [PATCH 052/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/my_project_settings.html, splitting templates" --- .../{ => bootstrap3}/my_project_settings.html | 0 .../admin/bootstrap5/my_project_settings.html | 21 +++++++++++++++++++ corehq/apps/domain/views/settings.py | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/my_project_settings.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/my_project_settings.html diff --git a/corehq/apps/domain/templates/domain/admin/my_project_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/my_project_settings.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/my_project_settings.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/my_project_settings.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/my_project_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/my_project_settings.html new file mode 100644 index 000000000000..ef1b81b1f3a7 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/my_project_settings.html @@ -0,0 +1,21 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load crispy_forms_tags %} +{% load i18n %} + +{% requirejs_main_b5 'domain/js/my_project_settings' %} + +{% block stylesheets %} + +{% endblock %} + +{% block page_content %} + {% initial_page_data "override_global_tz" override_global_tz %} + {% initial_page_data "no_domain_membership" no_domain_membership %} + {% crispy my_project_settings_form %} {# todo B5: crispy #} +{% endblock %} diff --git a/corehq/apps/domain/views/settings.py b/corehq/apps/domain/views/settings.py index b71ba4d819ef..bd09d997d8ee 100644 --- a/corehq/apps/domain/views/settings.py +++ b/corehq/apps/domain/views/settings.py @@ -220,7 +220,7 @@ def post(self, request, *args, **kwargs): class EditMyProjectSettingsView(BaseProjectSettingsView): - template_name = 'domain/admin/my_project_settings.html' + template_name = 'domain/admin/bootstrap3/my_project_settings.html' urlname = 'my_project_settings' page_title = gettext_lazy("My Timezone") From 139b9798c2a7f451b0477bc2f7a46d4d3f37d0e6 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:05:04 +0000 Subject: [PATCH 053/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/toggles.js, splitting templates" --- .../domain/js/{ => bootstrap3}/toggles.js | 2 +- .../static/domain/js/bootstrap5/toggles.js | 70 +++++++++++++++++++ .../bootstrap3/flags_and_privileges.html | 2 +- .../bootstrap5/flags_and_privileges.html | 2 +- 4 files changed, 73 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/toggles.js (98%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/toggles.js diff --git a/corehq/apps/domain/static/domain/js/toggles.js b/corehq/apps/domain/static/domain/js/bootstrap3/toggles.js similarity index 98% rename from corehq/apps/domain/static/domain/js/toggles.js rename to corehq/apps/domain/static/domain/js/bootstrap3/toggles.js index a175b09bfbdd..982325848da7 100644 --- a/corehq/apps/domain/static/domain/js/toggles.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/toggles.js @@ -1,4 +1,4 @@ -hqDefine('domain/js/toggles', [ +hqDefine('domain/js/bootstrap3/toggles', [ 'jquery', 'knockout', 'underscore', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/toggles.js b/corehq/apps/domain/static/domain/js/bootstrap5/toggles.js new file mode 100644 index 000000000000..b66e2735fb00 --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/toggles.js @@ -0,0 +1,70 @@ +hqDefine('domain/js/bootstrap5/toggles', [ + 'jquery', + 'knockout', + 'underscore', + 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/bootstrap5/alert_user', + 'hqwebapp/js/assert_properties', + 'hqwebapp/js/bootstrap5/knockout_bindings.ko', // for slideVisible + 'hqwebapp/js/bootstrap5/main', + 'commcarehq', +], function ( + $, + ko, + _, + initialPageData, + alertUser, + assertProperties +) { + + var Toggle = function (data) { + assertProperties.assert(data, [ + 'slug', 'label', 'description', 'help_link', 'tag', 'tag_index', + 'tag_css_class', 'tag_description', 'domain_enabled', + 'user_enabled', 'has_domain_namespace', + ]); + + var self = {}; + self.slug = data['slug']; + self.label = data['label']; + self.description = data['description']; + self.helpLink = data['help_link']; + self.tag = data['tag']; + self.tagCssClass = data['tag_css_class']; + self.tagDescription = data['tag_description']; + self.domainEnabled = ko.observable(data['domain_enabled']); + self.userEnabled = ko.observable(data['user_enabled']); + self.hasDomainNamespace = data['has_domain_namespace']; + self.editLink = initialPageData.reverse('edit_toggle', self.slug); + + self.expanded = ko.observable(false); + self.showHideDescription = function () { self.expanded(!self.expanded()); }; + + self.isEnabled = ko.computed(function () { + return self.domainEnabled() || self.userEnabled(); + }); + + self.setTogglePending = ko.observable(false); + self.toggleEnabledState = function () { + self.setTogglePending(true); + var newState = !self.domainEnabled(); + $.ajax({ + method: 'POST', + url: initialPageData.reverse('set_toggle', self.slug), + data: { + item: initialPageData.get('domain'), + enabled: newState, + namespace: 'domain', + }, + success: function () { self.domainEnabled(newState); }, + error: function () { alertUser.alert_user("Something went wrong", 'danger'); }, + complete: function () { self.setTogglePending(false); }, + }); + }; + + return self; + }; + + var allToggles = _.map(initialPageData.get('toggles'), Toggle); + $("#toggles-table").koApplyBindings({"toggles": allToggles}); +}); diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html index d50b32601e6a..f34c193e157c 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/flags_and_privileges.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% js_entry_b3 'domain/js/toggles' %} +{% js_entry_b3 'domain/js/bootstrap3/toggles' %} {% block page_content %} diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html index 16abbae24638..c4ec5fa2d393 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/flags_and_privileges.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% js_entry_b3 'domain/js/toggles' %} +{% js_entry_b3 'domain/js/bootstrap5/toggles' %} {% block page_content %} From 1fb0917af19ea9695e8097608a46812735fc30ba Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:06:37 +0000 Subject: [PATCH 054/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/internal_subscription_management.js, splitting templates" --- .../internal_subscription_management.js | 2 +- .../internal_subscription_management.js | 22 +++++++++++++++++++ .../internal_subscription_management.html | 2 +- .../internal_subscription_management.html | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/internal_subscription_management.js (90%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/internal_subscription_management.js diff --git a/corehq/apps/domain/static/domain/js/internal_subscription_management.js b/corehq/apps/domain/static/domain/js/bootstrap3/internal_subscription_management.js similarity index 90% rename from corehq/apps/domain/static/domain/js/internal_subscription_management.js rename to corehq/apps/domain/static/domain/js/bootstrap3/internal_subscription_management.js index c8a70ecb5269..7b8604f49db1 100644 --- a/corehq/apps/domain/static/domain/js/internal_subscription_management.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/internal_subscription_management.js @@ -1,4 +1,4 @@ -hqDefine('domain/js/internal_subscription_management', [ +hqDefine('domain/js/bootstrap3/internal_subscription_management', [ 'jquery', 'knockout', 'hqwebapp/js/bootstrap3/widgets', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/internal_subscription_management.js b/corehq/apps/domain/static/domain/js/bootstrap5/internal_subscription_management.js new file mode 100644 index 000000000000..d1c5d4f6ff57 --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/internal_subscription_management.js @@ -0,0 +1,22 @@ +hqDefine('domain/js/bootstrap5/internal_subscription_management', [ + 'jquery', + 'knockout', + 'hqwebapp/js/bootstrap5/widgets', +], function ( + $, + ko +) { + $(function () { + var viewModel = { + subscriptionType: ko.observable($('#id_subscription_type').val() || null), + trialLength: ko.observable(90), + }; + viewModel.end_date = ko.computed(function () { + var date = new Date(); + date.setHours(0, 0, 0, 0); + date.setDate(date.getDate() + parseInt(viewModel.trialLength())); + return date.toJSON().slice(0, 10); + }); + $('#subscription_management').koApplyBindings(viewModel); + }); +}); diff --git a/corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html b/corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html index 26d4824481fd..41c0b730d92f 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/internal_subscription_management.html @@ -3,7 +3,7 @@ {% load crispy_forms_tags %} {% load hq_shared_tags %} -{% requirejs_main 'domain/js/internal_subscription_management' %} +{% requirejs_main 'domain/js/bootstrap3/internal_subscription_management' %} {% block page_content %} {% blocktrans %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html b/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html index c1d457031c38..7e518d29499a 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/internal_subscription_management.html @@ -3,7 +3,7 @@ {% load crispy_forms_tags %} {% load hq_shared_tags %} -{% requirejs_main_b5 'domain/js/internal_subscription_management' %} +{% requirejs_main_b5 'domain/js/bootstrap5/internal_subscription_management' %} {% block page_content %} {% blocktrans %} From 1259232f76f872fbec131261dd3f347644092b54 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:06:59 +0000 Subject: [PATCH 055/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/info_basic.js, splitting templates" --- .../domain/js/{ => bootstrap3}/info_basic.js | 2 +- .../static/domain/js/bootstrap5/info_basic.js | 34 +++++++++++++++++++ .../domain/admin/bootstrap3/info_basic.html | 2 +- .../domain/admin/bootstrap5/info_basic.html | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/info_basic.js (96%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/info_basic.js diff --git a/corehq/apps/domain/static/domain/js/info_basic.js b/corehq/apps/domain/static/domain/js/bootstrap3/info_basic.js similarity index 96% rename from corehq/apps/domain/static/domain/js/info_basic.js rename to corehq/apps/domain/static/domain/js/bootstrap3/info_basic.js index a1c9626a92e7..99d14a4bd19c 100644 --- a/corehq/apps/domain/static/domain/js/info_basic.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/info_basic.js @@ -1,4 +1,4 @@ -hqDefine("domain/js/info_basic", [ +hqDefine("domain/js/bootstrap3/info_basic", [ 'jquery', 'hqwebapp/js/select_2_ajax_widget', // for call center case owner 'select2/dist/js/select2.full.min', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/info_basic.js b/corehq/apps/domain/static/domain/js/bootstrap5/info_basic.js new file mode 100644 index 000000000000..b8eb3a10a82c --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/info_basic.js @@ -0,0 +1,34 @@ +hqDefine("domain/js/bootstrap5/info_basic", [ + 'jquery', + 'hqwebapp/js/select_2_ajax_widget', // for call center case owner + 'select2/dist/js/select2.full.min', + 'hqwebapp/js/bootstrap5/widgets', +], function ( + $ +) { + $(function () { + $('#id_default_timezone').select2({ + placeholder: gettext('Select a Timezone...'), + }); + + $('#id_call_center_enabled').change(function () { + var type = $('#id_call_center_type').closest('.control-group'); + var caseOwner = $('#id_call_center_case_owner').closest( + '.control-group' + ); + var caseType = $('#id_call_center_case_type').closest( + '.control-group' + ); + if ($(this).is(':checked')) { + type.removeClass('hide'); + caseOwner.removeClass('hide'); + caseType.removeClass('hide'); + } else { + type.addClass('hide'); + caseOwner.addClass('hide'); + caseType.addClass('hide'); + } + }); + $('#id_call_center_enabled').trigger('change'); + }); +}); diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html index f73830c0832e..40485e12afac 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/info_basic.html @@ -3,7 +3,7 @@ {% load hq_shared_tags %} -{% requirejs_main 'domain/js/info_basic' %} +{% requirejs_main 'domain/js/bootstrap3/info_basic' %} {% block stylesheets %}{{ block.super }} diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html index fb9122791bb2..876641f83e85 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/info_basic.html @@ -3,7 +3,7 @@ {% load hq_shared_tags %} -{% requirejs_main_b5 'domain/js/info_basic' %} +{% requirejs_main_b5 'domain/js/bootstrap5/info_basic' %} {% block stylesheets %}{{ block.super }} From 925c5e4cf6feeafda936b03efbd096cabe303a64 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:07:43 +0000 Subject: [PATCH 056/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/billing_statements.js, splitting templates" --- .../js/{ => bootstrap3}/billing_statements.js | 2 +- .../js/bootstrap5/billing_statements.js | 138 ++++++++++++++++++ .../domain/bootstrap3/billing_statements.html | 2 +- .../domain/bootstrap5/billing_statements.html | 2 +- 4 files changed, 141 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/billing_statements.js (98%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/billing_statements.js diff --git a/corehq/apps/domain/static/domain/js/billing_statements.js b/corehq/apps/domain/static/domain/js/bootstrap3/billing_statements.js similarity index 98% rename from corehq/apps/domain/static/domain/js/billing_statements.js rename to corehq/apps/domain/static/domain/js/bootstrap3/billing_statements.js index 78f69f3f4c1b..c1b4e753fdd8 100644 --- a/corehq/apps/domain/static/domain/js/billing_statements.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/billing_statements.js @@ -1,5 +1,5 @@ 'use strict'; -hqDefine("domain/js/billing_statements", [ +hqDefine("domain/js/bootstrap3/billing_statements", [ 'jquery', 'underscore', 'knockout', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/billing_statements.js b/corehq/apps/domain/static/domain/js/bootstrap5/billing_statements.js new file mode 100644 index 000000000000..20769c46ad02 --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/billing_statements.js @@ -0,0 +1,138 @@ +'use strict'; +hqDefine("domain/js/bootstrap5/billing_statements", [ + 'jquery', + 'underscore', + 'knockout', + 'hqwebapp/js/initial_page_data', + 'accounting/js/payment_method_handler', + 'hqwebapp/js/bootstrap5/crud_paginated_list', + 'stripe', +], function ( + $, + _, + ko, + initialPageData, + paymentMethodHandlers, + CRUDPaginatedList, + Stripe +) { + Stripe.setPublishableKey(initialPageData.get("stripe_options").stripe_public_key); + var wireInvoiceHandler = paymentMethodHandlers.wireInvoiceHandler; + var paymentMethodHandler = paymentMethodHandlers.paymentMethodHandler; + var invoice = paymentMethodHandlers.invoice; + var totalCostItem = paymentMethodHandlers.totalCostItem; + var pagination = initialPageData.get("pagination"); + var paginatedListModel = new CRUDPaginatedList.CRUDPaginatedListModel( + pagination.total, + pagination.limit, + pagination.page, + { + statusCodeText: pagination.status_codes, + allowItemCreation: initialPageData.get('item_creation_allowed'), + createItemForm: pagination.create_item_form, + } + ); + + $(function () { + $('#editable-paginated-list').koApplyBindings(paginatedListModel); + }); + + var bulkPaymentHandler = paymentMethodHandler( + "bulk-payment-form", + { + submitBtnText: gettext("Submit Payment"), + errorMessages: initialPageData.get("payment_error_messages"), + submitURL: initialPageData.get("payment_urls").process_bulk_payment_url, + } + ); + + var bulkWirePaymentHandler = wireInvoiceHandler( + "bulk-wire-payment-form", + { + submitBtnText: gettext("Submit Invoice Request"), + isWire: true, + errorMessages: initialPageData.get("payment_error_messages"), + submitURL: initialPageData.get("payment_urls").process_wire_invoice_url, + } + ); + + var paymentHandler = paymentMethodHandler( + "payment-form", + { + submitBtnText: gettext("Submit Payment"), + errorMessages: initialPageData.get("payment_error_messages"), + submitURL: initialPageData.get("payment_urls").process_invoice_payment_url, + } + ); + + // A sign that the data model isn't exactly right - credit cards are shared data. + // Consider refactoring at some point. + var handlers = [bulkPaymentHandler, paymentHandler]; + for (var i = 0; i < handlers.length; i++) { + handlers[i].handlers = handlers; + } + var stripeCards = initialPageData.get("stripe_options").stripe_cards; + if (stripeCards) { + bulkPaymentHandler.loadCards(stripeCards); + paymentHandler.loadCards(stripeCards); + } + + $(function () { + $('#bulkPaymentModal').koApplyBindings(bulkPaymentHandler); + $('#bulkWirePaymentModal').koApplyBindings(bulkWirePaymentHandler); + $('#paymentModal').koApplyBindings(paymentHandler); + }); + + $('#bulkPaymentBtn').click(function () { + bulkPaymentHandler.costItem(totalCostItem({ + totalBalance: paginatedListModel.totalDue(), + paginatedListModel: paginatedListModel, + })); + bulkPaymentHandler.reset(); + }); + $('#bulkWirePaymentBtn').click(function () { + bulkWirePaymentHandler.costItem(totalCostItem({ + totalBalance: paginatedListModel.totalDue(), + paginatedListModel: paginatedListModel, + })); + }); + + paginatedListModel.totalDue = ko.observable(parseFloat(initialPageData.get("total_balance"))); + + paginatedListModel.displayTotalDue = ko.computed(function () { + return "$" + paginatedListModel.totalDue().toFixed(2); + }); + paginatedListModel.showUnpaidBills = ko.observable(true); + paginatedListModel.showAllBills = ko.computed(function () { + return !paginatedListModel.showUnpaidBills(); + }); + paginatedListModel.toggleUnpaidBills = function () { + paginatedListModel.showUnpaidBills(!paginatedListModel.showUnpaidBills()); + paginatedListModel.currentPage(1); + paginatedListModel.refreshList(); + }; + + paginatedListModel.getAdditionalData = function () { + var additionalData = { + 'show_unpaid': paginatedListModel.showUnpaidBills(), + }; + if (window.location.href.split('?').length > 2) { + additionalData['show_hidden'] = _(window.location.href.split('?')[1].split('&')).contains('show_hidden=true'); + } + return additionalData; + }; + paginatedListModel.initRow = function (rowElems, paginatedItem) { + var paymentButton = $(rowElems).find('.payment-button'); + if (paymentButton) { + paymentButton.click(function (e) { + paymentHandler.costItem(invoice({ + paginatedItem: paginatedItem, + paginatedList: paginatedListModel, + })); + paymentHandler.reset(); + e.preventDefault(); + }); + } + }; + paginatedListModel.init(); +}); diff --git a/corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html b/corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html index 72cd885d37d8..5e6fcb4d4ff5 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/billing_statements.html @@ -2,7 +2,7 @@ {% load i18n %} {% load hq_shared_tags %} -{% requirejs_main 'domain/js/billing_statements' %} +{% requirejs_main 'domain/js/bootstrap3/billing_statements' %} {% block paginated_list_top %} {% initial_page_data 'pagination' pagination %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html b/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html index a431bab6e886..91148af83299 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/billing_statements.html @@ -2,7 +2,7 @@ {% load i18n %} {% load hq_shared_tags %} -{% requirejs_main_b5 'domain/js/billing_statements' %} +{% requirejs_main_b5 'domain/js/bootstrap5/billing_statements' %} {% block paginated_list_top %} {% initial_page_data 'pagination' pagination %} {# todo B5: css-pagination #} From b80e7b0a7af7602cf01848d5ab795508186a8cdc Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:08:42 +0000 Subject: [PATCH 057/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/case_search.js, splitting templates" --- .../domain/js/{ => bootstrap3}/case_search.js | 2 +- .../domain/js/bootstrap5/case_search.js | 144 ++++++++++++++++++ .../static/domain/js/case_search_main.js | 2 +- 3 files changed, 146 insertions(+), 2 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/case_search.js (99%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/case_search.js diff --git a/corehq/apps/domain/static/domain/js/case_search.js b/corehq/apps/domain/static/domain/js/bootstrap3/case_search.js similarity index 99% rename from corehq/apps/domain/static/domain/js/case_search.js rename to corehq/apps/domain/static/domain/js/bootstrap3/case_search.js index 07c5893ff82a..4b37ac10fb98 100644 --- a/corehq/apps/domain/static/domain/js/case_search.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/case_search.js @@ -1,4 +1,4 @@ -hqDefine('domain/js/case_search', [ +hqDefine('domain/js/bootstrap3/case_search', [ 'jquery', 'knockout', 'underscore', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/case_search.js b/corehq/apps/domain/static/domain/js/bootstrap5/case_search.js new file mode 100644 index 000000000000..ed9e6a87a241 --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/case_search.js @@ -0,0 +1,144 @@ +hqDefine('domain/js/bootstrap5/case_search', [ + 'jquery', + 'knockout', + 'underscore', + 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/bootstrap5/main', +], function ( + $, + ko, + _, + initialPageData, + hqMain +) { + var module = {}; + + var propertyModel = function (name) { + var self = {}; + self.name = ko.observable(name); + return self; + }; + + var caseTypeProps = function (caseType, properties) { + var self = {}; + + self.caseType = ko.observable(caseType); + self.properties = ko.observableArray( + _.map(properties, function (name) { return propertyModel(name); }) + ); + + self.addProperty = function () { + self.properties.push(propertyModel('')); + }; + self.removeProperty = function (property) { + self.properties.remove(property); + }; + + return self; + }; + + var ignorePatterns = function (caseType, caseProperty, regex) { + var self = {}; + + self.caseType = ko.observable(caseType); + self.caseProperty = ko.observable(caseProperty); + self.regex = ko.observable(regex); + + return self; + }; + + /** + * Returns a viewModel for domain/admin/case_search.html + */ + module.caseSearchConfig = function (options) { + var self = {}; + var initialValues = options.values; + + self.caseTypes = options.caseTypes; + self.toggleEnabled = ko.observable(initialValues.enabled); + self.synchronousWebApps = ko.observable(initialValues.synchronous_web_apps); + self.syncCaseOnFormEntry = ko.observable(initialValues.sync_cases_on_form_entry); + self.fuzzyProperties = ko.observableArray(); + for (var caseType in initialValues.fuzzy_properties) { + self.fuzzyProperties.push(caseTypeProps( + caseType, + initialValues.fuzzy_properties[caseType] + )); + } + self.ignorePatterns = ko.observableArray(); + for (var i = 0; i < initialValues.ignore_patterns.length; i++) { + self.ignorePatterns.push(ignorePatterns( + initialValues.ignore_patterns[i].case_type, + initialValues.ignore_patterns[i].case_property, + initialValues.ignore_patterns[i].regex + )); + } + self.change = function () { + self.saveButton.fire('change'); + }; + self.fuzzyProperties.subscribe(self.change); + self.synchronousWebApps.subscribe(self.change); + self.syncCaseOnFormEntry.subscribe(self.change); + + self.addCaseType = function () { + self.fuzzyProperties.push(caseTypeProps('', [''])); + self.change(); + }; + self.removeCaseType = function (caseType) { + self.fuzzyProperties.remove(caseType); + self.change(); + }; + + self.addIgnorePatterns = function () { + self.ignorePatterns.push(ignorePatterns('', '', '')); + self.change(); + }; + self.removeIgnorePatterns = function (r) { + self.ignorePatterns.remove(r); + self.change(); + }; + + self.saveButton = hqMain.initSaveButton({ + unsavedMessage: gettext("You have unchanged settings"), + save: function () { + self.saveButton.ajax({ + type: 'post', + url: initialPageData.reverse("case_search_config"), + data: JSON.stringify(self.serialize()), + dataType: 'json', + contentType: "application/json; charset=utf-8", + }); + }, + }); + + self.serialize = function () { + var fuzzyProperties = {}; + for (var i = 0; i < self.fuzzyProperties().length; i++) { + var caseType = self.fuzzyProperties()[i].caseType(), + properties = _.map( + self.fuzzyProperties()[i].properties(), + function (property) { return property.name(); } + ); + + fuzzyProperties[caseType] = (fuzzyProperties[caseType] || []).concat(properties); + } + return { + 'enable': self.toggleEnabled(), + 'synchronous_web_apps': self.synchronousWebApps(), + 'sync_cases_on_form_entry': self.syncCaseOnFormEntry(), + 'fuzzy_properties': fuzzyProperties, + 'ignore_patterns': _.map(self.ignorePatterns(), function (rc) { + return { + 'case_type': rc.caseType(), + 'case_property': rc.caseProperty(), + 'regex': rc.regex(), + }; + }), + }; + }; + + return self; + }; + + return module; +}); diff --git a/corehq/apps/domain/static/domain/js/case_search_main.js b/corehq/apps/domain/static/domain/js/case_search_main.js index b32e7be96658..5e33b941dba6 100644 --- a/corehq/apps/domain/static/domain/js/case_search_main.js +++ b/corehq/apps/domain/static/domain/js/case_search_main.js @@ -1,7 +1,7 @@ hqDefine('domain/js/case_search_main', [ 'jquery', 'hqwebapp/js/initial_page_data', - 'domain/js/case_search', + 'domain/js/bootstrap3/case_search', 'hqwebapp/js/bootstrap3/knockout_bindings.ko', // save button ], function ( $, From 8605930d8c98d68842180594183f369bf305fb1c Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:09:03 +0000 Subject: [PATCH 058/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/update_billing_contact_info.js, splitting templates" --- .../update_billing_contact_info.js | 2 +- .../bootstrap5/update_billing_contact_info.js | 28 +++++++++++++++++++ .../update_billing_contact_info.html | 2 +- .../update_billing_contact_info.html | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/update_billing_contact_info.js (92%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/update_billing_contact_info.js diff --git a/corehq/apps/domain/static/domain/js/update_billing_contact_info.js b/corehq/apps/domain/static/domain/js/bootstrap3/update_billing_contact_info.js similarity index 92% rename from corehq/apps/domain/static/domain/js/update_billing_contact_info.js rename to corehq/apps/domain/static/domain/js/bootstrap3/update_billing_contact_info.js index b17d6f9c6f94..f4f14970b551 100644 --- a/corehq/apps/domain/static/domain/js/update_billing_contact_info.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/update_billing_contact_info.js @@ -1,5 +1,5 @@ 'use strict'; -hqDefine('domain/js/update_billing_contact_info', [ +hqDefine('domain/js/bootstrap3/update_billing_contact_info', [ 'jquery', 'hqwebapp/js/initial_page_data', 'accounting/js/stripe_card_manager', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/update_billing_contact_info.js b/corehq/apps/domain/static/domain/js/bootstrap5/update_billing_contact_info.js new file mode 100644 index 000000000000..579eb236f26e --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/update_billing_contact_info.js @@ -0,0 +1,28 @@ +'use strict'; +hqDefine('domain/js/bootstrap5/update_billing_contact_info', [ + 'jquery', + 'hqwebapp/js/initial_page_data', + 'accounting/js/stripe_card_manager', + 'stripe', + 'accounting/js/widgets', + 'hqwebapp/js/bootstrap5/knockout_bindings.ko', // openModal +], function ( + $, + initialPageData, + stripeCardManager, + Stripe +) { + $(function () { + Stripe.setPublishableKey(initialPageData.get("stripe_public_key")); + var cardManager = stripeCardManager.stripeCardManager({ + cards: initialPageData.get("cards"), + url: initialPageData.reverse("cards_view"), + }); + $("#card-manager").koApplyBindings(cardManager); + + $("#show_emails").click(function () { + $('#emails-text').show(); + $(this).parent().hide(); + }); + }); +}); diff --git a/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html index 46dda5d2d669..c92b5980bd1b 100644 --- a/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap3/update_billing_contact_info.html @@ -3,7 +3,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main 'domain/js/update_billing_contact_info' %} +{% requirejs_main 'domain/js/bootstrap3/update_billing_contact_info' %} {% block additional_initial_page_data %}{{ block.super }} {% initial_page_data "stripe_public_key" stripe_public_key %} diff --git a/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html index 17b0b76d97fd..2d9de6f75841 100644 --- a/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html +++ b/corehq/apps/domain/templates/domain/bootstrap5/update_billing_contact_info.html @@ -3,7 +3,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main_b5 'domain/js/update_billing_contact_info' %} +{% requirejs_main_b5 'domain/js/bootstrap5/update_billing_contact_info' %} {% block additional_initial_page_data %}{{ block.super }} {% initial_page_data "stripe_public_key" stripe_public_key %} From 2192caec22778cc9b99e62095b409b9da891001f Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:09:16 +0000 Subject: [PATCH 059/159] "Bootstrap 5 Migration - initial auto-migration for domain/js/case_search_main.js, splitting templates" --- .../js/{ => bootstrap3}/case_search_main.js | 2 +- .../domain/js/bootstrap5/case_search_main.js | 19 +++++++++++++++++++ .../domain/admin/bootstrap3/case_search.html | 2 +- .../domain/admin/bootstrap5/case_search.html | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) rename corehq/apps/domain/static/domain/js/{ => bootstrap3}/case_search_main.js (91%) create mode 100644 corehq/apps/domain/static/domain/js/bootstrap5/case_search_main.js diff --git a/corehq/apps/domain/static/domain/js/case_search_main.js b/corehq/apps/domain/static/domain/js/bootstrap3/case_search_main.js similarity index 91% rename from corehq/apps/domain/static/domain/js/case_search_main.js rename to corehq/apps/domain/static/domain/js/bootstrap3/case_search_main.js index 5e33b941dba6..fad553c002a5 100644 --- a/corehq/apps/domain/static/domain/js/case_search_main.js +++ b/corehq/apps/domain/static/domain/js/bootstrap3/case_search_main.js @@ -1,4 +1,4 @@ -hqDefine('domain/js/case_search_main', [ +hqDefine('domain/js/bootstrap3/case_search_main', [ 'jquery', 'hqwebapp/js/initial_page_data', 'domain/js/bootstrap3/case_search', diff --git a/corehq/apps/domain/static/domain/js/bootstrap5/case_search_main.js b/corehq/apps/domain/static/domain/js/bootstrap5/case_search_main.js new file mode 100644 index 000000000000..b835de74e613 --- /dev/null +++ b/corehq/apps/domain/static/domain/js/bootstrap5/case_search_main.js @@ -0,0 +1,19 @@ +hqDefine('domain/js/bootstrap5/case_search_main', [ + 'jquery', + 'hqwebapp/js/initial_page_data', + 'domain/js/bootstrap5/case_search', + 'hqwebapp/js/bootstrap5/knockout_bindings.ko', // save button +], function ( + $, + initialPageData, + caseSearch +) { + $(function () { + var viewModel = caseSearch.caseSearchConfig({ + values: initialPageData.get('values'), + caseTypes: initialPageData.get('case_types'), + }); + $('#case-search-config').koApplyBindings(viewModel); + $('#case-search-config').on('change', viewModel.change).on('click', ':button', viewModel.change); + }); +}); diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html index 2717a7e75b83..adf55b63cb34 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap3/case_search.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main 'domain/js/case_search_main' %} +{% requirejs_main 'domain/js/bootstrap3/case_search_main' %} {% block page_content %} {% include 'domain/admin/partials/bootstrap3/case_search_templates.html' %} diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html index 95c1036be5a9..10a0f5bb9f7b 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/case_search.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main_b5 'domain/js/case_search_main' %} +{% requirejs_main_b5 'domain/js/bootstrap5/case_search_main' %} {% block page_content %} {% include 'domain/admin/partials/bootstrap5/case_search_templates.html' %} From b1846ccfec1059eb548c531247f4cb59a4c20b22 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:23:02 +0000 Subject: [PATCH 060/159] "Bootstrap 5 Migration - initial auto-migration for domain/admin/sms_settings.html, splitting templates" --- corehq/apps/commtrack/views.py | 2 +- .../admin/{ => bootstrap3}/sms_settings.html | 0 .../domain/admin/bootstrap5/sms_settings.html | 28 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) rename corehq/apps/domain/templates/domain/admin/{ => bootstrap3}/sms_settings.html (100%) create mode 100644 corehq/apps/domain/templates/domain/admin/bootstrap5/sms_settings.html diff --git a/corehq/apps/commtrack/views.py b/corehq/apps/commtrack/views.py index b1652032b397..c0dcd6dada9b 100644 --- a/corehq/apps/commtrack/views.py +++ b/corehq/apps/commtrack/views.py @@ -185,7 +185,7 @@ def post(self, request, *args, **kwargs): class SMSSettingsView(BaseCommTrackManageView): urlname = 'commtrack_sms_settings' page_title = gettext_noop("SMS") - template_name = 'domain/admin/sms_settings.html' + template_name = 'domain/admin/bootstrap3/sms_settings.html' @property def page_context(self): diff --git a/corehq/apps/domain/templates/domain/admin/sms_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap3/sms_settings.html similarity index 100% rename from corehq/apps/domain/templates/domain/admin/sms_settings.html rename to corehq/apps/domain/templates/domain/admin/bootstrap3/sms_settings.html diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_settings.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_settings.html new file mode 100644 index 000000000000..c6918a1c5467 --- /dev/null +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/sms_settings.html @@ -0,0 +1,28 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'commtrack/js/sms' %} + +{% block page_content %} + {% initial_page_data "settings" settings %} + {% initial_page_data "other_sms_codes" other_sms_codes %} +
+ {% csrf_token %} +
+ {% trans 'Stock Actions' %} +
+ {% include "domain/admin/bootstrap5/commtrack_action_table.html" %} + +
+
+ + + + +
+{% endblock %} From da256b8273e8eb59e9fa13d5ec84bc84f67aea86 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Tue, 5 Nov 2024 19:25:24 +0000 Subject: [PATCH 061/159] "Bootstrap 5 Migration - Updated diff config for 'domain'" --- .../tests/data/bootstrap5_diff_config.json | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json index 92d1baba6bd8..c8f941f89412 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json @@ -684,5 +684,72 @@ "label": "javascript/repeaters/js", "compare_all_files": true } + ], + "apps/domain/templates/domain": [ + { + "directories": [ + "bootstrap3", + "bootstrap5" + ], + "file_type": "template", + "label": "domain", + "compare_all_files": true + }, + { + "directories": [ + "admin/bootstrap3", + "admin/bootstrap5" + ], + "file_type": "template", + "label": "domain/admin", + "compare_all_files": true + }, + { + "directories": [ + "admin/partials/bootstrap3", + "admin/partials/bootstrap5" + ], + "file_type": "template", + "label": "domain/admin/partials", + "compare_all_files": true + }, + { + "directories": [ + "email/bootstrap3", + "email/bootstrap5" + ], + "file_type": "template", + "label": "domain/email", + "compare_all_files": true + }, + { + "directories": [ + "partials/bootstrap3", + "partials/bootstrap5" + ], + "file_type": "template", + "label": "domain/partials", + "compare_all_files": true + }, + { + "directories": [ + "pro_bono/bootstrap3", + "pro_bono/bootstrap5" + ], + "file_type": "template", + "label": "domain/pro_bono", + "compare_all_files": true + } + ], + "apps/domain/static/domain/js": [ + { + "directories": [ + "bootstrap3", + "bootstrap5" + ], + "file_type": "javascript", + "label": "javascript/domain/js", + "compare_all_files": true + } ] } From b677f724957d399a412169c8ff1dd083a791ec44 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Thu, 7 Nov 2024 12:06:26 -0500 Subject: [PATCH 062/159] Replaced form-control with form-select This is a standard automated replacement, but I skipped it when running the tool because it was grouped with changing optionsText from 'label' to 'badge' which is incorrect. --- .../domain/admin/bootstrap5/commtrack_action_table.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html index 5cc795aae177..4d297a95e7cc 100644 --- a/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html +++ b/corehq/apps/domain/templates/domain/admin/bootstrap5/commtrack_action_table.html @@ -20,7 +20,7 @@
{# todo B5: css-form-group #} - + From a339c9b26878d806f988dff41e980d83121d6239 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Mon, 11 Nov 2024 20:30:44 +0000 Subject: [PATCH 063/159] "Bootstrap 5 Migration - Rebuilt diffs" --- .../activate_transfer_domain.html.diff.txt | 38 +++ .../admin/calendar_fixture.html.diff.txt | 12 + .../domain/admin/case_search.html.diff.txt | 70 +++++ .../commtrack_action_table.html.diff.txt | 34 +++ .../admin/commtrack_settings.html.diff.txt | 9 + .../domain/admin/edit_alert.html.diff.txt | 17 ++ .../admin/feature_previews.html.diff.txt | 42 +++ .../admin/flags_and_privileges.html.diff.txt | 100 +++++++ .../admin/global_sms_rates.html.diff.txt | 40 +++ .../domain/admin/info_basic.html.diff.txt | 21 ++ .../admin/location_fixture.html.diff.txt | 12 + .../domain/admin/manage_alerts.html.diff.txt | 53 ++++ .../admin/my_project_settings.html.diff.txt | 21 ++ .../case_search_templates.html.diff.txt | 42 +++ .../project_limits_table.html.diff.txt | 22 ++ .../domain/admin/project_limits.html.diff.txt | 15 + .../admin/project_privacy.html.diff.txt | 11 + .../recovery_measures_history.html.diff.txt | 24 ++ .../domain/admin/sms_rates.html.diff.txt | 27 ++ .../domain/admin/sms_settings.html.diff.txt | 11 + .../admin/transfer_domain.html.diff.txt | 23 ++ .../transfer_domain_pending.html.diff.txt | 38 +++ .../domain/base_change_plan.html.diff.txt | 17 ++ .../domain/billing_statements.html.diff.txt | 132 +++++++++ .../domain/confirm_billing_info.html.diff.txt | 36 +++ .../domain/confirm_plan.html.diff.txt | 66 +++++ ...confirm_subscription_renewal.html.diff.txt | 27 ++ .../domain/current_subscription.html.diff.txt | 271 ++++++++++++++++++ .../data_migration_in_progress.html.diff.txt | 8 + .../domain/email/domain_invite.html.diff.txt | 11 + ...cient_privilege_notification.html.diff.txt | 23 ++ .../internal_calculations.html.diff.txt | 32 +++ .../domain/internal_settings.html.diff.txt | 22 ++ ...rnal_subscription_management.html.diff.txt | 28 ++ ...nage_releases_by_app_profile.html.diff.txt | 75 +++++ .../manage_releases_by_location.html.diff.txt | 64 +++++ .../license_explanations.html.diff.txt | 29 ++ .../partials/payment_modal.html.diff.txt | 53 ++++ .../domain/pro_bono/domain.html.diff.txt | 14 + .../pro_bono/page_content.html.diff.txt | 10 + .../domain/pro_bono/static.html.diff.txt | 14 + .../domain/renew_plan.html.diff.txt | 24 ++ .../domain/select.html.diff.txt | 69 +++++ .../domain/select_plan.html.diff.txt | 70 +++++ .../selected_plan_contact.html.diff.txt | 21 ++ .../domain/stripe_cards.html.diff.txt | 82 ++++++ .../domain/tombstone_management.html.diff.txt | 32 +++ .../update_billing_contact_info.html.diff.txt | 27 ++ .../domain/js/billing_statements.js.diff.txt | 16 ++ .../domain/js/case_search.js.diff.txt | 14 + .../domain/js/case_search_main.js.diff.txt | 14 + .../domain/js/info_basic.js.diff.txt | 13 + ...ternal_subscription_management.js.diff.txt | 12 + .../javascript/domain/js/toggles.js.diff.txt | 19 ++ .../update_billing_contact_info.js.diff.txt | 16 ++ 55 files changed, 2043 insertions(+) create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/activate_transfer_domain.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/calendar_fixture.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/case_search.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/commtrack_action_table.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/commtrack_settings.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/edit_alert.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/feature_previews.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/flags_and_privileges.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/global_sms_rates.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/info_basic.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/location_fixture.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/manage_alerts.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/my_project_settings.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/partials/case_search_templates.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/partials/project_limits_table.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/project_limits.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/project_privacy.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/recovery_measures_history.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/sms_rates.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/sms_settings.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/transfer_domain.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/admin/transfer_domain_pending.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/base_change_plan.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/billing_statements.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/confirm_billing_info.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/confirm_plan.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/confirm_subscription_renewal.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/current_subscription.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/data_migration_in_progress.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/email/domain_invite.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/insufficient_privilege_notification.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/internal_calculations.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/internal_settings.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/internal_subscription_management.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/manage_releases_by_app_profile.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/manage_releases_by_location.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/partials/license_explanations.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/partials/payment_modal.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/pro_bono/domain.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/pro_bono/page_content.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/pro_bono/static.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/renew_plan.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/select.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/select_plan.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/selected_plan_contact.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/stripe_cards.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/tombstone_management.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/update_billing_contact_info.html.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/billing_statements.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/case_search.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/case_search_main.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/info_basic.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/internal_subscription_management.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/toggles.js.diff.txt create mode 100644 corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/domain/js/update_billing_contact_info.js.diff.txt diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/activate_transfer_domain.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/activate_transfer_domain.html.diff.txt new file mode 100644 index 000000000000..6de4bc6a522b --- /dev/null +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/domain/activate_transfer_domain.html.diff.txt @@ -0,0 +1,38 @@ +--- ++++ +@@ -1,14 +1,14 @@ +-{% extends 'hqwebapp/bootstrap3/base_navigation.html' %} ++{% extends 'hqwebapp/bootstrap5/base_navigation.html' %} + {% load hq_shared_tags %} + {% load i18n %} + + {% block content %} +
+
+-