From fab5de6a98ad50c39104eed32abde391e239885b Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 15:59:11 +0000 Subject: [PATCH 01/35] "Bootstrap 5 Migration - marking export 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 5ec3f13e4321..3fcf5dcadd51 100644 --- a/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json +++ b/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json @@ -131,5 +131,8 @@ }, "motech.dhis2": { "is_complete": true + }, + "export": { + "in_progress": true } } From 1919bbf00d94a3bcc7b6116b049f53a82964d227 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:10:11 +0000 Subject: [PATCH 02/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/odata_feed_limit_reached_modal.html, splitting templates" --- .../odata_feed_limit_reached_modal.html | 0 .../odata_feed_limit_reached_modal.html | 29 +++++++++++++++++++ .../partials/export_list_controller.html | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/odata_feed_limit_reached_modal.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/odata_feed_limit_reached_modal.html diff --git a/corehq/apps/export/templates/export/partials/odata_feed_limit_reached_modal.html b/corehq/apps/export/templates/export/partials/bootstrap3/odata_feed_limit_reached_modal.html similarity index 100% rename from corehq/apps/export/templates/export/partials/odata_feed_limit_reached_modal.html rename to corehq/apps/export/templates/export/partials/bootstrap3/odata_feed_limit_reached_modal.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/odata_feed_limit_reached_modal.html b/corehq/apps/export/templates/export/partials/bootstrap5/odata_feed_limit_reached_modal.html new file mode 100644 index 000000000000..bf29db0c4874 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/odata_feed_limit_reached_modal.html @@ -0,0 +1,29 @@ +{% load i18n %} + + diff --git a/corehq/apps/export/templates/export/partials/export_list_controller.html b/corehq/apps/export/templates/export/partials/export_list_controller.html index 3afad8e054f9..6ac3a95b884e 100644 --- a/corehq/apps/export/templates/export/partials/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/export_list_controller.html @@ -32,7 +32,7 @@ {% if not odata_feeds_over_limit %} {% include 'export/partials/export_list_create_export_modal.html' %} {% else %} - {% include 'export/partials/odata_feed_limit_reached_modal.html' %} + {% include 'export/partials/bootstrap3/odata_feed_limit_reached_modal.html' %} {% endif %} {% endif %} From 8dde34ae54762a154a3be88bc1f582d36a5fa4ad Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:10:46 +0000 Subject: [PATCH 03/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/export_list_controller.html, splitting templates" --- .../export/templates/export/export_list.html | 2 +- .../export_list_controller.html | 0 .../bootstrap5/export_list_controller.html | 70 +++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/export_list_controller.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html diff --git a/corehq/apps/export/templates/export/export_list.html b/corehq/apps/export/templates/export/export_list.html index 70e69cbbd3a6..6b4249e3f999 100644 --- a/corehq/apps/export/templates/export/export_list.html +++ b/corehq/apps/export/templates/export/export_list.html @@ -40,5 +40,5 @@ {% endif %} - {% include 'export/partials/export_list_controller.html' with is_daily_saved_export=is_daily_saved_export %} + {% include 'export/partials/bootstrap3/export_list_controller.html' with is_daily_saved_export=is_daily_saved_export %} {% endblock %} diff --git a/corehq/apps/export/templates/export/partials/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html similarity index 100% rename from corehq/apps/export/templates/export/partials/export_list_controller.html rename to corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html new file mode 100644 index 000000000000..4bb175a227bd --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html @@ -0,0 +1,70 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} +{% load humanize %} + +{% if request|toggle_enabled:"PAGINATED_EXPORTS" %} +
+ {% blocktrans with max_rows=max_normal_export_size|intcomma %} + These exports are paginated. That means exports that have over {{ max_rows }} rows will be split into multiple files. + {% endblocktrans %} +
+{% endif %} +{% if is_deid %} +

+ {% blocktrans %} + These {{ export_type_plural }} are De-Identified, meaning that + the administrator of this domain has removed all personally-identifying + properties from the exported data. + {% endblocktrans %} +

+{% endif %} +{% if has_edit_permissions %} +
+

+ + + {% blocktrans %} + Add {{ export_type_caps }} + {% endblocktrans %} + +

+ {% if not odata_feeds_over_limit %} + {% include 'export/partials/export_list_create_export_modal.html' %} + {% else %} + {% include 'export/partials/bootstrap5/odata_feed_limit_reached_modal.html' %} + {% endif %} +
+{% endif %} + +
+
{# todo B5: inline style #} + {% if allow_bulk_export %} {# form exports only #} + {% include 'export/partials/export_bulk_notice.html' %} + {% endif %} + {% if has_edit_permissions %} + {% include 'export/partials/delete_bulk_notice.html' %} + {% endif %} +
+
{# todo B5: inline style #} +
{# todo B5: css:panel #} +
+
+ {% include 'export/partials/loading_exports.html' %} + {% include 'export/partials/table.html' %} + +
+
+
+ + {% if export_filter_form %} + {% include 'export/partials/feed_filter_modal.html' %} + {% endif %} +
From 400fd51cf0138b7b88b56d4afd0d0ad9ac599e8d Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:11:21 +0000 Subject: [PATCH 04/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/delete_bulk_notice.html, splitting templates" --- .../{ => bootstrap3}/delete_bulk_notice.html | 0 .../bootstrap3/export_list_controller.html | 2 +- .../bootstrap5/delete_bulk_notice.html | 31 +++++++++++++++++++ .../bootstrap5/export_list_controller.html | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/delete_bulk_notice.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html diff --git a/corehq/apps/export/templates/export/partials/delete_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html similarity index 100% rename from corehq/apps/export/templates/export/partials/delete_bulk_notice.html rename to corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html index 6ac3a95b884e..4930dac07c68 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -43,7 +43,7 @@ {% include 'export/partials/export_bulk_notice.html' %} {% endif %} {% if has_edit_permissions %} - {% include 'export/partials/delete_bulk_notice.html' %} + {% include 'export/partials/bootstrap3/delete_bulk_notice.html' %} {% endif %}
diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html new file mode 100644 index 000000000000..c8d2eceddef0 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html @@ -0,0 +1,31 @@ +{% load i18n %} + diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html index 4bb175a227bd..099ab30d9865 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html @@ -43,7 +43,7 @@ {% include 'export/partials/export_bulk_notice.html' %} {% endif %} {% if has_edit_permissions %} - {% include 'export/partials/delete_bulk_notice.html' %} + {% include 'export/partials/bootstrap5/delete_bulk_notice.html' %} {% endif %}
{# todo B5: inline style #} From 5cab4d439ff2555542666dd20187a0647e202d4f Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:11:49 +0000 Subject: [PATCH 05/35] "Bootstrap 5 Migration - initial auto-migration for export/download_export.html, splitting templates" --- .../{ => bootstrap3}/download_export.html | 0 .../export/bootstrap5/download_export.html | 107 ++++++++++++++++++ corehq/apps/export/views/download.py | 2 +- 3 files changed, 108 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/download_export.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/download_export.html diff --git a/corehq/apps/export/templates/export/download_export.html b/corehq/apps/export/templates/export/bootstrap3/download_export.html similarity index 100% rename from corehq/apps/export/templates/export/download_export.html rename to corehq/apps/export/templates/export/bootstrap3/download_export.html diff --git a/corehq/apps/export/templates/export/bootstrap5/download_export.html b/corehq/apps/export/templates/export/bootstrap5/download_export.html new file mode 100644 index 000000000000..0728b458dd4d --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/download_export.html @@ -0,0 +1,107 @@ +{% extends 'hqwebapp/bootstrap5/base_section.html' %} +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} +{% load compress %} + +{% block stylesheets %} + +{% endblock stylesheets %} + +{% requirejs_main_b5 'export/js/download_export' %} + +{% block page_title %} + {{ current_page.title }} +{% endblock %} + +{% block page_content %} + {% initial_page_data 'export_list' export_list %} + {% initial_page_data 'form_or_case' form_or_case %} + {% initial_page_data 'max_column_size' max_column_size %} + {% initial_page_data 'default_date_range' default_date_range %} + {% initial_page_data 'check_for_multimedia' check_for_multimedia %} + {% initial_page_data 'sms_export' sms_export %} + {% initial_page_data 'user_types' user_types %} + + {% registerurl 'add_export_email_request' domain %} + {% registerurl 'has_multimedia' domain %} + {% registerurl 'poll_custom_export_download' domain %} + {% registerurl 'prepare_custom_export' domain %} + {% registerurl 'prepare_form_multimedia' domain %} + +
+ {% if not sms_export %} +
+ {% blocktrans %} + You are downloading the following exports: + {% endblocktrans %} + +
+ {% endif %} + {% if show_no_submissions_warning %} +
+

+ + {% trans "No submissions available." %} +

+

+ {% blocktrans %} + It seems your project doesn't have any submissions + from its applications. Please submit data before + using the export tool. + {% endblocktrans %} +

+

+ {% blocktrans %} + To get started, please + deploy + your application and submit data from a phone. You may also + submit data via Web Apps + + , depending on your project's + plan level. + {% endblocktrans %} +

+
+ {% else %} + {% include 'export/partials/export_download_prepare.html' %} + {% endif %} +
+ {% include 'export/partials/export_download_progress.html' %} + +{% endblock page_content %} diff --git a/corehq/apps/export/views/download.py b/corehq/apps/export/views/download.py index 0e2515f263c8..d6491f1b24d5 100644 --- a/corehq/apps/export/views/download.py +++ b/corehq/apps/export/views/download.py @@ -149,7 +149,7 @@ def get_export(self, export_id=None): class BaseDownloadExportView(BaseProjectDataView): - template_name = 'export/download_export.html' + template_name = 'export/bootstrap3/download_export.html' http_method_names = ['get', 'post'] show_date_range = False check_for_multimedia = False From 2b67a92c6d282d9c7251d3ce382732d732ef4406 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:13:37 +0000 Subject: [PATCH 06/35] "Bootstrap 5 Migration - initial auto-migration for export/customize_export_new.html, splitting templates" --- .../customize_export_new.html | 0 .../bootstrap5/customize_export_new.html | 356 ++++++++++++++++++ corehq/apps/export/views/new.py | 2 +- 3 files changed, 357 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/customize_export_new.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/customize_export_new.html diff --git a/corehq/apps/export/templates/export/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html similarity index 100% rename from corehq/apps/export/templates/export/customize_export_new.html rename to corehq/apps/export/templates/export/bootstrap3/customize_export_new.html diff --git a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html new file mode 100644 index 000000000000..929a3e4f872d --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html @@ -0,0 +1,356 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} + +{% requirejs_main_b5 'export/js/customize_export_new' %} + +{% block page_content %} + {% initial_page_data 'number_of_apps_to_process' number_of_apps_to_process %} + {% initial_page_data 'format_options' format_options %} + {% initial_page_data 'sharing_options' sharing_options %} + {% initial_page_data 'has_other_owner' has_other_owner %} + {% initial_page_data 'has_daily_saved_export_access' has_daily_saved_export_access %} + {% initial_page_data 'has_excel_dashboard_access' has_excel_dashboard_access %} + {% initial_page_data 'full_path' request.get_full_path %} + {% initial_page_data 'export_instance' export_instance %} + {% initial_page_data 'geo_properties' geo_properties %} + + + {% include "export/partials/new_customize_export_templates.html" %} +{% endblock %} diff --git a/corehq/apps/export/views/new.py b/corehq/apps/export/views/new.py index e4943cf82d4e..f92c11ac1a5d 100644 --- a/corehq/apps/export/views/new.py +++ b/corehq/apps/export/views/new.py @@ -63,7 +63,7 @@ class BaseExportView(BaseProjectDataView): """Base class for all create and edit export views""" - template_name = 'export/customize_export_new.html' + template_name = 'export/bootstrap3/customize_export_new.html' export_type = None metric_name = None # Override is_async = True From e7ba335346b69458b63012df56dd1d3371253cf1 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:14:12 +0000 Subject: [PATCH 07/35] "Bootstrap 5 Migration - initial auto-migration for export/export_list.html, splitting templates" --- .../export/{ => bootstrap3}/export_list.html | 0 .../export/bootstrap5/export_list.html | 44 +++++++++++++++++++ corehq/apps/export/views/list.py | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/export_list.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/export_list.html diff --git a/corehq/apps/export/templates/export/export_list.html b/corehq/apps/export/templates/export/bootstrap3/export_list.html similarity index 100% rename from corehq/apps/export/templates/export/export_list.html rename to corehq/apps/export/templates/export/bootstrap3/export_list.html diff --git a/corehq/apps/export/templates/export/bootstrap5/export_list.html b/corehq/apps/export/templates/export/bootstrap5/export_list.html new file mode 100644 index 000000000000..570eab1b9c7f --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/export_list.html @@ -0,0 +1,44 @@ +{% extends 'hqwebapp/bootstrap3/base_section.html' %} +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} +{% load compress %} + +{% requirejs_main_b5 'export/js/export_list_main' %} + +{% block page_title %} + {{ current_page.title }} +{% endblock %} + +{% block page_content %} + {% initial_page_data 'bulk_download_url' bulk_download_url %} + {% initial_page_data 'exports' exports %} + {% initial_page_data 'export_type_caps_plural' export_type_caps_plural %} + {% initial_page_data 'is_daily_saved_export' is_daily_saved_export|default:False %} + {% initial_page_data 'is_deid' is_deid %} + {% initial_page_data 'is_feed' is_feed|default:False %} + {% initial_page_data 'is_odata' is_odata|default:False %} + {% initial_page_data 'model_type' model_type %} + {% initial_page_data 'my_export_type' my_export_type %} + {% initial_page_data 'shared_export_type' shared_export_type %} + {% initial_page_data 'static_model_type' static_model_type %} + {% initial_page_data 'domain' domain %} + {% initial_page_data 'export_ownership_enabled' export_ownership_enabled %} + {% registerurl 'commit_filters' domain %} + {% registerurl 'get_app_data_drilldown_values' domain %} + {% registerurl 'get_exports_page' domain %} + {% registerurl 'get_saved_export_progress' domain %} + {% registerurl 'submit_app_data_drilldown_form' domain %} + {% registerurl 'toggle_saved_export_enabled' domain %} + {% registerurl 'update_emailed_export_data' domain %} + +

{{ lead_text }}

+ + {% if is_odata %} +
+ +
+ {% endif %} + + {% include 'export/partials/bootstrap5/export_list_controller.html' with is_daily_saved_export=is_daily_saved_export %} +{% endblock %} diff --git a/corehq/apps/export/views/list.py b/corehq/apps/export/views/list.py index 9de8a6766417..3e81fcc311c8 100644 --- a/corehq/apps/export/views/list.py +++ b/corehq/apps/export/views/list.py @@ -496,7 +496,7 @@ def create_export_form(self): class BaseExportListView(BaseProjectDataView): - template_name = 'export/export_list.html' + template_name = 'export/bootstrap3/export_list.html' lead_text = mark_safe(gettext_lazy( # nosec: no user input ''' Exports are a way to download data in a variety of formats (CSV, Excel, etc.) From 589658070192702c86ef75b5ffc5ce6ae041cc3c Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:14:27 +0000 Subject: [PATCH 08/35] "Bootstrap 5 Migration - initial auto-migration for export/dialogs/process_deprecated_properties.html, splitting templates" --- .../bootstrap3/customize_export_new.html | 2 +- .../bootstrap5/customize_export_new.html | 2 +- .../process_deprecated_properties.html | 0 .../process_deprecated_properties.html | 33 +++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/dialogs/{ => bootstrap3}/process_deprecated_properties.html (100%) create mode 100644 corehq/apps/export/templates/export/dialogs/bootstrap5/process_deprecated_properties.html diff --git a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html index 857425601a48..bf75da725c89 100644 --- a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html @@ -348,7 +348,7 @@
{% include "export/dialogs/process_deleted_questions.html" %} - {% include "export/dialogs/process_deprecated_properties.html" %} + {% include "export/dialogs/bootstrap3/process_deprecated_properties.html" %} diff --git a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html index 929a3e4f872d..995955fd6e94 100644 --- a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html @@ -348,7 +348,7 @@ {% include "export/dialogs/process_deleted_questions.html" %} - {% include "export/dialogs/process_deprecated_properties.html" %} + {% include "export/dialogs/bootstrap5/process_deprecated_properties.html" %} diff --git a/corehq/apps/export/templates/export/dialogs/process_deprecated_properties.html b/corehq/apps/export/templates/export/dialogs/bootstrap3/process_deprecated_properties.html similarity index 100% rename from corehq/apps/export/templates/export/dialogs/process_deprecated_properties.html rename to corehq/apps/export/templates/export/dialogs/bootstrap3/process_deprecated_properties.html diff --git a/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deprecated_properties.html b/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deprecated_properties.html new file mode 100644 index 000000000000..2788b8c249b8 --- /dev/null +++ b/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deprecated_properties.html @@ -0,0 +1,33 @@ +{% load hq_shared_tags %} +{% load i18n %} + From 689edbfe4524759a4aa5fde9e4b8743b091127c2 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:15:01 +0000 Subject: [PATCH 09/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/export_download_prepare.html, splitting templates" --- .../export/bootstrap3/download_export.html | 2 +- .../export/bootstrap5/download_export.html | 2 +- .../export_download_prepare.html | 0 .../bootstrap5/export_download_prepare.html | 57 +++++++++++++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/export_download_prepare.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/export_download_prepare.html diff --git a/corehq/apps/export/templates/export/bootstrap3/download_export.html b/corehq/apps/export/templates/export/bootstrap3/download_export.html index a9f968f38e24..e0abb16bfffc 100644 --- a/corehq/apps/export/templates/export/bootstrap3/download_export.html +++ b/corehq/apps/export/templates/export/bootstrap3/download_export.html @@ -99,7 +99,7 @@

{% else %} - {% include 'export/partials/export_download_prepare.html' %} + {% include 'export/partials/bootstrap3/export_download_prepare.html' %} {% endif %} {% include 'export/partials/export_download_progress.html' %} diff --git a/corehq/apps/export/templates/export/bootstrap5/download_export.html b/corehq/apps/export/templates/export/bootstrap5/download_export.html index 0728b458dd4d..5bf0ebce4952 100644 --- a/corehq/apps/export/templates/export/bootstrap5/download_export.html +++ b/corehq/apps/export/templates/export/bootstrap5/download_export.html @@ -99,7 +99,7 @@

{% else %} - {% include 'export/partials/export_download_prepare.html' %} + {% include 'export/partials/bootstrap5/export_download_prepare.html' %} {% endif %} {% include 'export/partials/export_download_progress.html' %} diff --git a/corehq/apps/export/templates/export/partials/export_download_prepare.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_download_prepare.html similarity index 100% rename from corehq/apps/export/templates/export/partials/export_download_prepare.html rename to corehq/apps/export/templates/export/partials/bootstrap3/export_download_prepare.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_download_prepare.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_download_prepare.html new file mode 100644 index 000000000000..b4b539ea2472 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_download_prepare.html @@ -0,0 +1,57 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} + +
+
+ {% if dynamic_filters %} +
{# IMPORTANT: needed because some of the dynamic_filters have their own ko bindings #} + {{ dynamic_filters }} +
+ {% endif %} + {% crispy download_export_form %} {# todo B5: check crispy #} +
+
+
+
+ + {% trans "Filters inactive while download in progress. " %} +
+
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+
+
From 9344d0376cb0dde193299be0e907251ea58539db Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:17:36 +0000 Subject: [PATCH 10/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/export_download_progress.html, splitting templates" --- .../export/bootstrap3/download_export.html | 2 +- .../export/bootstrap5/download_export.html | 2 +- .../export_download_progress.html | 0 .../bootstrap5/export_download_progress.html | 78 +++++++++++++++++++ 4 files changed, 80 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/export_download_progress.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/export_download_progress.html diff --git a/corehq/apps/export/templates/export/bootstrap3/download_export.html b/corehq/apps/export/templates/export/bootstrap3/download_export.html index e0abb16bfffc..e8d7bf7641a5 100644 --- a/corehq/apps/export/templates/export/bootstrap3/download_export.html +++ b/corehq/apps/export/templates/export/bootstrap3/download_export.html @@ -102,6 +102,6 @@

{% include 'export/partials/bootstrap3/export_download_prepare.html' %} {% endif %} - {% include 'export/partials/export_download_progress.html' %} + {% include 'export/partials/bootstrap3/export_download_progress.html' %} {% endblock page_content %} diff --git a/corehq/apps/export/templates/export/bootstrap5/download_export.html b/corehq/apps/export/templates/export/bootstrap5/download_export.html index 5bf0ebce4952..4b3d1211ac82 100644 --- a/corehq/apps/export/templates/export/bootstrap5/download_export.html +++ b/corehq/apps/export/templates/export/bootstrap5/download_export.html @@ -102,6 +102,6 @@

{% include 'export/partials/bootstrap5/export_download_prepare.html' %} {% endif %} - {% include 'export/partials/export_download_progress.html' %} + {% include 'export/partials/bootstrap5/export_download_progress.html' %} {% endblock page_content %} diff --git a/corehq/apps/export/templates/export/partials/export_download_progress.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_download_progress.html similarity index 100% rename from corehq/apps/export/templates/export/partials/export_download_progress.html rename to corehq/apps/export/templates/export/partials/bootstrap3/export_download_progress.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_download_progress.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_download_progress.html new file mode 100644 index 000000000000..33a55bda96f9 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_download_progress.html @@ -0,0 +1,78 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} + +
+
+
+
+
+
+ + + +

+ {% blocktrans %} + If the problem persists, please + Report an Issue. + {% endblocktrans %} +

+
+
+
+
+
+
{# todo B5: css:form-inline #} + {% csrf_token %} + + + {% trans "Download" %} + {% trans "Download Multimedia" %} + + + +
+
+
+
{# todo B5: css:progress #} +
+ + % {# todo B5: css:progress #} + {% trans 'Complete' %} + +
+
+
+ + {% trans "Something went wrong!" %} + +
+
+
+ +
+
+
+
+
From cec758f5b901ba36181a1d767de9497916f5e67a Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:18:17 +0000 Subject: [PATCH 11/35] "Bootstrap 5 Migration - initial auto-migration for export/datasource_export_view.html, splitting templates" --- .../datasource_export_view.html | 0 .../bootstrap5/datasource_export_view.html | 27 +++++++++++++++++++ corehq/apps/export/views/download.py | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/datasource_export_view.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/datasource_export_view.html diff --git a/corehq/apps/export/templates/export/datasource_export_view.html b/corehq/apps/export/templates/export/bootstrap3/datasource_export_view.html similarity index 100% rename from corehq/apps/export/templates/export/datasource_export_view.html rename to corehq/apps/export/templates/export/bootstrap3/datasource_export_view.html diff --git a/corehq/apps/export/templates/export/bootstrap5/datasource_export_view.html b/corehq/apps/export/templates/export/bootstrap5/datasource_export_view.html new file mode 100644 index 000000000000..297dba911202 --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/datasource_export_view.html @@ -0,0 +1,27 @@ +{% extends 'hqwebapp/bootstrap3/base_section.html' %} +{% load crispy_forms_tags %} +{% load i18n %} +{% load compress %} +{% load hq_shared_tags %} + +{% requirejs_main_b5 'export/js/datasource_export' %} + +{% block page_title %} +{% trans "Export Data Source Data" %} +{% endblock %} + +{% block page_content %} +

+ {% blocktrans %} + Generate a query file for the Data Export Tool from any of the project's data sources. + {% endblocktrans %} +

+
+
+ {% blocktrans %} + The project has no data sources configured. + {% endblocktrans %} +
+ {% crispy form %} {# todo B5: check crispy #} +
+{% endblock %} diff --git a/corehq/apps/export/views/download.py b/corehq/apps/export/views/download.py index d6491f1b24d5..a221b67177fa 100644 --- a/corehq/apps/export/views/download.py +++ b/corehq/apps/export/views/download.py @@ -528,7 +528,7 @@ def parent_pages(self): class DownloadNewDatasourceExportView(BaseProjectDataView): urlname = "data_export_page" page_title = gettext_noop("Export Data Source Data") - template_name = 'export/datasource_export_view.html' + template_name = 'export/bootstrap3/datasource_export_view.html' def dispatch(self, *args, **kwargs): if not EXPORT_DATA_SOURCE_DATA.enabled(self.domain): From 1ddde0784dc1a5d26734b737beb5180d79e2ed09 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:21:34 +0000 Subject: [PATCH 12/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/new_customize_export_templates.html, splitting templates" --- .../bootstrap3/customize_export_new.html | 2 +- .../bootstrap5/customize_export_new.html | 2 +- .../new_customize_export_templates.html | 0 .../new_customize_export_templates.html | 448 ++++++++++++++++++ 4 files changed, 450 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/new_customize_export_templates.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/new_customize_export_templates.html diff --git a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html index bf75da725c89..1fe33dab4c51 100644 --- a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html @@ -352,5 +352,5 @@ - {% include "export/partials/new_customize_export_templates.html" %} + {% include "export/partials/bootstrap3/new_customize_export_templates.html" %} {% endblock %} diff --git a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html index 995955fd6e94..9c3da1af6f24 100644 --- a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html @@ -352,5 +352,5 @@ - {% include "export/partials/new_customize_export_templates.html" %} + {% include "export/partials/bootstrap5/new_customize_export_templates.html" %} {% endblock %} diff --git a/corehq/apps/export/templates/export/partials/new_customize_export_templates.html b/corehq/apps/export/templates/export/partials/bootstrap3/new_customize_export_templates.html similarity index 100% rename from corehq/apps/export/templates/export/partials/new_customize_export_templates.html rename to corehq/apps/export/templates/export/partials/bootstrap3/new_customize_export_templates.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/new_customize_export_templates.html b/corehq/apps/export/templates/export/partials/bootstrap5/new_customize_export_templates.html new file mode 100644 index 000000000000..e2504697cee8 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/new_customize_export_templates.html @@ -0,0 +1,448 @@ +{% load hq_shared_tags %} +{% load i18n %} + + + From 2c22f4b4049662177d9199be9a70a14ce4785785 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:22:05 +0000 Subject: [PATCH 13/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/export_list_create_export_modal.html, splitting templates" --- .../bootstrap3/export_list_controller.html | 2 +- .../export_list_create_export_modal.html | 0 .../bootstrap5/export_list_controller.html | 2 +- .../export_list_create_export_modal.html | 116 ++++++++++++++++++ 4 files changed, 118 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/export_list_create_export_modal.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/export_list_create_export_modal.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html index 4930dac07c68..8dac09ef13b0 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -30,7 +30,7 @@

{% if not odata_feeds_over_limit %} - {% include 'export/partials/export_list_create_export_modal.html' %} + {% include 'export/partials/bootstrap3/export_list_create_export_modal.html' %} {% else %} {% include 'export/partials/bootstrap3/odata_feed_limit_reached_modal.html' %} {% endif %} diff --git a/corehq/apps/export/templates/export/partials/export_list_create_export_modal.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_create_export_modal.html similarity index 100% rename from corehq/apps/export/templates/export/partials/export_list_create_export_modal.html rename to corehq/apps/export/templates/export/partials/bootstrap3/export_list_create_export_modal.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html index 099ab30d9865..d804dcb4fc90 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html @@ -30,7 +30,7 @@

{% if not odata_feeds_over_limit %} - {% include 'export/partials/export_list_create_export_modal.html' %} + {% include 'export/partials/bootstrap5/export_list_create_export_modal.html' %} {% else %} {% include 'export/partials/bootstrap5/odata_feed_limit_reached_modal.html' %} {% endif %} diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_create_export_modal.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_create_export_modal.html new file mode 100644 index 000000000000..1f54da3a978f --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_create_export_modal.html @@ -0,0 +1,116 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} + + From 41faae9af0c45e8428ab792c095e451ac168c2ee Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:25:09 +0000 Subject: [PATCH 14/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/table.html, splitting templates" --- .../bootstrap3/export_list_controller.html | 2 +- .../partials/{ => bootstrap3}/table.html | 0 .../bootstrap5/export_list_controller.html | 2 +- .../export/partials/bootstrap5/table.html | 713 ++++++++++++++++++ 4 files changed, 715 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/table.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/table.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html index 8dac09ef13b0..da09c9d35691 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -51,7 +51,7 @@
{% include 'export/partials/loading_exports.html' %} - {% include 'export/partials/table.html' %} + {% include 'export/partials/bootstrap3/table.html' %}
{% include 'export/partials/loading_exports.html' %} - {% include 'export/partials/table.html' %} + {% include 'export/partials/bootstrap5/table.html' %} + + + {% if has_edit_permissions or allow_bulk_export %} + + {% blocktrans %}Select{% endblocktrans %} +
+ + {%trans 'or'%} + + + {% endif %} + + {% trans 'Name' %} + + + {% if model_type == "case" %} + + {% trans 'Case Type' %} + + {% endif %} + + + {% if export_filter_form %} + {% if has_edit_permissions %} + {% trans "Filters and Files" %} + {% endif %} + {% else %} + {{ export_type_caps }} + {% endif %} + + + {% if is_daily_saved_export %} + {% trans "Enable/Disable" %} + {% endif %} + + {% if has_edit_permissions %} + + {% if is_daily_saved_export %} + {% trans "Edit Columns" %} + {% elif not is_odata %} + {% trans 'Edit' %} + {% else %} + {% blocktrans %} + Copy & Edit Feed + {% endblocktrans %} + {% endif %} + + + {% trans 'Delete' %} + + {% endif %} + + {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} + + + {% trans "Share" %} + + + {% trans "Shared By" %} + + + {% endif %} + + + + + {% if has_edit_permissions or allow_bulk_export %} + +
{# todo B5: css:checkbox #} + +
+ + {% endif %} + +

+ + +

+

+ + + {% trans 'Form:' %} + + +

+ + +
+ + {% blocktrans %} + This export is filtered to data you don't have access to. + {% endblocktrans %} +
+ + + + +

+

+

+ + +

+ + + + {% trans "Show additional feeds for Repeat Group data." %} + + + {% trans "Show additional feeds for linking Parent and Child Cases." %} + + +

+ + + + + +

+ + {% blocktrans %} + Automatic updates for this saved {{ export_type }} have been disabled. Click 'Enable' + to re-enable automatic updates. + {% endblocktrans %} +

+ + +
+
+ + + {% trans "Size:" %} + + + + {% trans "Last Updated:" %} + + + + + + {% trans "Just now" %}    + + + {% trans "Last Downloaded:" %} + + + {% if request|toggle_enabled:"SUPPORT" %} + + + {% trans "Last Build Duration:" %} + + + + {% endif %} + +    +
+ + +
+
{# todo B5: css:progress #} +
+
+
+
+
+
+ + + +
+

+ + {% blocktrans %} + This saved {{ export_type }} has expired because it has not been used in + the last 35 days. To renew daily updates, click the 'Update Data' + button and download the file. + {% endblocktrans %} +

+ +

+ + {% blocktrans with max_rows=max_daily_export_size|intcomma %} + Your export exceeds the limit of {{ max_rows }} rows. Please see documentation for more information. + {% endblocktrans %} +

+ +

+ + + {% trans "Data update complete" %} + +

+ +

+ + + {% trans "Data update failed!" %} + + {% blocktrans %} + If this problem persists, please Report an Issue. + {% endblocktrans %} +

+ +
+ +
+
+
+ + +
+ + + {% blocktrans %} + No data is available yet. + {% endblocktrans %} + +
+ {% blocktrans %} + Please click 'update data' if the automatic scheduler hasn't picked up the changes in a while. + {% endblocktrans %} + +
+ + +
+
+ + + {% if model_type == "case" %} + +

{# todo B5: inline style #} + {% trans "deprecated" %} {# todo B5: inline style #} + + {% endif %} + + + + {{ export_type_caps }} + + {% if has_edit_permissions %} + + + {% trans "Edit Filters" %} + + {% endif %} + {% trans "Download a Data Export Tool configuration file for this export" as det_help %} + + + {% trans "DET Config" %} + + + + {% if is_daily_saved_export %} + + + + + {% trans "Enable" %} + + + {% trans "Disable" %} + + + + + {% endif %} + + {% if has_edit_permissions %} + + + + + +
+ + + {% trans 'Delete' %} + + {% include "export/dialogs/delete_custom_export_dialog.html" %} +
+ + {% endif %} + + {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} + +
+
+ {% trans 'Private' %} +
+
+ {% trans 'Export Only' %} +
+
+ {% trans 'Edit & Export' %} +
+
+
+
+
+ {% trans 'Unknown' %} +
+
+
+
+ + {% endif %} + + + + From 5bfc72d10c0736b2057d7c9d5a957f7e0d6e7c33 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:25:40 +0000 Subject: [PATCH 15/35] "Bootstrap 5 Migration - initial auto-migration for export/dialogs/bulk_delete_custom_export_dialog.html, splitting templates" --- .../bulk_delete_custom_export_dialog.html | 0 .../bulk_delete_custom_export_dialog.html | 91 +++++++++++++++++++ .../bootstrap3/delete_bulk_notice.html | 2 +- .../bootstrap5/delete_bulk_notice.html | 2 +- 4 files changed, 93 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/dialogs/{ => bootstrap3}/bulk_delete_custom_export_dialog.html (100%) create mode 100644 corehq/apps/export/templates/export/dialogs/bootstrap5/bulk_delete_custom_export_dialog.html diff --git a/corehq/apps/export/templates/export/dialogs/bulk_delete_custom_export_dialog.html b/corehq/apps/export/templates/export/dialogs/bootstrap3/bulk_delete_custom_export_dialog.html similarity index 100% rename from corehq/apps/export/templates/export/dialogs/bulk_delete_custom_export_dialog.html rename to corehq/apps/export/templates/export/dialogs/bootstrap3/bulk_delete_custom_export_dialog.html diff --git a/corehq/apps/export/templates/export/dialogs/bootstrap5/bulk_delete_custom_export_dialog.html b/corehq/apps/export/templates/export/dialogs/bootstrap5/bulk_delete_custom_export_dialog.html new file mode 100644 index 000000000000..3f6fc06b352f --- /dev/null +++ b/corehq/apps/export/templates/export/dialogs/bootstrap5/bulk_delete_custom_export_dialog.html @@ -0,0 +1,91 @@ +{% load hq_shared_tags %} +{% load i18n %} + diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html index 098c0179a2e0..705bdbf71e91 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/delete_bulk_notice.html @@ -25,7 +25,7 @@ - {% include "export/dialogs/bulk_delete_custom_export_dialog.html" %} + {% include "export/dialogs/bootstrap3/bulk_delete_custom_export_dialog.html" %}

diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html index c8d2eceddef0..6674fc6cf3f5 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html @@ -25,7 +25,7 @@ - {% include "export/dialogs/bulk_delete_custom_export_dialog.html" %} + {% include "export/dialogs/bootstrap5/bulk_delete_custom_export_dialog.html" %}

From 7ca3d07b6eff99a33df7946d2027a27d710b7d50 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:25:53 +0000 Subject: [PATCH 16/35] "Bootstrap 5 Migration - initial auto-migration for export/dialogs/delete_custom_export_dialog.html, splitting templates" --- .../delete_custom_export_dialog.html | 0 .../delete_custom_export_dialog.html | 48 +++++++++++++++++++ .../export/partials/bootstrap3/table.html | 2 +- .../export/partials/bootstrap5/table.html | 2 +- 4 files changed, 50 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/dialogs/{ => bootstrap3}/delete_custom_export_dialog.html (100%) create mode 100644 corehq/apps/export/templates/export/dialogs/bootstrap5/delete_custom_export_dialog.html diff --git a/corehq/apps/export/templates/export/dialogs/delete_custom_export_dialog.html b/corehq/apps/export/templates/export/dialogs/bootstrap3/delete_custom_export_dialog.html similarity index 100% rename from corehq/apps/export/templates/export/dialogs/delete_custom_export_dialog.html rename to corehq/apps/export/templates/export/dialogs/bootstrap3/delete_custom_export_dialog.html diff --git a/corehq/apps/export/templates/export/dialogs/bootstrap5/delete_custom_export_dialog.html b/corehq/apps/export/templates/export/dialogs/bootstrap5/delete_custom_export_dialog.html new file mode 100644 index 000000000000..8ea017321807 --- /dev/null +++ b/corehq/apps/export/templates/export/dialogs/bootstrap5/delete_custom_export_dialog.html @@ -0,0 +1,48 @@ +{% load hq_shared_tags %} +{% load i18n %} + diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/table.html b/corehq/apps/export/templates/export/partials/bootstrap3/table.html index de75713471f3..fa8b943838e7 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/table.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/table.html @@ -678,7 +678,7 @@

{% trans 'Delete' %} - {% include "export/dialogs/delete_custom_export_dialog.html" %} + {% include "export/dialogs/bootstrap3/delete_custom_export_dialog.html" %} {% endif %} diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/table.html b/corehq/apps/export/templates/export/partials/bootstrap5/table.html index b0afda2b69e4..a6d89ac09155 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/table.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/table.html @@ -678,7 +678,7 @@

{# todo B5 {% trans 'Delete' %} - {% include "export/dialogs/delete_custom_export_dialog.html" %} + {% include "export/dialogs/bootstrap5/delete_custom_export_dialog.html" %} {% endif %} From 34736a3af6eea611e5e09511a9d786af965f0d56 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:26:15 +0000 Subject: [PATCH 17/35] "Bootstrap 5 Migration - initial auto-migration for export/dialogs/process_deleted_questions.html, splitting templates" --- .../bootstrap3/customize_export_new.html | 2 +- .../bootstrap5/customize_export_new.html | 2 +- .../process_deleted_questions.html | 0 .../bootstrap5/process_deleted_questions.html | 56 +++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/dialogs/{ => bootstrap3}/process_deleted_questions.html (100%) create mode 100644 corehq/apps/export/templates/export/dialogs/bootstrap5/process_deleted_questions.html diff --git a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html index 1fe33dab4c51..44d3ea6dbfb9 100644 --- a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html @@ -347,7 +347,7 @@ {% trans "There are errors with your configuration. Please fix them before creating the export." %} - {% include "export/dialogs/process_deleted_questions.html" %} + {% include "export/dialogs/bootstrap3/process_deleted_questions.html" %} {% include "export/dialogs/bootstrap3/process_deprecated_properties.html" %} diff --git a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html index 9c3da1af6f24..56a635d19428 100644 --- a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html @@ -347,7 +347,7 @@ {% trans "There are errors with your configuration. Please fix them before creating the export." %} - {% include "export/dialogs/process_deleted_questions.html" %} + {% include "export/dialogs/bootstrap5/process_deleted_questions.html" %} {% include "export/dialogs/bootstrap5/process_deprecated_properties.html" %} diff --git a/corehq/apps/export/templates/export/dialogs/process_deleted_questions.html b/corehq/apps/export/templates/export/dialogs/bootstrap3/process_deleted_questions.html similarity index 100% rename from corehq/apps/export/templates/export/dialogs/process_deleted_questions.html rename to corehq/apps/export/templates/export/dialogs/bootstrap3/process_deleted_questions.html diff --git a/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deleted_questions.html b/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deleted_questions.html new file mode 100644 index 000000000000..3ec569aca543 --- /dev/null +++ b/corehq/apps/export/templates/export/dialogs/bootstrap5/process_deleted_questions.html @@ -0,0 +1,56 @@ +{% load hq_shared_tags %} +{% load i18n %} + From 2caf5bdfad649c8584b6515c96b1886d64c909fe Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:27:46 +0000 Subject: [PATCH 18/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/feed_filter_modal.html, splitting templates" --- .../bootstrap3/export_list_controller.html | 2 +- .../{ => bootstrap3}/feed_filter_modal.html | 0 .../bootstrap5/export_list_controller.html | 2 +- .../bootstrap5/feed_filter_modal.html | 49 +++++++++++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/feed_filter_modal.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/feed_filter_modal.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html index da09c9d35691..aff4b7e743e0 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -65,6 +65,6 @@ {% if export_filter_form %} - {% include 'export/partials/feed_filter_modal.html' %} + {% include 'export/partials/bootstrap3/feed_filter_modal.html' %} {% endif %} diff --git a/corehq/apps/export/templates/export/partials/feed_filter_modal.html b/corehq/apps/export/templates/export/partials/bootstrap3/feed_filter_modal.html similarity index 100% rename from corehq/apps/export/templates/export/partials/feed_filter_modal.html rename to corehq/apps/export/templates/export/partials/bootstrap3/feed_filter_modal.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html index e2105e9541a8..48a52caf5608 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html @@ -65,6 +65,6 @@ {% if export_filter_form %} - {% include 'export/partials/feed_filter_modal.html' %} + {% include 'export/partials/bootstrap5/feed_filter_modal.html' %} {% endif %} diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/feed_filter_modal.html b/corehq/apps/export/templates/export/partials/bootstrap5/feed_filter_modal.html new file mode 100644 index 000000000000..64bd99d79ec1 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/feed_filter_modal.html @@ -0,0 +1,49 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} + + From 2673272202a2468120e83d1e6b55c4a12876b773 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:28:49 +0000 Subject: [PATCH 19/35] "Bootstrap 5 Migration - initial auto-migration for export/download_data_files.html, splitting templates" --- .../{ => bootstrap3}/download_data_files.html | 0 .../bootstrap5/download_data_files.html | 123 ++++++++++++++++++ corehq/apps/export/views/utils.py | 2 +- 3 files changed, 124 insertions(+), 1 deletion(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/download_data_files.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/download_data_files.html diff --git a/corehq/apps/export/templates/export/download_data_files.html b/corehq/apps/export/templates/export/bootstrap3/download_data_files.html similarity index 100% rename from corehq/apps/export/templates/export/download_data_files.html rename to corehq/apps/export/templates/export/bootstrap3/download_data_files.html diff --git a/corehq/apps/export/templates/export/bootstrap5/download_data_files.html b/corehq/apps/export/templates/export/bootstrap5/download_data_files.html new file mode 100644 index 000000000000..485427672a07 --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/download_data_files.html @@ -0,0 +1,123 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} +{% load compress %} + +{% block title %}{% trans "Download Files" %}{% endblock %} + + +{% requirejs_main_b5 'export/js/download_data_files' %} + + +{% block page_content %} + {% registerurl 'download_data_file' domain '---' '---' %} + {% block main_column_content %} + +

{% trans "Download Files" %}

+ + {% if data_files %} +
+
+ + {% for data_file in data_files %} + + + + + + + {% endfor %} +
+ + + {{ data_file.filename }} + + + {{ data_file.description }} + {# todo B5: inline style #} + + {% trans "Available until" %}: {{ data_file.delete_after|to_user_time:request }} + {# todo B5: inline style #} + + + + + + + + + {% if is_admin %} + + + + {% endif %} +
+
+
+ {% else %} +

{% trans "There are no data files available to download at the moment." %}

+ {% endif %} + + {% if is_admin %} +
+
+
+
+ {% csrf_token %} +
+ {% trans "Upload file for transfer" %} + +
{# todo B5: css:form-group #} + +
+ +
+
+ +
{# todo B5: css:form-group #} + +
+ +
+
+ +
{# todo B5: css:form-group #} + +
+ +
+
+ +
+ +
+
+
+ {% endif %} + + {% endblock main_column_content %} +{% endblock %} diff --git a/corehq/apps/export/views/utils.py b/corehq/apps/export/views/utils.py index 3ba95e4f56c2..89bfb95ec669 100644 --- a/corehq/apps/export/views/utils.py +++ b/corehq/apps/export/views/utils.py @@ -312,7 +312,7 @@ class DashboardFeedPaywall(BaseProjectDataView): @method_decorator(login_and_domain_required, name='dispatch') class DataFileDownloadList(BaseProjectDataView): urlname = 'download_data_files' - template_name = 'export/download_data_files.html' + template_name = 'export/bootstrap3/download_data_files.html' page_title = gettext_lazy("Secure File Transfer") def dispatch(self, request, *args, **kwargs): From e64892a32f15a13e50967f565d1b68b400767df2 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:30:56 +0000 Subject: [PATCH 20/35] "Bootstrap 5 Migration - initial auto-migration for export/partials/export_bulk_notice.html, splitting templates" --- .../{ => bootstrap3}/export_bulk_notice.html | 0 .../bootstrap3/export_list_controller.html | 2 +- .../bootstrap5/export_bulk_notice.html | 24 +++++++++++++++++++ .../bootstrap5/export_list_controller.html | 2 +- 4 files changed, 26 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/partials/{ => bootstrap3}/export_bulk_notice.html (100%) create mode 100644 corehq/apps/export/templates/export/partials/bootstrap5/export_bulk_notice.html diff --git a/corehq/apps/export/templates/export/partials/export_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_bulk_notice.html similarity index 100% rename from corehq/apps/export/templates/export/partials/export_bulk_notice.html rename to corehq/apps/export/templates/export/partials/bootstrap3/export_bulk_notice.html diff --git a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html index aff4b7e743e0..9a3f85ca71b4 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -40,7 +40,7 @@
{% if allow_bulk_export %} {# form exports only #} - {% include 'export/partials/export_bulk_notice.html' %} + {% include 'export/partials/bootstrap3/export_bulk_notice.html' %} {% endif %} {% if has_edit_permissions %} {% include 'export/partials/bootstrap3/delete_bulk_notice.html' %} diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_bulk_notice.html new file mode 100644 index 000000000000..f61a90c0bbbc --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_bulk_notice.html @@ -0,0 +1,24 @@ +{% load i18n %} +
{# todo B5: inline style #} +
+ {% csrf_token %} +
{# todo B5: inline style #} + + +
+
+
+ + diff --git a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html index 48a52caf5608..f35a4f2ae71f 100644 --- a/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap5/export_list_controller.html @@ -40,7 +40,7 @@
{# todo B5: inline style #} {% if allow_bulk_export %} {# form exports only #} - {% include 'export/partials/export_bulk_notice.html' %} + {% include 'export/partials/bootstrap5/export_bulk_notice.html' %} {% endif %} {% if has_edit_permissions %} {% include 'export/partials/bootstrap5/delete_bulk_notice.html' %} From dcc689e1090126c55a5fcaf013fc4f59f15a9b3c Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:31:11 +0000 Subject: [PATCH 21/35] "Bootstrap 5 Migration - initial auto-migration for export/paywall.html, splitting templates" --- .../export/{ => bootstrap3}/paywall.html | 0 .../templates/export/bootstrap5/paywall.html | 37 +++++++++++++++++++ corehq/apps/export/views/utils.py | 4 +- 3 files changed, 39 insertions(+), 2 deletions(-) rename corehq/apps/export/templates/export/{ => bootstrap3}/paywall.html (100%) create mode 100644 corehq/apps/export/templates/export/bootstrap5/paywall.html diff --git a/corehq/apps/export/templates/export/paywall.html b/corehq/apps/export/templates/export/bootstrap3/paywall.html similarity index 100% rename from corehq/apps/export/templates/export/paywall.html rename to corehq/apps/export/templates/export/bootstrap3/paywall.html diff --git a/corehq/apps/export/templates/export/bootstrap5/paywall.html b/corehq/apps/export/templates/export/bootstrap5/paywall.html new file mode 100644 index 000000000000..85d1f11f7850 --- /dev/null +++ b/corehq/apps/export/templates/export/bootstrap5/paywall.html @@ -0,0 +1,37 @@ +{% extends "hqwebapp/bootstrap5/base_section.html" %} +{% load hq_shared_tags %} +{% load i18n %} +{% load compress %} + +{% block title %}{% trans "Share Daily Data with Excel and Other Systems" %}{% endblock %} + +{% block page_content %} + {% block main_column_content %} +
+
+
+

+ {% blocktrans %} + Share Daily Data with Excel and Other Systems + {% endblocktrans%} +

+

+ {% blocktrans %} + CommCare can automatically generate an Excel Dashboard Feed or a saved export, allowing you to easily + analyze and build reports for your project in Excel or another system. These feeds and exports are + updated on a daily-basis with new data and can be filtered to data from a specific set of users or + locations. Excel Dashboard Feeds and Daily Saved Exports are available on the Standard or + higher software plans. + {% endblocktrans %} +

+ + {% trans "Learn More About Pricing Plans" %} + + + {% trans "Change My Subscription" %} + +
+
+
+ {% endblock main_column_content %} +{% endblock %} diff --git a/corehq/apps/export/views/utils.py b/corehq/apps/export/views/utils.py index 89bfb95ec669..9c39a0026513 100644 --- a/corehq/apps/export/views/utils.py +++ b/corehq/apps/export/views/utils.py @@ -300,12 +300,12 @@ def post(self, request, *args, **kwargs): class DailySavedExportPaywall(BaseProjectDataView): urlname = 'daily_saved_paywall' - template_name = 'export/paywall.html' + template_name = 'export/bootstrap3/paywall.html' class DashboardFeedPaywall(BaseProjectDataView): urlname = 'dashboard_feeds_paywall' - template_name = 'export/paywall.html' + template_name = 'export/bootstrap3/paywall.html' @location_safe From 7a49a5a6d689bbb132a8fb7d79f444795b6f0a67 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:32:20 +0000 Subject: [PATCH 22/35] "Bootstrap 5 Migration - initial auto-migration for export/js/export_list_main.js, splitting templates" --- .../js/{ => bootstrap3}/export_list_main.js | 2 +- .../export/js/bootstrap5/export_list_main.js | 113 ++++++++++++++++++ .../export/bootstrap3/export_list.html | 2 +- .../export/bootstrap5/export_list.html | 2 +- 4 files changed, 116 insertions(+), 3 deletions(-) rename corehq/apps/export/static/export/js/{ => bootstrap3}/export_list_main.js (98%) create mode 100644 corehq/apps/export/static/export/js/bootstrap5/export_list_main.js diff --git a/corehq/apps/export/static/export/js/export_list_main.js b/corehq/apps/export/static/export/js/bootstrap3/export_list_main.js similarity index 98% rename from corehq/apps/export/static/export/js/export_list_main.js rename to corehq/apps/export/static/export/js/bootstrap3/export_list_main.js index fc0a07f5c3d4..143ad6769f71 100644 --- a/corehq/apps/export/static/export/js/export_list_main.js +++ b/corehq/apps/export/static/export/js/bootstrap3/export_list_main.js @@ -1,4 +1,4 @@ -hqDefine("export/js/export_list_main", [ +hqDefine("export/js/bootstrap3/export_list_main", [ 'jquery', 'hqwebapp/js/initial_page_data', 'analytix/js/kissmetrix', diff --git a/corehq/apps/export/static/export/js/bootstrap5/export_list_main.js b/corehq/apps/export/static/export/js/bootstrap5/export_list_main.js new file mode 100644 index 000000000000..99a0957eae32 --- /dev/null +++ b/corehq/apps/export/static/export/js/bootstrap5/export_list_main.js @@ -0,0 +1,113 @@ +hqDefine("export/js/bootstrap5/export_list_main", [ + 'jquery', + 'hqwebapp/js/initial_page_data', + 'analytix/js/kissmetrix', + 'hqwebapp/js/bootstrap5/main', + 'export/js/create_export', + 'export/js/export_list', + 'hqwebapp/js/select_2_ajax_widget', // for case owner & user filters in DashboardFeedFilterForm +], function ( + $, + initialPageData, + kissmetricsAnalytics, + utils, + createModels, + listModels +) { + $(function () { + var $createExport = $("#create-export"), + isOData = initialPageData.get('is_odata', true); + + if ($createExport.length) { + $createExport.koApplyBindings(createModels.createExportModel({ + model_type: initialPageData.get("model_type", true), + drilldown_fetch_url: initialPageData.reverse('get_app_data_drilldown_values'), + drilldown_submit_url: initialPageData.reverse('submit_app_data_drilldown_form'), + page: { + is_daily_saved_export: initialPageData.get('is_daily_saved_export', true), + is_feed: initialPageData.get('is_feed', true), + is_deid: initialPageData.get('is_deid', true), + is_odata: isOData, + model_type: initialPageData.get('model_type', true), + }, + })); + $('#createExportOptionsModal').on('show.bs.modal', function () { + kissmetricsAnalytics.track.event("Clicked New Export"); + + if (isOData) { + kissmetricsAnalytics.track.event("[BI Integration] Clicked + Add Odata Feed button"); + } + + const exportAction = getExportAction(); + const metricsMessage = `${exportAction} Export - Clicked Add Export Button`; + kissmetricsAnalytics.track.event(metricsMessage, { + domain: initialPageData.get('domain'), + }); + }); + } + + if (isOData) { + kissmetricsAnalytics.track.event("[BI Integration] Visited feature page"); + kissmetricsAnalytics.track.outboundLink( + '#js-odata-track-learn-more', + "[BI Integration] Clicked Learn More-Wiki" + ); + kissmetricsAnalytics.track.outboundLink( + '#js-odata-track-learn-more-preview', + "[BI Integration] Clicked Learn More-Feature Preview" + ); + } + + var modelType = initialPageData.get("model_type"); + $("#export-list").koApplyBindings(listModels.exportListModel({ + modelType: modelType, + isDeid: initialPageData.get('is_deid'), + isDailySavedExport: initialPageData.get('is_daily_saved_export', true), + isFeed: initialPageData.get('is_feed', true), + isOData: isOData, + headers: { + my_export_type: initialPageData.get('my_export_type'), + shared_export_type: initialPageData.get('shared_export_type'), + export_type_caps_plural: initialPageData.get('export_type_caps_plural'), + }, + urls: { + commitFilters: initialPageData.reverse("commit_filters"), + getExportsPage: initialPageData.reverse("get_exports_page"), + poll: initialPageData.reverse("get_saved_export_progress"), + toggleEnabled: initialPageData.reverse("toggle_saved_export_enabled"), + update: initialPageData.reverse("update_emailed_export_data"), + }, + exportOwnershipEnabled: initialPageData.get("export_ownership_enabled"), + })); + + if (modelType === 'form') { + kissmetricsAnalytics.track.event('Visited Export Forms Page'); + } else if (modelType === 'case') { + kissmetricsAnalytics.track.event('Visited Export Cases Page'); + } + + // Analytics: Send Kissmetrics event when user closes alert bubble + $('#alert-export-deep-links').on('click', function () { + kissmetricsAnalytics.track.event("Dismissed alert bubble - Deep links in exports"); + }); + }); + + function getExportAction() { + const modelType = initialPageData.get('model_type', true); + if (modelType) { + return utils.capitalize(modelType); + } + + const isDailySavedExport = initialPageData.get('is_daily_saved_export', true); + const isExcelExport = initialPageData.get('is_feed', true); + const isOData = initialPageData.get('is_odata', true); + + if (isDailySavedExport) { + // NOTE: Currently, excel exports are considered daily exports, + // but if this was not intentional, this code should be separated + return (isExcelExport ? 'Excel Dashboard' : 'Daily Saved'); + } else if (isOData) { + return 'PowerBI'; + } + } +}); diff --git a/corehq/apps/export/templates/export/bootstrap3/export_list.html b/corehq/apps/export/templates/export/bootstrap3/export_list.html index 6b4249e3f999..2bc421fc6a46 100644 --- a/corehq/apps/export/templates/export/bootstrap3/export_list.html +++ b/corehq/apps/export/templates/export/bootstrap3/export_list.html @@ -4,7 +4,7 @@ {% load hq_shared_tags %} {% load compress %} -{% requirejs_main 'export/js/export_list_main' %} +{% requirejs_main 'export/js/bootstrap3/export_list_main' %} {% block page_title %} {{ current_page.title }} diff --git a/corehq/apps/export/templates/export/bootstrap5/export_list.html b/corehq/apps/export/templates/export/bootstrap5/export_list.html index 570eab1b9c7f..dd3fa8a23086 100644 --- a/corehq/apps/export/templates/export/bootstrap5/export_list.html +++ b/corehq/apps/export/templates/export/bootstrap5/export_list.html @@ -4,7 +4,7 @@ {% load hq_shared_tags %} {% load compress %} -{% requirejs_main_b5 'export/js/export_list_main' %} +{% requirejs_main_b5 'export/js/bootstrap5/export_list_main' %} {% block page_title %} {{ current_page.title }} From c21c65f2ba141a0b7dbac40157d44db9eb4df8d3 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:32:36 +0000 Subject: [PATCH 23/35] "Bootstrap 5 Migration - initial auto-migration for export/js/customize_export_new.js, splitting templates" --- .../{ => bootstrap3}/customize_export_new.js | 2 +- .../js/bootstrap5/customize_export_new.js | 58 +++++++++++++++++++ .../bootstrap3/customize_export_new.html | 2 +- .../bootstrap5/customize_export_new.html | 2 +- 4 files changed, 61 insertions(+), 3 deletions(-) rename corehq/apps/export/static/export/js/{ => bootstrap3}/customize_export_new.js (97%) create mode 100644 corehq/apps/export/static/export/js/bootstrap5/customize_export_new.js diff --git a/corehq/apps/export/static/export/js/customize_export_new.js b/corehq/apps/export/static/export/js/bootstrap3/customize_export_new.js similarity index 97% rename from corehq/apps/export/static/export/js/customize_export_new.js rename to corehq/apps/export/static/export/js/bootstrap3/customize_export_new.js index ad36e80e2137..4d75247c1be3 100644 --- a/corehq/apps/export/static/export/js/customize_export_new.js +++ b/corehq/apps/export/static/export/js/bootstrap3/customize_export_new.js @@ -1,4 +1,4 @@ -hqDefine('export/js/customize_export_new', [ +hqDefine('export/js/bootstrap3/customize_export_new', [ 'jquery', 'knockout', 'hqwebapp/js/initial_page_data', diff --git a/corehq/apps/export/static/export/js/bootstrap5/customize_export_new.js b/corehq/apps/export/static/export/js/bootstrap5/customize_export_new.js new file mode 100644 index 000000000000..578d5c34e0f1 --- /dev/null +++ b/corehq/apps/export/static/export/js/bootstrap5/customize_export_new.js @@ -0,0 +1,58 @@ +hqDefine('export/js/bootstrap5/customize_export_new', [ + 'jquery', + 'knockout', + 'hqwebapp/js/initial_page_data', + 'export/js/models', + 'hqwebapp/js/toggles', + 'export/js/const', +], function ( + $, + ko, + initialPageData, + models, + toggles, + constants +) { + $(function () { + var customExportView = new models.ExportInstance( + initialPageData.get('export_instance'), + { + saveUrl: initialPageData.get('full_path'), + hasExcelDashboardAccess: initialPageData.get('has_excel_dashboard_access'), + hasDailySavedAccess: initialPageData.get('has_daily_saved_export_access'), + formatOptions: initialPageData.get('format_options'), + sharingOptions: initialPageData.get('sharing_options'), + hasOtherOwner: initialPageData.get('has_other_owner'), + numberOfAppsToProcess: initialPageData.get('number_of_apps_to_process'), + geoProperties: initialPageData.get('geo_properties'), + } + ); + initialPageData.registerUrl( + "build_schema", "/a/---/data/export/build_full_schema/" + ); + $('#customize-export').koApplyBindings(customExportView); + $('.export-tooltip').tooltip(); /* todo B5: plugin:tooltip */ + + if (toggles.toggleEnabled('SUPPORT_GEO_JSON_EXPORT')) { + const exportFormat = initialPageData.get('export_instance').export_format; + if (exportFormat === constants.EXPORT_FORMATS.GEOJSON) { + $("#select-geo-property").show(); + $("#split-multiselects-checkbox-div").hide(); + $("#split-multiselects-checkbox").prop("checked", false); + } + + $('#format-select').change(function () { + const selectedValue = $(this).val(); + if (selectedValue === constants.EXPORT_FORMATS.GEOJSON) { + $("#select-geo-property").show(); + // Hiding and unchecking this checkbox is a temporary measure + $("#split-multiselects-checkbox-div").hide(); + $("#split-multiselects-checkbox").prop("checked", false); + } else { + $("#select-geo-property").hide(); + $("#split-multiselects-checkbox-div").show(); + } + }); + } + }); +}); diff --git a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html index 44d3ea6dbfb9..f8fc37bbad52 100644 --- a/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap3/customize_export_new.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main 'export/js/customize_export_new' %} +{% requirejs_main 'export/js/bootstrap3/customize_export_new' %} {% block page_content %} {% initial_page_data 'number_of_apps_to_process' number_of_apps_to_process %} diff --git a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html index 56a635d19428..a2d75ce4cba2 100644 --- a/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html +++ b/corehq/apps/export/templates/export/bootstrap5/customize_export_new.html @@ -2,7 +2,7 @@ {% load hq_shared_tags %} {% load i18n %} -{% requirejs_main_b5 'export/js/customize_export_new' %} +{% requirejs_main_b5 'export/js/bootstrap5/customize_export_new' %} {% block page_content %} {% initial_page_data 'number_of_apps_to_process' number_of_apps_to_process %} From 8a2627f739cae65a62f69611d370bf851cf6fe07 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:32:48 +0000 Subject: [PATCH 24/35] "Bootstrap 5 Migration - initial auto-migration for export/js/incremental_export.js, splitting templates" --- .../export/js/{ => bootstrap3}/incremental_export.js | 2 +- .../static/export/js/bootstrap5/incremental_export.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) rename corehq/apps/export/static/export/js/{ => bootstrap3}/incremental_export.js (85%) create mode 100644 corehq/apps/export/static/export/js/bootstrap5/incremental_export.js diff --git a/corehq/apps/export/static/export/js/incremental_export.js b/corehq/apps/export/static/export/js/bootstrap3/incremental_export.js similarity index 85% rename from corehq/apps/export/static/export/js/incremental_export.js rename to corehq/apps/export/static/export/js/bootstrap3/incremental_export.js index 491c5b25dabd..78fe7d70e808 100644 --- a/corehq/apps/export/static/export/js/incremental_export.js +++ b/corehq/apps/export/static/export/js/bootstrap3/incremental_export.js @@ -1,4 +1,4 @@ -hqDefine('export/js/incremental_export', [ +hqDefine('export/js/bootstrap3/incremental_export', [ "jquery", "hqwebapp/js/initial_page_data", "hqwebapp/js/bootstrap3/crud_paginated_list_init", diff --git a/corehq/apps/export/static/export/js/bootstrap5/incremental_export.js b/corehq/apps/export/static/export/js/bootstrap5/incremental_export.js new file mode 100644 index 000000000000..954eb8a928e5 --- /dev/null +++ b/corehq/apps/export/static/export/js/bootstrap5/incremental_export.js @@ -0,0 +1,10 @@ +hqDefine('export/js/bootstrap5/incremental_export', [ + "jquery", + "hqwebapp/js/initial_page_data", + "hqwebapp/js/bootstrap5/crud_paginated_list_init", +], function ($, initialPageData, CRUDPaginatedListInit) { + $(function () { + var viewModel = CRUDPaginatedListInit.paginatedListModel; + viewModel.reverse = initialPageData.reverse; + }); +}); From 6fcf9d64f981ef66665a502ea5215022a7a72bed Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 11 Sep 2024 16:33:05 +0000 Subject: [PATCH 25/35] "Bootstrap 5 Migration - initial auto-migration for export/js/download_data_files.js, splitting templates" --- .../{ => bootstrap3}/download_data_files.js | 2 +- .../js/bootstrap5/download_data_files.js | 67 +++++++++++++++++++ .../bootstrap3/download_data_files.html | 2 +- .../bootstrap5/download_data_files.html | 2 +- 4 files changed, 70 insertions(+), 3 deletions(-) rename corehq/apps/export/static/export/js/{ => bootstrap3}/download_data_files.js (97%) create mode 100644 corehq/apps/export/static/export/js/bootstrap5/download_data_files.js diff --git a/corehq/apps/export/static/export/js/download_data_files.js b/corehq/apps/export/static/export/js/bootstrap3/download_data_files.js similarity index 97% rename from corehq/apps/export/static/export/js/download_data_files.js rename to corehq/apps/export/static/export/js/bootstrap3/download_data_files.js index 6452332a800c..ccea8464579d 100644 --- a/corehq/apps/export/static/export/js/download_data_files.js +++ b/corehq/apps/export/static/export/js/bootstrap3/download_data_files.js @@ -1,4 +1,4 @@ -hqDefine("export/js/download_data_files",[ +hqDefine("export/js/bootstrap3/download_data_files",[ 'jquery', 'hqwebapp/js/bootstrap3/alert_user', 'hqwebapp/js/initial_page_data', diff --git a/corehq/apps/export/static/export/js/bootstrap5/download_data_files.js b/corehq/apps/export/static/export/js/bootstrap5/download_data_files.js new file mode 100644 index 000000000000..b8a269f8988d --- /dev/null +++ b/corehq/apps/export/static/export/js/bootstrap5/download_data_files.js @@ -0,0 +1,67 @@ +hqDefine("export/js/bootstrap5/download_data_files",[ + 'jquery', + 'hqwebapp/js/bootstrap5/alert_user', + 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/assert_properties', +], function ($, alertUserModule, initialPageData, assertProperties) { + var alertUser = alertUserModule.alert_user; + /** + * Copies the URL of a data file to the clipboard + * + * The function will first attempt to copy the URL to the clipboard without + * any further user interaction. If that fails, the user will be given a + * dialog box with the URL selected, and prompted to press Ctrl-C and Enter. + * + * @param url: The URL to be copied to the clipboard + * @param textareaElem: A hidden +
+
+-
+ +-
++
+ {# todo B5: css:checkbox #} ++
+ + {% if export_instance.type == 'form' and export_instance.export_format != 'html' %} +-
+-
+ {% endif %} + +-
+-
+ {% endif %} +-
++
{# todo B5: css:checkbox #} +
+ {% if export_instance.type == 'form' %} +-
+ +
+ +-
+-
+
+ {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} +-
+ +-
++
+ + {% trans "Publish as De-Identified" %} +@@ -285,7 +285,7 @@ + {% trans "Check only if this export has been fully and safely de-identified." %} + +
+- + {% endif %} +- ++ + {% if can_edit %} + {% trans "Cancel" %} + {% else %} +@@ -323,7 +323,7 @@ + {% endif %} + + {% if export_instance.get_id and can_edit %} +- + + {% trans "Copy this Export" %} +@@ -331,7 +331,7 @@ + {% endif %} + + {% if export_instance.is_odata_config %} +-
+
+ {% blocktrans %} +@@ -347,10 +347,10 @@ + {% trans "There are errors with your configuration. Please fix them before creating the export." %} +
+
+- {% include "export/dialogs/bootstrap3/process_deleted_questions.html" %} +- {% include "export/dialogs/bootstrap3/process_deprecated_properties.html" %} ++ {% include "export/dialogs/bootstrap5/process_deleted_questions.html" %} ++ {% include "export/dialogs/bootstrap5/process_deprecated_properties.html" %} +
+ +
+- {% include "export/partials/bootstrap3/new_customize_export_templates.html" %} ++ {% include "export/partials/bootstrap5/new_customize_export_templates.html" %} + {% endblock %} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/datasource_export_view.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/datasource_export_view.html.diff.txt new file mode 100644 index 000000000000..98aa61ed978d --- /dev/null +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/datasource_export_view.html.diff.txt @@ -0,0 +1,19 @@ +--- ++++ +@@ -4,7 +4,7 @@ + {% load compress %} + {% load hq_shared_tags %} + +-{% requirejs_main 'export/js/datasource_export' %} ++{% requirejs_main_b5 'export/js/datasource_export' %} + + {% block page_title %} + {% trans "Export Data Source Data" %} +@@ -22,6 +22,6 @@ + The project has no data sources configured. + {% endblocktrans %} +
+- {% crispy form %} ++ {% crispy form %} {# todo B5: check crispy #} +
+ {% endblock %} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/dialogs/bulk_delete_custom_export_dialog.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/dialogs/bulk_delete_custom_export_dialog.html.diff.txt new file mode 100644 index 000000000000..c7e16d3838f8 --- /dev/null +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/dialogs/bulk_delete_custom_export_dialog.html.diff.txt @@ -0,0 +1,40 @@ +--- ++++ +@@ -3,8 +3,8 @@ +