diff --git a/Gruntfile.js b/Gruntfile.js index 14578f4dc97e..a01f98451e71 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -28,7 +28,8 @@ module.exports = function (grunt) { */ var apps = [ 'app_manager', - 'export/ko', + 'export/ko/bootstrap3', + 'export/ko/bootstrap5', 'notifications/bootstrap3', 'notifications/bootstrap5', 'reports_core/choiceListUtils', 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 96% 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..e49e740b570a 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,8 +1,8 @@ -hqDefine('export/js/customize_export_new', [ +hqDefine('export/js/bootstrap3/customize_export_new', [ 'jquery', 'knockout', 'hqwebapp/js/initial_page_data', - 'export/js/models', + 'export/js/bootstrap3/models', 'hqwebapp/js/toggles', 'export/js/const', ], function ( 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/download_export.js b/corehq/apps/export/static/export/js/bootstrap3/download_export.js similarity index 99% rename from corehq/apps/export/static/export/js/download_export.js rename to corehq/apps/export/static/export/js/bootstrap3/download_export.js index 2c9dc3dbc729..3c526304a6b1 100644 --- a/corehq/apps/export/static/export/js/download_export.js +++ b/corehq/apps/export/static/export/js/bootstrap3/download_export.js @@ -7,7 +7,7 @@ * downloadProgressModel: Controls the progress bar, etc. once the user has clicked 'Prepare Export'. * Includes functionality to email the user when the export is done, rather than them waiting for it. */ -hqDefine('export/js/download_export', [ +hqDefine('export/js/bootstrap3/download_export', [ 'jquery', 'knockout', 'underscore', diff --git a/corehq/apps/export/static/export/js/export_list.js b/corehq/apps/export/static/export/js/bootstrap3/export_list.js similarity index 99% rename from corehq/apps/export/static/export/js/export_list.js rename to corehq/apps/export/static/export/js/bootstrap3/export_list.js index a56d048268d7..18d04c44d829 100644 --- a/corehq/apps/export/static/export/js/export_list.js +++ b/corehq/apps/export/static/export/js/bootstrap3/export_list.js @@ -11,7 +11,7 @@ * bulk export, which is a page-level action (you can select exports across panels to bulk export). * It also controls filter editing (for daily saved / dashboard feeds). */ -hqDefine("export/js/export_list", [ +hqDefine("export/js/bootstrap3/export_list", [ 'jquery', 'knockout', 'underscore', 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..401f8c07344d 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,10 +1,10 @@ -hqDefine("export/js/export_list_main", [ +hqDefine("export/js/bootstrap3/export_list_main", [ 'jquery', 'hqwebapp/js/initial_page_data', 'analytix/js/kissmetrix', 'hqwebapp/js/bootstrap3/main', 'export/js/create_export', - 'export/js/export_list', + 'export/js/bootstrap3/export_list', 'hqwebapp/js/select_2_ajax_widget', // for case owner & user filters in DashboardFeedFilterForm ], function ( $, 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/models.js b/corehq/apps/export/static/export/js/bootstrap3/models.js similarity index 99% rename from corehq/apps/export/static/export/js/models.js rename to corehq/apps/export/static/export/js/bootstrap3/models.js index d898e01d53bb..299e44238ba4 100644 --- a/corehq/apps/export/static/export/js/models.js +++ b/corehq/apps/export/static/export/js/bootstrap3/models.js @@ -4,7 +4,7 @@ * */ -hqDefine('export/js/models', [ +hqDefine('export/js/bootstrap3/models', [ 'jquery', 'knockout', 'underscore', 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..5a0691ef04d5 --- /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/bootstrap5/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/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 + + +
+ +
+ +
+ {% url "domain_subscription_view" domain as software_plan_url %} + {% blocktrans %} + Excel Dashboard Integration is only available on the Standard Plan or higher. + Click here to manage the software plan for your project. + {% endblocktrans %} +
+
+ +
+
{# todo B5: css:form-group #} +
+ {% if not export_instance.is_odata_config %} +
{# todo B5: css:checkbox #} + +
+ + {% if export_instance.type == 'form' and export_instance.export_format != 'html' %} +
{# todo B5: css:checkbox #} + +
+ {% endif %} + +
{# todo B5: css:checkbox #} + + {% if not has_daily_saved_export_access %} + + {% endif %} +
+ {% endif %} +
{# todo B5: css:checkbox #} + + {% trans "Download a Data Export Tool configuration file for this export" as det_help %} + +
+ {% if export_instance.type == 'form' %} +
+ +
+ +
{# todo B5: css:checkbox #} + +
+ {% endif %} +
+
+ {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} +
+ +
+ +
+
+ {% blocktrans %} + This export was created by {{ owner_name }}. + If you change the sharing settings for this export you will lose the ability + to view and edit the export. + Only {{ owner_name }} will have access to it. + {% endblocktrans %} +
+
+ {% blocktrans %} + This export was created by {{ owner_name }}. + If you change the sharing settings for this export you will lose the ability + to edit the export. + Only {{ owner_name }} will be able to edit it. + {% endblocktrans %} +
+
+
+
+ {% endif %} + + {% if not is_all_case_types_export %} +
+ {% endif %} + + {% if request|toggle_enabled:"ALLOW_USER_DEFINED_EXPORT_COLUMNS" %} +
+
+ +
+
+ {% endif %} + + {% if allow_deid %} +
+ + {% trans "Privacy Settings" %} + +
{# todo B5: css:form-group #} + +
+
+
{# todo B5: css:checkbox #} + +
+ + {% trans "Check only if this export has been fully and safely de-identified." %} + +
+ +
+
+
+ {% endif %} +
+
+ {% if can_edit %} + + {% endif %} + + {% if can_edit %} + {% trans "Cancel" %} + {% else %} + {% trans "Back" %} + {% endif %} + + {% if export_instance.get_id and can_edit %} + + + {% trans "Copy this Export" %} + + {% endif %} + + {% if export_instance.is_odata_config %} +
+
+ {% blocktrans %} + Column labels must be unique. '' + has been used more than once. + {% endblocktrans %} +
+
+ {% endif %} + +
+ {% trans "There are errors with your configuration. Please fix them before creating the export." %} +
+
+ {% include "export/dialogs/bootstrap5/process_deleted_questions.html" %} + {% include "export/dialogs/bootstrap5/process_deprecated_properties.html" %} +
+ + + {% include "export/partials/bootstrap5/new_customize_export_templates.html" %} +{% endblock %} 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/templates/export/bootstrap5/download_data_files.html b/corehq/apps/export/templates/export/bootstrap5/download_data_files.html new file mode 100644 index 000000000000..666bed49502d --- /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/bootstrap5/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/templates/export/bootstrap5/download_export.html b/corehq/apps/export/templates/export/bootstrap5/download_export.html new file mode 100644 index 000000000000..ce80ca7417a2 --- /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/bootstrap5/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/bootstrap5/export_download_prepare.html' %} + {% endif %} +
+ {% include 'export/partials/bootstrap5/export_download_progress.html' %} + +{% endblock page_content %} 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..dd3fa8a23086 --- /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/bootstrap5/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/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/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/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/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/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/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/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/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 %} + 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 %} + 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 92% 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 index 098c0179a2e0..705bdbf71e91 100644 --- a/corehq/apps/export/templates/export/partials/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/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/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/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/export_list_controller.html b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html similarity index 82% 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 index 3afad8e054f9..9a3f85ca71b4 100644 --- a/corehq/apps/export/templates/export/partials/export_list_controller.html +++ b/corehq/apps/export/templates/export/partials/bootstrap3/export_list_controller.html @@ -30,9 +30,9 @@

{% 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/odata_feed_limit_reached_modal.html' %} + {% include 'export/partials/bootstrap3/odata_feed_limit_reached_modal.html' %} {% endif %} {% endif %} @@ -40,10 +40,10 @@
{% 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/delete_bulk_notice.html' %} + {% include 'export/partials/bootstrap3/delete_bulk_notice.html' %} {% endif %}
@@ -51,7 +51,7 @@
{% include 'export/partials/loading_exports.html' %} - {% include 'export/partials/table.html' %} + {% include 'export/partials/bootstrap3/table.html' %} {% 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/delete_bulk_notice.html b/corehq/apps/export/templates/export/partials/bootstrap5/delete_bulk_notice.html new file mode 100644 index 000000000000..6674fc6cf3f5 --- /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_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_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. " %} +
+
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+
+
+
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!" %} + +
+
+
+ +
+
+
+
+
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..f35a4f2ae71f --- /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/bootstrap5/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/bootstrap5/export_bulk_notice.html' %} + {% endif %} + {% if has_edit_permissions %} + {% include 'export/partials/bootstrap5/delete_bulk_notice.html' %} + {% endif %} +
+
{# todo B5: inline style #} +
{# todo B5: css:panel #} +
+
+ {% include 'export/partials/loading_exports.html' %} + {% include 'export/partials/bootstrap5/table.html' %} + +
+
+
+ + {% if export_filter_form %} + {% include 'export/partials/bootstrap5/feed_filter_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 %} + + 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 %} + + 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 %} + + + 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/bootstrap5/table.html b/corehq/apps/export/templates/export/partials/bootstrap5/table.html new file mode 100644 index 000000000000..a6d89ac09155 --- /dev/null +++ b/corehq/apps/export/templates/export/partials/bootstrap5/table.html @@ -0,0 +1,713 @@ +{% load crispy_forms_tags %} +{% load i18n %} +{% load hq_shared_tags %} +{% load humanize %} + + + + + {% if has_edit_permissions or allow_bulk_export %} + + {% endif %} + + + {% if model_type == "case" %} + + {% endif %} + + + + {% if is_daily_saved_export %} + + {% endif %} + + {% if has_edit_permissions %} + + + {% endif %} + + {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} + + {% endif %} + + + + + {% if has_edit_permissions or allow_bulk_export %} + + {% endif %} + + {% if model_type == "case" %} + + {% endif %} + + + + {% if is_daily_saved_export %} + + {% endif %} + + {% if has_edit_permissions %} + + + {% endif %} + + {% if request|request_has_privilege:"EXPORT_OWNERSHIP" %} + + {% endif %} + + + +
+ {% blocktrans %}Select{% endblocktrans %} +
+ + {%trans 'or'%} + +
+ {% trans 'Name' %} + + {% trans 'Case Type' %} + + {% if export_filter_form %} + {% if has_edit_permissions %} + {% trans "Filters and Files" %} + {% endif %} + {% else %} + {{ export_type_caps }} + {% endif %} + {% trans "Enable/Disable" %} + {% if is_daily_saved_export %} + {% trans "Edit Columns" %} + {% elif not is_odata %} + {% trans 'Edit' %} + {% else %} + {% blocktrans %} + Copy & Edit Feed + {% endblocktrans %} + {% endif %} + + {% trans 'Delete' %} + + + {% trans "Share" %} + + + {% trans "Shared By" %} + +
+
{# todo B5: css:checkbox #} + +
+
+

+ + +

+

+ + + {% 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 %} + +
+ + +
+
+ +
+

{# todo B5: inline style #} + {% trans "deprecated" %} {# todo B5: inline style #} +
+ + {{ 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" %} + + + + + + {% trans "Enable" %} + + + {% trans "Disable" %} + + + + + + + +
+ + + {% trans 'Delete' %} + + {% include "export/dialogs/bootstrap5/delete_custom_export_dialog.html" %} +
+
+
+
+ {% trans 'Private' %} +
+
+ {% trans 'Export Only' %} +
+
+ {% trans 'Edit & Export' %} +
+
+
+
+
+ {% trans 'Unknown' %} +
+
+
+
+
diff --git a/corehq/apps/export/templates/export/spec/ko/mocha.html b/corehq/apps/export/templates/export/spec/ko/bootstrap3/mocha.html similarity index 50% rename from corehq/apps/export/templates/export/spec/ko/mocha.html rename to corehq/apps/export/templates/export/spec/ko/bootstrap3/mocha.html index 339bfa57f4fa..406969bc8dbc 100644 --- a/corehq/apps/export/templates/export/spec/ko/mocha.html +++ b/corehq/apps/export/templates/export/spec/ko/bootstrap3/mocha.html @@ -4,12 +4,12 @@ {% block dependencies %} - + {% endblock %} {% block mocha_tests %} - - - + + + {% endblock %} diff --git a/corehq/apps/export/templates/export/spec/ko/bootstrap5/mocha.html b/corehq/apps/export/templates/export/spec/ko/bootstrap5/mocha.html new file mode 100644 index 000000000000..5a05ff8ead0b --- /dev/null +++ b/corehq/apps/export/templates/export/spec/ko/bootstrap5/mocha.html @@ -0,0 +1,15 @@ +{% extends 'mocha/base.html' %} +{% load hq_shared_tags %} + +{% block dependencies %} + + + +{% endblock %} + +{% block mocha_tests %} + + + + +{% endblock %} diff --git a/corehq/apps/export/views/download.py b/corehq/apps/export/views/download.py index 0e2515f263c8..a221b67177fa 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 @@ -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): 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.) 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 diff --git a/corehq/apps/export/views/utils.py b/corehq/apps/export/views/utils.py index 3ba95e4f56c2..9c39a0026513 100644 --- a/corehq/apps/export/views/utils.py +++ b/corehq/apps/export/views/utils.py @@ -300,19 +300,19 @@ 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 @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): diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json index 75a5f82ef875..56022acfe999 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json @@ -664,5 +664,65 @@ "label": "javascript/repeaters/js", "compare_all_files": true } + ], + "apps/export/templates/export": [ + { + "directories": [ + "bootstrap3", + "bootstrap5" + ], + "file_type": "template", + "label": "export", + "compare_all_files": true + }, + { + "directories": [ + "dialogs/bootstrap3", + "dialogs/bootstrap5" + ], + "file_type": "template", + "label": "export/dialogs", + "compare_all_files": true + }, + { + "directories": [ + "partials/bootstrap3", + "partials/bootstrap5" + ], + "file_type": "template", + "label": "export/partials", + "compare_all_files": true + }, + { + "directories": [ + "spec/ko/bootstrap3", + "spec/ko/bootstrap5" + ], + "file_type": "template", + "label": "export/spec/ko", + "compare_all_files": true + } + ], + "apps/export/static/export/js": [ + { + "directories": [ + "bootstrap3", + "bootstrap5" + ], + "file_type": "javascript", + "label": "javascript/export/js", + "compare_all_files": true + } + ], + "apps/export/static/export/spec": [ + { + "directories": [ + "bootstrap3", + "bootstrap5" + ], + "file_type": "javascript", + "label": "javascript/export/spec", + "compare_all_files": true + } ] } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/customize_export_new.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/customize_export_new.html.diff.txt new file mode 100644 index 000000000000..92643cc96984 --- /dev/null +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/export/customize_export_new.html.diff.txt @@ -0,0 +1,287 @@ +--- ++++ +@@ -1,8 +1,8 @@ +-{% extends "hqwebapp/bootstrap3/base_section.html" %} ++{% extends "hqwebapp/bootstrap5/base_section.html" %} + {% load hq_shared_tags %} + {% load i18n %} + +-{% requirejs_main 'export/js/bootstrap3/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 %} +@@ -15,10 +15,10 @@ + {% initial_page_data 'export_instance' export_instance %} + {% initial_page_data 'geo_properties' geo_properties %} + +-