diff --git a/corehq/apps/export/forms.py b/corehq/apps/export/forms.py index d763206f5ea3..00d81a5cf988 100644 --- a/corehq/apps/export/forms.py +++ b/corehq/apps/export/forms.py @@ -932,9 +932,6 @@ def __init__(self, domain_object, *args, **kwargs): self.domain_object = domain_object super(EmwfFilterFormExport, self).__init__(domain_object, *args, **kwargs) - self.helper.label_class = 'col-sm-3 col-md-2 col-lg-2' - self.helper.field_class = 'col-sm-9 col-md-8 col-lg-3' - def get_model_filter(self, mobile_user_and_group_slugs, can_access_all_locations, accessible_location_ids): """ :param mobile_user_and_group_slugs: slug from request like @@ -988,8 +985,6 @@ def __init__(self, domain_object, timezone, *args, **kwargs): self.timezone = timezone super(FilterCaseESExportDownloadForm, self).__init__(domain_object, *args, **kwargs) - self.helper.label_class = 'col-sm-3 col-md-2 col-lg-2' - self.helper.field_class = 'col-sm-9 col-md-8 col-lg-3' # update date_range filter's initial values to span the entirety of # the domain's submission range default_datespan = datespan_from_beginning(self.domain_object, self.timezone) @@ -1046,8 +1041,6 @@ def __init__(self, domain_object, timezone, *args, **kwargs): self.timezone = timezone super(FilterSmsESExportDownloadForm, self).__init__(domain_object, *args, **kwargs) - self.helper.label_class = 'col-sm-3 col-md-2 col-lg-2' - self.helper.field_class = 'col-sm-9 col-md-8 col-lg-3' # update date_range filter's initial values to span the entirety of # the domain's submission range default_datespan = datespan_from_beginning(self.domain_object, self.timezone) diff --git a/corehq/apps/export/static/export/js/bootstrap5/download_export.js b/corehq/apps/export/static/export/js/bootstrap5/download_export.js index 15af4310c896..b0480354ea5f 100644 --- a/corehq/apps/export/static/export/js/bootstrap5/download_export.js +++ b/corehq/apps/export/static/export/js/bootstrap5/download_export.js @@ -13,12 +13,12 @@ hqDefine('export/js/bootstrap5/download_export', [ 'underscore', 'hqwebapp/js/assert_properties', 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/tempus_dominus', 'analytix/js/google', 'analytix/js/kissmetrix', 'reports/js/filters/bootstrap5/main', 'reports/js/reports.util', 'export/js/utils', - 'hqwebapp/js/daterangepicker.config', // createDateRangePicker 'jquery.cookie/jquery.cookie', // for resuming export downloads on refresh ], function ( $, @@ -26,6 +26,7 @@ hqDefine('export/js/bootstrap5/download_export', [ _, assertProperties, initialPageData, + hqTempusDominus, googleAnalytics, kissmetricsAnalytics, reportFilters, @@ -435,12 +436,7 @@ hqDefine('export/js/bootstrap5/download_export', [ $(".hqwebapp-datespan").each(function () { var $el = $(this).find("input"); - $el.createDateRangePicker( /* todo B5: plugin:createDateRangePicker */ - $el.data("labels"), - $el.data("separator"), - $el.data('startDate'), - $el.data('endDate') - ); + hqTempusDominus.createDateRangePicker($el.get(0), $el.data("separator")); }); }); }); diff --git a/corehq/apps/export/static/export/js/bootstrap5/export_list.js b/corehq/apps/export/static/export/js/bootstrap5/export_list.js index 96877d87541f..6e9d03dbae9e 100644 --- a/corehq/apps/export/static/export/js/bootstrap5/export_list.js +++ b/corehq/apps/export/static/export/js/bootstrap5/export_list.js @@ -16,6 +16,7 @@ hqDefine("export/js/bootstrap5/export_list", [ 'knockout', 'underscore', 'hqwebapp/js/assert_properties', + 'es6!hqwebapp/js/bootstrap5_loader', 'clipboard/dist/clipboard', 'analytix/js/google', 'analytix/js/kissmetrix', @@ -30,6 +31,7 @@ hqDefine("export/js/bootstrap5/export_list", [ ko, _, assertProperties, + bootstrap, Clipboard, googleAnalytics, kissmetricsAnalytics, @@ -183,7 +185,8 @@ hqDefine("export/js/bootstrap5/export_list", [ self.isAutoRebuildEnabled(data.isAutoRebuildEnabled); } $button.enableButton(); - $('#modalEnableDisableAutoRefresh-' + self.id() + '-' + self.emailedExport.groupId()).modal('hide'); /* todo B5: plugin:modal */ + const modalId = 'modalEnableDisableAutoRefresh-' + self.id() + '-' + self.emailedExport.groupId(); + bootstrap.Modal.getInstance('#' + modalId).hide(); }, }); }; @@ -263,7 +266,9 @@ hqDefine("export/js/bootstrap5/export_list", [ }; self.updateData = function () { - $('#modalRefreshExportConfirm-' + exportId + '-' + self.groupId()).modal('hide'); /* todo B5: plugin:modal */ + const modalId = 'modalRefreshExportConfirm-' + exportId + '-' + self.groupId(); + bootstrap.Modal.getInstance('#' + modalId).hide(); + self.updatingData(true); $.ajax({ method: 'POST', @@ -464,23 +469,6 @@ hqDefine("export/js/bootstrap5/export_list", [ return true; }; - var tooltipText = ""; - if (self.isOData || self.isFeed) { - tooltipText = gettext("All of the selected feeds will be deleted."); - } else { - tooltipText = gettext("All of the selected exports will be deleted."); - } - - $(function () { - $('[data-toggle="tooltip-bulkExport"]').attr('title', - gettext("All of the selected exports will be collected for download to a " + - "single Excel file, with each export as a separate sheet.")).tooltip(); /* todo B5: plugin:tooltip */ - }); - - $(function () { - $('[data-toggle="tooltip-bulkDelete"]').attr('title', tooltipText).tooltip({trigger: 'hover'}); /* todo B5: plugin:tooltip */ - }); - self.isMultiple = ko.computed(function () { if (self.bulkDeleteList().length > 1) { return true; } return false; @@ -682,7 +670,7 @@ hqDefine("export/js/bootstrap5/export_list", [ if (export_.hasEmailedExport) { export_.emailedExport.pollProgressBar(); } - self.$filterModal.modal('hide'); /* todo B5: plugin:modal */ + bootstrap.Modal.getInstance(self.$filterModal.get(0)).hide(); } else { self.formSubmitErrorMessage(data.error); } diff --git a/corehq/apps/export/static/export/js/create_export.js b/corehq/apps/export/static/export/js/create_export.js index 65530e88c13a..c01a2355d428 100644 --- a/corehq/apps/export/static/export/js/create_export.js +++ b/corehq/apps/export/static/export/js/create_export.js @@ -131,6 +131,7 @@ hqDefine("export/js/create_export", [ $formElem.select2({ data: self._app_types || [], width: '100%', + dropdownParent: $("#createExportOptionsModal"), }).val(drilldownDefaults.app_type).trigger('change'); } }, @@ -152,6 +153,7 @@ hqDefine("export/js/create_export", [ $formElem.select2({ data: fieldData || [], width: '100%', + dropdownParent: $("#createExportOptionsModal"), }).val(drilldownDefaults[fieldSlug]).trigger('change'); } } diff --git a/corehq/apps/export/templates/export/bootstrap5/download_export.html b/corehq/apps/export/templates/export/bootstrap5/download_export.html index ce80ca7417a2..5dd6f6ada92d 100644 --- a/corehq/apps/export/templates/export/bootstrap5/download_export.html +++ b/corehq/apps/export/templates/export/bootstrap5/download_export.html @@ -4,36 +4,6 @@ {% load hq_shared_tags %} {% load compress %} -{% block stylesheets %} - -{% endblock stylesheets %} - {% requirejs_main_b5 'export/js/bootstrap5/download_export' %} {% block 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 dd3fa8a23086..f9845cf02cb2 100644 --- a/corehq/apps/export/templates/export/bootstrap5/export_list.html +++ b/corehq/apps/export/templates/export/bootstrap5/export_list.html @@ -1,4 +1,4 @@ -{% extends 'hqwebapp/bootstrap3/base_section.html' %} +{% extends 'hqwebapp/bootstrap5/base_section.html' %} {% load crispy_forms_tags %} {% load i18n %} {% load hq_shared_tags %} 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 index 3f6fc06b352f..51d476a87288 100644 --- 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 @@ -3,8 +3,7 @@