diff --git a/Gruntfile.js b/Gruntfile.js index 6f526ce96a47..14578f4dc97e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,5 @@ -/* globals process */ - +/* globals module, process, require */ +'use strict'; module.exports = function (grunt) { var headless = require('mocha-headless-chrome'), _ = require('lodash'), @@ -34,10 +34,8 @@ module.exports = function (grunt) { 'reports_core/choiceListUtils', 'locations', 'userreports', - 'cloudcare/bootstrap3', - 'cloudcare/bootstrap5', - 'cloudcare/form_entry/bootstrap3', - 'cloudcare/form_entry/bootstrap5', + 'cloudcare', + 'cloudcare/form_entry', 'hqwebapp/bootstrap3', 'hqwebapp/bootstrap5', 'case_importer', diff --git a/corehq/apps/cloudcare/static/cloudcare/js/debugger/debugger.js b/corehq/apps/cloudcare/static/cloudcare/js/debugger/debugger.js index 4a86a56fc38a..d70377527f14 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/debugger/debugger.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/debugger/debugger.js @@ -6,7 +6,7 @@ hqDefine('cloudcare/js/debugger/debugger', [ 'clipboard/dist/clipboard', 'ace-builds/src-min-noconflict/ace', 'analytix/js/kissmetrix', - 'reports/js/bootstrap3/readable_form', + 'reports/js/bootstrap5/readable_form', 'hqwebapp/js/atwho', // $.atwho 'ace-builds/src-min-noconflict/mode-json', 'ace-builds/src-min-noconflict/mode-xml', diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/const.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/const.js index dfcac5edf452..c0c2b1ed0dd5 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/const.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/const.js @@ -53,15 +53,15 @@ hqDefine("cloudcare/js/form_entry/const", [], function () { NO_ANSWER: null, // UI - LABEL_WIDTH: 'col-sm-4', - LABEL_OFFSET: 'col-sm-offset-4', - CONTROL_WIDTH: 'col-sm-8', + LABEL_WIDTH: 'col-md-4', + LABEL_OFFSET: 'offset-md-4', + CONTROL_WIDTH: 'col-md-8', BLOCK_NONE: 'block-none', BLOCK_SUBMIT: 'block-submit', BLOCK_ALL: 'block-all', - FULL_WIDTH: 'col-sm-12', - SHORT_WIDTH: 'col-sm-2', - MEDIUM_WIDTH: 'col-sm-4', + FULL_WIDTH: 'col-md-12', + SHORT_WIDTH: 'col-md-2', + MEDIUM_WIDTH: 'col-md-4', // XForm Navigation QUESTIONS_FOR_INDEX: 'questions_for_index', diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/entries.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/entries.js index f3e704619f37..e2857e78848e 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/entries.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/entries.js @@ -14,7 +14,7 @@ hqDefine("cloudcare/js/form_entry/entries", [ 'cloudcare/js/form_entry/utils', 'signature_pad/dist/signature_pad.umd.min', 'mapbox.js/dist/mapbox.uncompressed', - 'hqwebapp/js/bootstrap3/knockout_bindings.ko', // fadeVisible + 'hqwebapp/js/bootstrap5/knockout_bindings.ko', // fadeVisible 'cloudcare/js/formplayer/utils/calendar-picker-translations', // EthiopianDateEntry 'select2/dist/js/select2.full.min', ], function ( @@ -47,6 +47,7 @@ hqDefine("cloudcare/js/form_entry/entries", [ self.xformParams = function () { return {}; }; self.placeholderText = ''; self.broadcastTopics = []; + self.colStyleIfHideLabel = ko.observable(null); // Returns true if the rawAnswer is valid, false otherwise self.isValid = function (rawAnswer) { return self.getErrorMessage(rawAnswer) === null; @@ -78,7 +79,7 @@ hqDefine("cloudcare/js/form_entry/entries", [ Entry.prototype.getColStyle = function (numChoices) { // Account for number of choices plus column for clear button var colWidth = parseInt(12 / (numChoices + 1)) || 1; - return 'col-xs-' + colWidth; + return 'col-sm-' + colWidth; }; // This should set the answer value if the answer is valid. If the raw answer is valid, this @@ -791,14 +792,14 @@ hqDefine("cloudcare/js/form_entry/entries", [ self.$picker = $('#' + self.entryId); var answer = self.answer() ? self.convertServerToClientFormat(self.answer()) : constants.NO_ANSWER; - self.initWidget(self.$picker, answer); + self.picker = self.initWidget(self.$picker, answer); - self.$picker.on("dp.change", function (e) { + self.picker.subscribe("change.td", function (e) { if (!e.date) { self.answer(constants.NO_ANSWER); return; } - self.answer(moment(e.date.toDate()).format(self.serverFormat)); + self.answer(moment(e.date).format(self.serverFormat)); }); }; } @@ -827,14 +828,14 @@ hqDefine("cloudcare/js/form_entry/entries", [ DateEntry.prototype.clientFormat = 'MM/DD/YYYY'; DateEntry.prototype.serverFormat = 'YYYY-MM-DD'; DateEntry.prototype.initWidget = function ($element, answer) { - cloudcareUtils.initDatePicker($element, answer); + return cloudcareUtils.initDatePicker($element, answer); }; function TimeEntry(question, options) { this.templateType = 'time'; if (question.style) { if (question.stylesContains(constants.TIME_12_HOUR)) { - this.clientFormat = 'h:mm a'; + this.clientFormat = 'h:mm T'; } } DateTimeEntryBase.call(this, question, options); @@ -845,7 +846,7 @@ hqDefine("cloudcare/js/form_entry/entries", [ TimeEntry.prototype.clientFormat = 'HH:mm'; TimeEntry.prototype.serverFormat = 'HH:mm'; TimeEntry.prototype.initWidget = function ($element, answer) { - cloudcareUtils.initTimePicker($element, answer, this.clientFormat); + return cloudcareUtils.initTimePicker($element, answer, this.clientFormat); }; function EthiopianDateEntry(question, options) { diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js index 8be1924c3821..a54b5b7f28a5 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/form_ui.js @@ -5,6 +5,7 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ 'underscore', 'DOMPurify/dist/purify.min', 'hqwebapp/js/toggles', + 'es6!hqwebapp/js/bootstrap5_loader', 'cloudcare/js/markdown', 'cloudcare/js/utils', 'cloudcare/js/form_entry/const', @@ -17,6 +18,7 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ _, DOMPurify, toggles, + bootstrap, markdown, cloudcareUtils, constants, @@ -629,12 +631,12 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ $(document).on("click", ".help-text-trigger", function (event) { event.preventDefault(); var container = $(event.currentTarget).closest(".caption"); - container.find(".modal").modal('show'); + bootstrap.Modal.getOrCreateInstance(container.find(".modal")).show(); }); $(document).on("click", ".unsupported-question-type-trigger", function (event) { var container = $(event.currentTarget).closest(".widget"); - container.find(".modal").modal('show'); + bootstrap.Modal.getOrCreateInstance(container.find(".modal")).show(); }); }; @@ -795,7 +797,7 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ }; let columnWidth = GroupedElementTileRow.calculateElementWidth(this.style); - this.elementTile = `col-sm-${columnWidth}`; + this.elementTile = `col-md-${columnWidth}`; } Group.prototype = Object.create(Container.prototype); @@ -895,8 +897,10 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ return (self.error() || self.serverError()) && !self.dirty(); }); + self.isButton = self.datatype() === 'select' && self.stylesContains(constants.BUTTON_SELECT); + self.isLabel = self.datatype() === 'info'; self.hasLabelContent = ko.computed(function () { - return ( + return !self.isButton && ( ko.utils.unwrapObservable(self.caption) || ko.utils.unwrapObservable(self.caption_markdown) || ko.utils.unwrapObservable(self.help) @@ -918,8 +922,6 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ return self.error() === null && self.serverError() === null; }; - self.isButton = self.datatype() === 'select' && self.stylesContains(constants.BUTTON_SELECT); - self.isLabel = self.datatype() === 'info'; self.entry = entries.getEntry(self); self.entryTemplate = function () { return self.entry.templateType + '-entry-ko-template'; @@ -1024,12 +1026,17 @@ hqDefine("cloudcare/js/form_entry/form_ui", [ const columnWidth = GroupedElementTileRow.calculateElementWidth(self.style); if (self.stylesContains(constants.PER_ROW_PATTERN)) { - self.controlWidth = constants.FULL_WIDTH; - self.labelWidth = constants.FULL_WIDTH; - self.questionTileWidth = `col-sm-${columnWidth}`; + self.controlWidth = ""; + self.labelWidth = ""; + self.questionTileWidth = `col-md-${columnWidth}`; } else { - self.controlWidth = constants.CONTROL_WIDTH; - self.labelWidth = constants.LABEL_WIDTH; + if (self.isLabel || self.isButton) { + self.controlWidth = ""; + self.labelWidth = ""; + } else { + self.controlWidth = constants.CONTROL_WIDTH; + self.labelWidth = constants.LABEL_WIDTH; + } self.questionTileWidth = constants.FULL_WIDTH; if (!hasLabel) { self.controlWidth += ' ' + constants.LABEL_OFFSET; diff --git a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js index af3273a4bb6f..e11a2a953f37 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/form_entry/web_form_session.js @@ -228,7 +228,7 @@ hqDefine("cloudcare/js/form_entry/web_form_session", [ errorMessage = errors.NO_INTERNET_ERROR; if (action === constants.SUBMIT) { $('.submit').prop('disabled', false); - $('.form-control').prop('disabled', false); + $('.form-control, .form-select').prop('disabled', false); } } else if (_.has(resp, 'responseJSON') && resp.responseJSON !== undefined) { errorMessage = formEntryUtils.touchformsError(resp.responseJSON.message); diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/app.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/app.js index b63d64165d53..8a5e2594b102 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/app.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/app.js @@ -9,6 +9,7 @@ hqDefine("cloudcare/js/formplayer/app", [ 'backbone', 'backbone.marionette', 'markdown-it/dist/markdown-it', + 'es6!hqwebapp/js/bootstrap5_loader', 'hqwebapp/js/initial_page_data', 'analytix/js/appcues', 'analytix/js/google', @@ -30,6 +31,7 @@ hqDefine("cloudcare/js/formplayer/app", [ Backbone, Marionette, markdowner, + bootstrap, initialPageData, appcues, GGAnalytics, @@ -126,11 +128,11 @@ hqDefine("cloudcare/js/formplayer/app", [ FormplayerFrontend.on('clearForm', function () { $('#webforms').html(""); - $('.menu-scrollable-container').removeClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + $('.menu-scrollable-container').removeClass("d-none"); $('#webforms-nav').html(""); $('#cloudcare-debugger').html(""); $('.atwho-container').remove(); - $('#case-detail-modal').modal('hide'); + bootstrap.Modal.getOrCreateInstance($('#case-detail-modal')).hide(); }); FormplayerFrontend.getChannel().reply('clearMenu', function () { @@ -291,7 +293,7 @@ hqDefine("cloudcare/js/formplayer/app", [ }; var sess = WebFormSession.WebFormSession(data); sess.renderFormXml(data, $('#webforms')); - $('.menu-scrollable-container').addClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + $('.menu-scrollable-container').addClass("d-none"); }); FormplayerFrontend.on("start", function (model, options) { @@ -365,7 +367,7 @@ hqDefine("cloudcare/js/formplayer/app", [ "for offline use. Please reconnect to the Internet before " + "continuing."), $("#cloudcare-notifications")); $('.submit').prop('disabled', 'disabled'); - $('.form-control').prop('disabled', 'disabled'); + $('.form-control, .form-select').prop('disabled', 'disabled'); } },reconnectTimingWindow); }); @@ -375,14 +377,14 @@ hqDefine("cloudcare/js/formplayer/app", [ if ((new Date() - offlineTime) > reconnectTimingWindow) { CloudcareUtils.showSuccess(gettext("You are are back online."), $("#cloudcare-notifications")); $('.submit').prop('disabled', false); - $('.form-control').prop('disabled', false); + $('.form-control, .form-select').prop('disabled', false); } } ); window.addEventListener( 'beforeprint', function () { - $('.panel.panel-default, .q.form-group').last().addClass('last'); + $('.card, .q').last().addClass('last'); } ); diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/apps/views.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/apps/views.js index b4e4fdb9df86..993601bd7bc8 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/apps/views.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/apps/views.js @@ -21,7 +21,7 @@ hqDefine("cloudcare/js/formplayer/apps/views", [ var GridItem = Marionette.View.extend({ template: _.template($("#row-template").html() || ""), tagName: "div", - className: "grid-item col-xs-6 col-sm-4 col-lg-3 formplayer-request", + className: "grid-item col-sm-6 col-md-4 col-xl-3 formplayer-request", events: { "click": "rowClick", "keydown": "rowKeyAction", @@ -101,14 +101,7 @@ hqDefine("cloudcare/js/formplayer/apps/views", [ var GridView = Marionette.CollectionView.extend({ template: _.template($("#grid-template").html() || ""), childView: GridItem, - childViewContainer: function () { - if (window.USE_BOOTSTRAP5) { - return ".row"; - } else { - return ".js-application-container"; - } - }, - + childViewContainer: ".row", events: _.extend(BaseAppView.events), incompleteSessionsClick: _.extend(BaseAppView.incompleteSessionsClick), syncClick: _.extend(BaseAppView.syncClick), @@ -119,6 +112,13 @@ hqDefine("cloudcare/js/formplayer/apps/views", [ restoreAsKeyAction: _.extend(BaseAppView.restoreAsKeyAction), settingsKeyAction: _.extend(BaseAppView.settingsKeyAction), + // Cannot append at the end of the parent because there are + // special grid items. + attachHtml: function attachHtml(els, $container) { + let childElement = $container.find("#put-apps-here"); + $container[0].insertBefore(els, childElement[0]); + }, + initialize: function (options) { this.shouldShowIncompleteForms = options.shouldShowIncompleteForms; }, diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/progress_bar.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/progress_bar.js index 8111f4318b09..b1436f9ff437 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/progress_bar.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/progress_bar.js @@ -29,13 +29,12 @@ hqDefine("cloudcare/js/formplayer/layout/views/progress_bar", [ }, setProgress: function (done, total, duration) { - const invisibilityClass = window.USE_BOOTSTRAP5 ? "d-none" : "hide"; if (done === 0) { - this.progressEl.find('.progress').addClass(invisibilityClass); - this.progressEl.find('.js-loading').removeClass(invisibilityClass); + this.progressEl.find('.progress').addClass("d-none"); + this.progressEl.find('.js-loading').removeClass("d-none"); } else { - this.progressEl.find('.progress').removeClass(invisibilityClass); - this.progressEl.find('.js-loading').addClass(invisibilityClass); + this.progressEl.find('.progress').removeClass("d-none"); + this.progressEl.find('.js-loading').addClass("d-none"); } var progress = total === 0 ? 0 : done / total; diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/settings.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/settings.js index c9285dec04e9..bd9d2ea3cba7 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/settings.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/layout/views/settings.js @@ -7,7 +7,6 @@ hqDefine("cloudcare/js/formplayer/layout/views/settings", [ 'cloudcare/js/formplayer/apps/api', 'cloudcare/js/formplayer/users/models', 'cloudcare/js/formplayer/utils/utils', - 'bootstrap-switch/dist/js/bootstrap-switch', // bootstrapSwitch: only when window.USE_BOOTSTRAP5 is false ], function ( $, _, @@ -67,18 +66,15 @@ hqDefine("cloudcare/js/formplayer/layout/views/settings", [ oneQuestionPerScreen: '.js-one-question-per-screen', }, events: { - 'switchChange.bootstrapSwitch @ui.oneQuestionPerScreen': 'onChangeOneQuestionPerScreen', + 'change @ui.oneQuestionPerScreen': 'onChangeOneQuestionPerScreen', }, onRender: function () { - if (!window.USE_BOOTSTRAP5) { - this.ui.oneQuestionPerScreen.bootstrapSwitch( - 'state', - this.currentUser.displayOptions.oneQuestionPerScreen - ); + if (this.currentUser.displayOptions.oneQuestionPerScreen) { + this.ui.oneQuestionPerScreen.attr("checked", "checked"); } }, - onChangeOneQuestionPerScreen: function (e, switchValue) { - this.currentUser.displayOptions.oneQuestionPerScreen = switchValue; + onChangeOneQuestionPerScreen: function (e) { + this.currentUser.displayOptions.oneQuestionPerScreen = e.target.checked; UsersModels.saveDisplayOptions(this.currentUser.displayOptions); }, }); diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/main.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/main.js index fc8a83a82bfb..4a7b547f69aa 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/main.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/main.js @@ -31,14 +31,14 @@ hqDefine("cloudcare/js/formplayer/main", [ $trialBanner = $('#cta-trial-banner'); var hideMenu = function () { $menuToggle.data('minimized', 'yes'); - $navbar.addClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); - $trialBanner.addClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + $navbar.addClass("d-none"); + $trialBanner.addClass("d-none"); $menuToggle.text(gettext('Show Full Menu')); }; var showMenu = function () { $menuToggle.data('minimized', 'no'); - $navbar.removeClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); - $trialBanner.removeClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + $navbar.removeClass("d-none"); + $trialBanner.removeClass("d-none"); $navbar.css('margin-top', ''); $menuToggle.text(gettext('Hide Full Menu')); }; diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/controller.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/controller.js index b502e4ea982b..f58904708bcc 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/controller.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/controller.js @@ -4,6 +4,7 @@ hqDefine("cloudcare/js/formplayer/menus/controller", [ 'underscore', 'backbone', 'DOMPurify/dist/purify.min', + 'es6!hqwebapp/js/bootstrap5_loader', 'hqwebapp/js/initial_page_data', 'hqwebapp/js/toggles', 'cloudcare/js/markdown', @@ -21,6 +22,7 @@ hqDefine("cloudcare/js/formplayer/menus/controller", [ _, Backbone, DOMPurify, + bootstrap, initialPageData, toggles, markdown, @@ -255,8 +257,7 @@ hqDefine("cloudcare/js/formplayer/menus/controller", [ $('#case-detail-modal').find('.js-detail-tabs').html(tabListView.render().el); $('#case-detail-modal').find('.js-detail-content').html(contentView.render().el); $('#case-detail-modal').find('.js-detail-footer-content').html(detailFooterView.render().el); - $('#case-detail-modal').modal('show'); - + bootstrap.Modal.getOrCreateInstance($('#case-detail-modal')).show(); }; var getDetailList = function (detailObject) { diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views.js index 1e342ec36f7d..62188440e118 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views.js @@ -41,7 +41,13 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ return 'tr'; } }, - className: "formplayer-request", + className: function () { + let classNames = "formplayer-request"; + if (this.isGrid()) { + classNames += " col-sm-6 col-md-4 col-lg-3"; + } + return classNames; + }, attributes: function () { const displayText = this.options.model.attributes.displayText; return { @@ -85,15 +91,14 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ e.preventDefault(); const $playBtn = $(e.originalEvent.srcElement).closest('.js-module-audio-play'); const $pauseBtn = $playBtn.parent().find('.js-module-audio-pause'); - const displayClass = window.USE_BOOTSTRAP5 ? "d-none" : "hide"; - $pauseBtn.removeClass(displayClass); - $playBtn.addClass(displayClass); + $pauseBtn.removeClass("d-none"); + $playBtn.addClass("d-none"); const $audioElem = $playBtn.parent().find('.js-module-audio'); if ($audioElem.data('isFirstPlay') !== 'yes') { $audioElem.data('isFirstPlay', 'yes'); $audioElem.one('ended', function () { - $playBtn.removeClass(displayClass); - $pauseBtn.addClass(displayClass); + $playBtn.removeClass("d-none"); + $pauseBtn.addClass("d-none"); $audioElem.data('isFirstPlay', 'no'); }); } @@ -102,9 +107,8 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ audioPause: function (e) { e.preventDefault(); const $pauseBtn = $(e.originalEvent.srcElement).closest('.js-module-audio-pause'); - const displayClass = window.USE_BOOTSTRAP5 ? "d-none" : "hide"; - $pauseBtn.parent().find('.js-module-audio-play').removeClass(displayClass); - $pauseBtn.addClass(displayClass); + $pauseBtn.parent().find('.js-module-audio-play').removeClass("d-none"); + $pauseBtn.addClass("d-none"); $pauseBtn.parent().find('.js-module-audio').get(0).pause(); }, rowKeyAction: function (e) { @@ -341,7 +345,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const $spinnerElement = $iconButton.find('i'); $moduleIcon.css('display', 'none'); $iconButton.addClass('disabled'); - $spinnerElement.css('display', ''); + $spinnerElement.removeClass("d-none"); const currentUrlToObject = formplayerUtils.currentUrlToObject(); currentUrlToObject.endpointArgs = {[endpointArg]: caseId}; @@ -351,7 +355,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ function resetIcon() { $moduleIcon.css('display', ''); $iconButton.removeClass('disabled'); - $spinnerElement.css('display', 'none'); + $spinnerElement.addClass("d-none"); } $.when(FormplayerFrontend.getChannel().request("icon:click", currentUrlToObject)).done(function () { @@ -485,7 +489,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const CaseTileView = CaseView.extend({ tagName: "div", - className: "formplayer-request list-cell-wrapper-style panel panel-default", + className: "formplayer-request list-cell-wrapper-style card", template: _.template($("#case-tile-view-item-template").html() || ""), templateContext: function () { const dict = CaseTileView.__super__.templateContext.apply(this, arguments); @@ -509,7 +513,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const CaseTileViewUnclickable = CaseTileView.extend({ events: {}, - className: "list-cell-wrapper-style panel panel-default", + className: "list-cell-wrapper-style card", rowClick: function () {}, }); @@ -533,7 +537,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const CaseTileGroupedView = CaseTileView.extend({ tagName: "div", - className: "formplayer-request list-cell-wrapper-style case-tile-group panel panel-default", + className: "formplayer-request list-cell-wrapper-style case-tile-group card", template: _.template($("#case-tile-grouped-view-item-template").html() || ""), templateContext: function () { const dict = CaseTileGroupedView.__super__.templateContext.apply(this, arguments); @@ -795,15 +799,14 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const mapDiv = $('#module-case-list-map'); const moduleCaseList = $('#module-case-list'); const hideButton = $('#hide-map-button'); - const displayClass = window.USE_BOOTSTRAP5 ? "d-none" : "hide"; - if (!mapDiv.hasClass(displayClass)) { - mapDiv.addClass(displayClass); - moduleCaseList.removeClass('col-md-7 col-md-pull-5').addClass('col-md'); + if (!mapDiv.hasClass("d-none")) { + mapDiv.addClass("d-none"); + moduleCaseList.removeClass('col-lg-7').addClass('col-lg'); hideButton.text(gettext('Show Map')); $(e.target).attr('aria-expanded', 'false'); } else { - mapDiv.removeClass(displayClass); - moduleCaseList.addClass('col-md-7 col-md-pull-5').removeClass('col-md'); + mapDiv.removeClass("d-none"); + moduleCaseList.addClass('col-lg-7').removeClass('col-lg'); hideButton.text(gettext('Hide Map')); $(e.target).attr('aria-expanded', 'true'); } @@ -854,7 +857,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ if (this.selectedCaseIds.length > this.maxSelectValue) { let errorMessage = _.template(gettext("You have selected more than the maximum selection limit " + "of <%- value %> . Please uncheck some values to continue."))({ value: this.maxSelectValue }); - hqRequire(["hqwebapp/js/bootstrap3/alert_user"], function (alertUser) { + hqRequire(["hqwebapp/js/bootstrap5/alert_user"], function (alertUser) { alertUser.alert_user(errorMessage, 'danger'); }); } @@ -1014,7 +1017,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ self.boundHandleScroll = self.handleScroll.bind(self); $(window).on('scroll', self.boundHandleScroll); if (self.shouldShowScrollButton()) { - $('#scroll-to-bottom').removeClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + $('#scroll-to-bottom').removeClass("d-none"); } }, @@ -1270,13 +1273,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const BreadcrumbView = Marionette.View.extend({ tagName: "li", template: _.template($("#breadcrumb-item-template").html() || ""), - className: function () { - if (window.USE_BOOTSTRAP5) { - return "breadcrumb-item"; - } else { - return "breadcrumb-text"; - } - }, + className: "breadcrumb-item", attributes: function () { let attributes = { "role": "link", @@ -1427,13 +1424,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const DetailTabView = Marionette.View.extend({ tagName: "li", - className: function () { - if (window.USE_BOOTSTRAP5) { - return "nav-item"; - } else { - return this.options.model.get('active') ? 'active' : ''; - } - }, + className: "nav-item", attributes: { role: "presentation", }, @@ -1466,13 +1457,7 @@ hqDefine("cloudcare/js/formplayer/menus/views", [ const CaseDetailFooterView = Marionette.View.extend({ tagName: "div", - className: function () { - if (window.USE_BOOTSTRAP5) { - return "d-flex gap-2 justify-content-center"; - } else { - return ""; - } - }, + className: "d-flex gap-2 justify-content-center", events: { "click #select-case": "selectCase", }, diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js index bb9af94a8795..560abf2f2a66 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/menus/views/query.js @@ -7,6 +7,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ 'backbone.marionette', 'moment', 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/tempus_dominus', 'hqwebapp/js/toggles', 'analytix/js/kissmetrix', 'cloudcare/js/markdown', @@ -17,8 +18,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ 'cloudcare/js/formplayer/constants', 'cloudcare/js/formplayer/menus/collections', 'cloudcare/js/formplayer/utils/utils', - 'hqwebapp/js/bootstrap3/hq.helpers', // needed for hqHelp - 'bootstrap-daterangepicker/daterangepicker', // needed for $.daterangepicker + 'hqwebapp/js/bootstrap5/hq.helpers', // needed for hqHelp 'cloudcare/js/formplayer/menus/api', // needed for app:select:menus 'select2/dist/js/select2.full.min', ], function ( @@ -29,6 +29,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ Marionette, moment, initialPageData, + hqTempusDominus, toggles, kissmetrics, markdown, @@ -40,7 +41,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ Collection, formplayerUtils ) { - var separator = " to ", + var separator = hqTempusDominus.getDateRangeSeparator(), serverSeparator = "__", serverPrefix = "__range__", dateFormat = cloudcareUtils.dateFormat, @@ -299,7 +300,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ events: { 'change @ui.queryField': 'changeQueryField', 'change @ui.searchForBlank': 'notifyParentOfFieldChange', - 'dp.change @ui.queryField': 'changeDateQueryField', + 'change.td @ui.date': 'changeDateQueryField', 'click @ui.searchForBlank': 'toggleBlankSearch', }, @@ -378,9 +379,6 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ self.errorMessage = null; self.model.set('searchForBlank', false); sessionStorage.removeItem('geocoderValues'); - if (self.ui.date.length) { - self.ui.date.data("DateTimePicker").clear(); - } self._render(); FormplayerFrontend.trigger('clearNotifications'); }, @@ -470,29 +468,21 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ onRender: function () { this._initializeSelect2Dropdown(); const fallback = this.parentView.options.sidebarEnabled && this.parentView.smallScreenEnabled ? 'bottom' : 'right'; - if (window.USE_BOOTSTRAP5) { - this.ui.hqHelp.hqHelp({placement: 'auto', fallbackPlacements: [fallback]}); - } else { - this.ui.hqHelp.hqHelp({placement: 'auto ' + fallback}); - } + this.ui.hqHelp.hqHelp({ + placement: 'auto', + fallbackPlacements: [fallback], + }); cloudcareUtils.initDatePicker(this.ui.date, this.model.get('value')); - this.ui.dateRange.daterangepicker({ - locale: { - format: dateFormat, - separator: separator, - }, - autoUpdateInput: false, - "autoApply": true, + this.ui.dateRange.each(function (index, el) { + hqTempusDominus.createDefaultDateRangePicker(el, { + localization: { + format: dateFormat, + }, + }); }); this.ui.dateRange.attr("placeholder", dateFormat + separator + dateFormat); let separatorChars = _.unique(separator).join(""); this.ui.dateRange.attr("pattern", "^[\\d\\/\\-" + separatorChars + "]*$"); - this.ui.dateRange.on('cancel.daterangepicker', function () { - $(this).val('').trigger('change'); - }); - this.ui.dateRange.on('apply.daterangepicker', function (ev, picker) { - $(this).val(picker.startDate.format(dateFormat) + separator + picker.endDate.format(dateFormat)).trigger('change'); - }); this.ui.dateRange.on('change', function () { // Validate free-text input var start, end, @@ -514,7 +504,7 @@ hqDefine("cloudcare/js/formplayer/menus/views/query", [ } }); if (this.model.get('hidden') === 'true') { - this.$el.addClass(window.USE_BOOTSTRAP5 ? "d-none" : "hide"); + this.$el.addClass("d-none"); } }, diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/users/views.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/users/views.js index 2635edf7cc1a..afaea59f85a5 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/users/views.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/users/views.js @@ -6,6 +6,7 @@ hqDefine("cloudcare/js/formplayer/users/views", [ 'backbone.marionette', 'hqwebapp/js/toggles', 'cloudcare/js/formplayer/app', + 'cloudcare/js/formplayer/constants', 'cloudcare/js/formplayer/utils/utils', 'cloudcare/js/formplayer/users/models', 'cloudcare/js/formplayer/users/utils', @@ -16,6 +17,7 @@ hqDefine("cloudcare/js/formplayer/users/views", [ Marionette, toggles, FormplayerFrontend, + constants, formplayerUtils, usersModels, usersUtils @@ -85,7 +87,7 @@ hqDefine("cloudcare/js/formplayer/users/views", [ message: _.template($('#user-data-template').html())( { user: this.model.toJSON() } ), - confirmText: gettext('Yes, log in as this user'), + confirmText: gettext('Log in'), onConfirm: function () { usersUtils.Users.logInAsUser(this.model.get('username')); FormplayerFrontend.regions.getRegion('restoreAsBanner').show( @@ -153,12 +155,14 @@ hqDefine("cloudcare/js/formplayer/users/views", [ 'keypress @ui.paginationGoTextBox': 'paginationGoKeyAction', }, templateContext: function () { - var paginationOptions = formplayerUtils.paginateOptions( + const environment = usersModels.getCurrentUser().environment; + const paginationOptions = formplayerUtils.paginateOptions( this.model.get('page') - 1, this.totalPages(), this.collection.total ); return _.extend(paginationOptions, { + isAppPreview: environment === constants.PREVIEW_APP_ENVIRONMENT, total: this.collection.total, totalPages: this.totalPages(), limit: this.limit, diff --git a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/utils/utils.js b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/utils/utils.js index 387d5a764e98..5a5d413cccf9 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/formplayer/utils/utils.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/formplayer/utils/utils.js @@ -4,14 +4,16 @@ hqDefine("cloudcare/js/formplayer/utils/utils", [ 'underscore', 'backbone', 'DOMPurify/dist/purify.min', + 'es6!hqwebapp/js/bootstrap5_loader', 'hqwebapp/js/initial_page_data', 'hqwebapp/js/toggles', - "cloudcare/js/formplayer/constants" + "cloudcare/js/formplayer/constants", ], function ( $, _, Backbone, DOMPurify, + bootstrap, initialPageData, toggles, constants @@ -51,7 +53,7 @@ hqDefine("cloudcare/js/formplayer/utils/utils", [ $confirmationButton.on('click.confirmationModal', function (e) { options.onConfirm(e); }); - $modal.modal('show'); + bootstrap.Modal.getOrCreateInstance($modal).show(); }; Utils.encodedUrlToObject = function (encodedUrl) { diff --git a/corehq/apps/cloudcare/static/cloudcare/js/preview_app/dragscroll.js b/corehq/apps/cloudcare/static/cloudcare/js/preview_app/dragscroll.js index 59d3d6b54dba..e3747fd1d331 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/preview_app/dragscroll.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/preview_app/dragscroll.js @@ -47,9 +47,12 @@ hqDefine("cloudcare/js/preview_app/dragscroll", ["jquery"], function ($) { lastClientY = e.clientY; // monkeypatch - if (!($(e.srcElement).hasClass('form-control') || $(e.target).hasClass('form-control'))) { + if (!( + $(e.srcElement).hasClass('form-control') || $(e.target).hasClass('form-control') + || $(e.srcElement).hasClass('form-select') || $(e.target).hasClass('form-select') + )) { e.preventDefault(); - $('.form-control').blur(); + $('.form-control, .form-select').blur(); } } diff --git a/corehq/apps/cloudcare/static/cloudcare/js/preview_app/main.js b/corehq/apps/cloudcare/static/cloudcare/js/preview_app/main.js index cfc21d5ccbce..7fe70401c55e 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/preview_app/main.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/preview_app/main.js @@ -32,7 +32,7 @@ hqDefine("cloudcare/js/preview_app/main", [ }); $('.dragscroll').on('scroll', function () { - $('.form-control').blur(); + $('.form-control, .form-select').blur(); }); // Adjust for those pesky scrollbars diff --git a/corehq/apps/cloudcare/static/cloudcare/js/utils.js b/corehq/apps/cloudcare/static/cloudcare/js/utils.js index e064655f7d46..24226b001d3f 100644 --- a/corehq/apps/cloudcare/static/cloudcare/js/utils.js +++ b/corehq/apps/cloudcare/static/cloudcare/js/utils.js @@ -5,19 +5,20 @@ hqDefine('cloudcare/js/utils', [ 'backbone.marionette', 'moment', 'hqwebapp/js/initial_page_data', + 'hqwebapp/js/tempus_dominus', "hqwebapp/js/toggles", "cloudcare/js/formplayer/constants", "cloudcare/js/formplayer/layout/views/progress_bar", 'nprogress/nprogress', 'sentry_browser', "cloudcare/js/formplayer/users/models", - 'eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min', // for $.datetimepicker ], function ( $, _, Marionette, moment, initialPageData, + hqTempusDominus, toggles, constants, ProgressBar, @@ -108,17 +109,7 @@ hqDefine('cloudcare/js/utils', [ // HTML errors may already have an alert dialog $alertDialog = $container.hasClass("alert") ? $container : $container.find('.alert'); try { - if (window.USE_BOOTSTRAP5) { - $alertDialog.append($(" - - - - - - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/confirmation_modal.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/confirmation_modal.html deleted file mode 100644 index 93ebe8b37ef1..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/confirmation_modal.html +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/debugger.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/debugger.html deleted file mode 100644 index bad3785dfe1c..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/debugger.html +++ /dev/null @@ -1,204 +0,0 @@ -{% load i18n %} -{% load hq_shared_tags %} - - - - - - - - - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/new_app_version_modal.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/new_app_version_modal.html deleted file mode 100644 index fda4ed1cc884..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/new_app_version_modal.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} - - \ No newline at end of file diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/pagination.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/pagination.html deleted file mode 100644 index 9f76ed84b650..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/pagination.html +++ /dev/null @@ -1,108 +0,0 @@ -{% load i18n %} -{% load hq_shared_tags %} - - - -{% block pagination_templates %} - <% if (showPagination) { %> -
-
-
-
- -
-
- <% if (pageCount > 1) { %> -
-
- -
- -
-
-
-
- -
- <% } %> -
-
- <% } %> -{% endblock %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/progress.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/progress.html deleted file mode 100644 index 217a9de99c50..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/progress.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/settings_view.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/settings_view.html deleted file mode 100644 index 82100f963f38..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap3/settings_view.html +++ /dev/null @@ -1,47 +0,0 @@ -{% load hq_shared_tags %} -{% load i18n %} - - - - - - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/all_templates.html b/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/all_templates.html deleted file mode 100644 index 9ea031609179..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/all_templates.html +++ /dev/null @@ -1,68 +0,0 @@ -{% include 'cloudcare/partials/bootstrap5/case_detail.html' %} - -{% include 'cloudcare/partials/case_list/cell_container_style.html' %} -{% include 'cloudcare/partials/case_list/cell_grid_style.html' %} -{% include 'cloudcare/partials/case_list/cell_layout_style.html' %} -{% include 'cloudcare/partials/case_list/detail.html' %} -{% include 'cloudcare/partials/case_list/bootstrap5/item.html' %} -{% include 'cloudcare/partials/case_list/bootstrap5/list.html' %} -{% include 'cloudcare/partials/case_list/bootstrap5/tile_grouped_item.html' %} -{% include 'cloudcare/partials/case_list/bootstrap5/tile_item.html' %} - -{% include 'cloudcare/partials/bootstrap5/debugger.html' %} - -{% include 'cloudcare/partials/form_entry/entry_address.html' %} -{% include 'cloudcare/partials/form_entry/entry_blank.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_button.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_choice_label.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_date.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_datetime.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_dropdown.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_ethiopian_date.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_file.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_geo.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_multidropdown.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_password.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_select.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_signature.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_str.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_text.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_time.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/entry_unsupported.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/form.html' %} -{% include 'cloudcare/partials/form_entry/form_navigation.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/grouped_element_tile_row.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/help_multimedia.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/multimedia.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/question.html' %} -{% include 'cloudcare/partials/form_entry/bootstrap5/sub_group.html' %} - -{% include 'cloudcare/partials/grid_view/bootstrap5/grid.html' %} -{% include 'cloudcare/partials/grid_view/bootstrap5/landing_page_app.html' %} -{% include 'cloudcare/partials/grid_view/bootstrap5/row.html' %} -{% include 'cloudcare/partials/grid_view/bootstrap5/single_app.html' %} - -{% include 'cloudcare/partials/menu/bootstrap5/audio.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/badge.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/breadcrumbs.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/dropdown.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/grid.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/grid_item.html' %} -{% include 'cloudcare/partials/menu/bootstrap5/list.html' %} -{% include 'cloudcare/partials/menu/row.html' %} - -{% include 'cloudcare/partials/bootstrap5/progress.html' %} - -{% include 'cloudcare/partials/query/bootstrap5/group.html' %} -{% include 'cloudcare/partials/query/bootstrap5/item.html' %} -{% include 'cloudcare/partials/query/bootstrap5/list.html' %} - -{% include 'cloudcare/partials/sessions/item.html' %} -{% include 'cloudcare/partials/sessions/bootstrap5/list.html' %} - -{% include 'cloudcare/partials/bootstrap5/settings_view.html' %} - -{% include 'cloudcare/partials/users/bootstrap5/restore_as.html' %} -{% include 'cloudcare/partials/users/restore_as_banner.html' %} -{% include 'cloudcare/partials/users/user_data.html' %} -{% include 'cloudcare/partials/users/user_row.html' %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/case_detail.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_detail.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/case_detail.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_detail.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/list.html deleted file mode 100644 index 8900ae7bfed2..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/list.html +++ /dev/null @@ -1,79 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/menu_header.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/menu_header.html deleted file mode 100644 index 3d117a19501e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/menu_header.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load hq_shared_tags %} -{% load i18n %} - - \ No newline at end of file diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/multi_select_continue_button.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/multi_select_continue_button.html deleted file mode 100644 index aac79cdaf029..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/multi_select_continue_button.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/search_controls.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/search_controls.html deleted file mode 100644 index 3a82e9185697..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/search_controls.html +++ /dev/null @@ -1,28 +0,0 @@ -{% load hq_shared_tags %} -{% load i18n %} - -
-
- <% if (isMultiSelect) { %> - - - <% } %> -
- -
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/table_container.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/table_container.html deleted file mode 100644 index 3c0a0c08caa3..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/table_container.html +++ /dev/null @@ -1,31 +0,0 @@ -{% load hq_shared_tags %} -{% load i18n %} - -
- - - - - <% if (isMultiSelect && !hasNoItems) { %> - - <% } %> - <% _.each(headers, function(header, index) { %> - <% if (columnVisible(index)) { %> - <% if (columnSortable(index)) { %> - - <% } else { %> - - <% } %> - <% } %> - <% }); %> - - - - <% if (hasNoItems) { %> - {% include 'cloudcare/partials/case_list/no_items_text.html' %} - <% } %> - - - -
<%= header %> <%= header %>
-
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_grouped_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_grouped_item.html deleted file mode 100644 index 4bbbb5b8d797..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_grouped_item.html +++ /dev/null @@ -1,58 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_item.html deleted file mode 100644 index ee7a88b5e5e8..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/tile_item.html +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/item.html deleted file mode 100644 index e750f577668e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/item.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/item.html similarity index 94% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/item.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/item.html index 5d2e3ccdf449..0bba7f9d8e9b 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap3/item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/item.html @@ -10,7 +10,7 @@ <% } else if (styles[index].displayFormat === 'Markdown') { %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/list.html similarity index 77% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/list.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/list.html index fb8797b71081..c0d1429818af 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/list.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/list.html @@ -11,11 +11,11 @@ - {% include "cloudcare/partials/case_list/bootstrap5/menu_header.html" %} + {% include "cloudcare/partials/case_list/menu_header.html" %} <% if (isMultiSelect) { %>
- {% include 'cloudcare/partials/case_list/bootstrap5/multi_select_continue_button.html' %} + {% include 'cloudcare/partials/case_list/multi_select_continue_button.html' %}
<% } %> @@ -39,25 +39,25 @@ class="row g-0"> <% if (showMap) { %>
+ class="sticky sticky-map col-lg-5 order-lg-1<% if (useTiles) { %> white-border<% } %> noprint-sub-container"> <% } %> -
+
<% if (useTiles) { %> <% if (hasNoItems) { %> {% include 'cloudcare/partials/case_list/no_items_text.html' %} <% } else { %> - {% include 'cloudcare/partials/case_list/bootstrap5/search_controls.html' %} + {% include 'cloudcare/partials/case_list/search_controls.html' %} <% } %>
<% } else { %> - {% include 'cloudcare/partials/case_list/bootstrap5/table_container.html' %} + {% include 'cloudcare/partials/case_list/table_container.html' %} <% } %>
<% if (actions || isMultiSelect) { %>
<% if (isMultiSelect) { %> - {% include 'cloudcare/partials/case_list/bootstrap5/multi_select_continue_button.html' %} + {% include 'cloudcare/partials/case_list/multi_select_continue_button.html' %} <% } %> <% if (actions) { %> <% _.each(actions, function(action, index) { %> @@ -71,7 +71,7 @@ <% if (!hasNoItems) { %> {% block pagination_templates %} - {% include 'cloudcare/partials/bootstrap5/pagination.html' %} + {% include 'cloudcare/partials/pagination.html' %} {% endblock %} <% } %>
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/menu_header.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/menu_header.html similarity index 86% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/menu_header.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/menu_header.html index 7fb46c2afe49..47ac63021fa8 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/menu_header.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/menu_header.html @@ -10,14 +10,14 @@ <% } %> <% if (sidebarEnabled) { %> - <% } %> <% if (title.length > 0) { %> -

<%- title %>

+

<%- title %>

<% } %> <% if (sidebarEnabled && description.length > 0) { %>
<%= description %>
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/multi_select_continue_button.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/multi_select_continue_button.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/multi_select_continue_button.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/multi_select_continue_button.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/search_controls.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/search_controls.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/search_controls.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/search_controls.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/table_container.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/table_container.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/table_container.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/table_container.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_grouped_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_grouped_item.html similarity index 88% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_grouped_item.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_grouped_item.html index fa14541cc608..4bd71ae3ea68 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_grouped_item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_grouped_item.html @@ -13,7 +13,7 @@ if(resolveUri(datum)) { %> <% } %> <% } else if (styles[index].displayFormat === 'Image') { @@ -21,7 +21,7 @@ <%- altText[index] %> <% } %> <% } else if(styles[index].widthHint === 0) { %> -
<%- datum %>
{# todo B5: inline style #} +
<%- datum %>
<% } else { %>
<%= renderMarkdown(datum) %>
<% } %> @@ -43,7 +43,7 @@ if(resolveUri(datum)) { %> <% } %> <% } else { %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_item.html similarity index 85% rename from corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_item.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_item.html index 29540f5e79f7..69358433b390 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/bootstrap5/tile_item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/case_list/tile_item.html @@ -16,11 +16,11 @@ if(resolveUri(datum)) { %> <% } %> <% } else if(styles[index].widthHint === 0) { %> -
<%- datum %>
{# todo B5: inline style #} +
<%- datum %>
<% } else { %>
<%= renderMarkdown(datum) %>
<% } %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/confirmation_modal.html b/corehq/apps/cloudcare/templates/cloudcare/partials/confirmation_modal.html similarity index 88% rename from corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/confirmation_modal.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/confirmation_modal.html index 7b7fbba1ec21..cee3454d920f 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/confirmation_modal.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/confirmation_modal.html @@ -11,11 +11,11 @@ diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/debugger.html b/corehq/apps/cloudcare/templates/cloudcare/partials/debugger.html similarity index 96% rename from corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/debugger.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/debugger.html index 958495489c37..481d43f63b13 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/debugger.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/debugger.html @@ -149,7 +149,7 @@ type="button" data-bind="css: { disabled: !selectedXPath() }, click: onClickSelectedXPath"/>
- +
-
-
-

{% trans "Recent Queries" %}

-
-
+

{% trans "Recent Queries" %}

diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_button.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_button.html deleted file mode 100644 index ebe8a5c85050..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_button.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_choice_label.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_choice_label.html deleted file mode 100644 index 4239ea40a2ef..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_choice_label.html +++ /dev/null @@ -1,30 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_date.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_date.html deleted file mode 100644 index 3c3dbc2ff82e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_date.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_datetime.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_datetime.html deleted file mode 100644 index 16106b11550b..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_datetime.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_dropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_dropdown.html deleted file mode 100644 index c13a03e542ce..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_dropdown.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_ethiopian_date.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_ethiopian_date.html deleted file mode 100644 index ec803057a374..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_ethiopian_date.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_file.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_file.html deleted file mode 100644 index d9e5e26c8288..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_file.html +++ /dev/null @@ -1,23 +0,0 @@ -{% load hq_shared_tags %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_geo.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_geo.html deleted file mode 100644 index 16db8ad3098b..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_geo.html +++ /dev/null @@ -1,36 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_multidropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_multidropdown.html deleted file mode 100644 index 6f1a5f714789..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_multidropdown.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_password.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_password.html deleted file mode 100644 index 974ed1618f44..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_password.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_select.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_select.html deleted file mode 100644 index 6ce0a440111e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_select.html +++ /dev/null @@ -1,30 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_signature.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_signature.html deleted file mode 100644 index 37c80f368b36..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_signature.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_str.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_str.html deleted file mode 100644 index 72d1bebf13dd..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_str.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_text.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_text.html deleted file mode 100644 index d4d52676564e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_text.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_time.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_time.html deleted file mode 100644 index 1ed97412d140..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/entry_time.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/form.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/form.html deleted file mode 100644 index 83a5b5179c9b..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/form.html +++ /dev/null @@ -1,72 +0,0 @@ -{% load i18n %} -{% load hq_shared_tags %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/grouped_element_tile_row.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/grouped_element_tile_row.html deleted file mode 100644 index eee27db7a158..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/grouped_element_tile_row.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/help_multimedia.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/help_multimedia.html deleted file mode 100644 index 873b450e90e4..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/help_multimedia.html +++ /dev/null @@ -1,23 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/multimedia.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/multimedia.html deleted file mode 100644 index b16443943cbe..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/multimedia.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/question.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/question.html deleted file mode 100644 index 2a06fee977c6..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/question.html +++ /dev/null @@ -1,138 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/sub_group.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/sub_group.html deleted file mode 100644 index 1f3d059e3e7e..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap3/sub_group.html +++ /dev/null @@ -1,103 +0,0 @@ -{% load i18n %} -{% load hq_shared_tags %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_file.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_file.html deleted file mode 100644 index 432dd222ea16..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_file.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load hq_shared_tags %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_unsupported.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_unsupported.html deleted file mode 100644 index 8f56dc4f4a55..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_unsupported.html +++ /dev/null @@ -1,27 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_button.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_button.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_button.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_button.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_choice_label.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_choice_label.html similarity index 94% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_choice_label.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_choice_label.html index c998c91e0265..e1975aec402c 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_choice_label.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_choice_label.html @@ -12,7 +12,7 @@ id: 'group-' + $parent.entryId + '-choice-' + $index(), 'aria-labelledby': $parent.entryId + '-choice-' + $index() + '-sr', name: $parent.entryId, - css: { 'is-invalid': $root.hasError() }, + css: { 'is-invalid': $parent.question.hasError() }, class: 'group-' + $parent.entryId, } "/> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_date.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_date.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_date.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_date.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_datetime.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_datetime.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_datetime.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_datetime.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_dropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_dropdown.html similarity index 90% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_dropdown.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_dropdown.html index b2d1ae28f6c3..95c8c750c396 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_dropdown.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_dropdown.html @@ -1,5 +1,5 @@ diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_geo.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_geo.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_geo.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_geo.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_multidropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_multidropdown.html similarity index 87% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_multidropdown.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_multidropdown.html index cad95edbdca9..41d962288828 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/entry_multidropdown.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/entry_multidropdown.html @@ -1,5 +1,5 @@ diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/help_multimedia.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/help_multimedia.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/help_multimedia.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/help_multimedia.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/multimedia.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/multimedia.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/multimedia.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/multimedia.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/question.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/question.html similarity index 61% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/question.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/question.html index 414736e4354f..99f5a27710a9 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/question.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/question.html @@ -1,8 +1,8 @@ +{% load hq_shared_tags %} {% load i18n %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/sub_group.html b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/sub_group.html similarity index 96% rename from corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/sub_group.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/sub_group.html index 7fb9387ea314..8ade3d27b6a1 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/bootstrap5/sub_group.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/form_entry/sub_group.html @@ -66,7 +66,7 @@ css: {'fa-angle-double-right': !showChildren(), 'fa-angle-double-down': showChildren()}, "> - + + <% } %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/list.html similarity index 91% rename from corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/list.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/query/list.html index 943a0b01e3ca..b55ef47954b5 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/list.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/query/list.html @@ -3,7 +3,7 @@ diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/item.html index c88333db365e..e7eea885c2b3 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/item.html @@ -12,7 +12,10 @@

<% if (caseName) { %>(<%- caseName %>)<% } %> opened <%- humanDateOpened %>

-
+ + +
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/bootstrap5/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/list.html similarity index 93% rename from corehq/apps/cloudcare/templates/cloudcare/partials/sessions/bootstrap5/list.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/sessions/list.html index 3ad70e62c190..259ff5f35e9b 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/bootstrap5/list.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/sessions/list.html @@ -31,7 +31,7 @@

{% trans "Incomplete Forms" %}

<%- displayText ? displayText : "" %>

-
+
+
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/badge.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/badge.html similarity index 83% rename from corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/badge.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/menu/badge.html index 5c9ed4b230c6..2de916591dff 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/badge.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/badge.html @@ -6,6 +6,6 @@ and is different from x === undefined. */ %> <% if (typeof badgeText !== 'undefined' && badgeText) { %> - <%- badgeText %> + <%- badgeText %> <% } %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/audio.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/audio.html deleted file mode 100644 index e7aaf9feda42..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/audio.html +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/breadcrumbs.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/breadcrumbs.html deleted file mode 100644 index 4447ab2116cf..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/breadcrumbs.html +++ /dev/null @@ -1,15 +0,0 @@ -{% load i18n %} - - - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/dropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/dropdown.html deleted file mode 100644 index 28be407acf86..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/dropdown.html +++ /dev/null @@ -1,24 +0,0 @@ -{% load i18n %} - - - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid.html deleted file mode 100644 index 333474021597..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid.html +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid_item.html deleted file mode 100644 index ed02feb25de9..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/grid_item.html +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/list.html deleted file mode 100644 index 9a18181ff0b3..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap3/list.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/badge.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/badge.html deleted file mode 100644 index 39cd089f22cb..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/badge.html +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/breadcrumbs.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/breadcrumbs.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/breadcrumbs.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/menu/breadcrumbs.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/dropdown.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/dropdown.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/dropdown.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/menu/dropdown.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/grid.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/grid.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/grid.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/menu/grid.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/grid_item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/grid_item.html similarity index 96% rename from corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/grid_item.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/menu/grid_item.html index bdfde964e06d..36088398444b 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/menu/bootstrap5/grid_item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/menu/grid_item.html @@ -1,5 +1,5 @@ diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/item.html deleted file mode 100644 index 3aa3c526acaf..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/item.html +++ /dev/null @@ -1,97 +0,0 @@ -{% load hq_shared_tags %} -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/list.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/list.html deleted file mode 100644 index 79d79fde721b..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap3/list.html +++ /dev/null @@ -1,40 +0,0 @@ -{% load i18n %} - - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/group.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/group.html deleted file mode 100644 index a71b34e07b2f..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/group.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/group.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/group.html new file mode 100644 index 000000000000..72353fcdfc79 --- /dev/null +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/query/group.html @@ -0,0 +1,16 @@ + diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/item.html b/corehq/apps/cloudcare/templates/cloudcare/partials/query/item.html similarity index 71% rename from corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/item.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/query/item.html index d49549aff289..3c0b04a420f6 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/query/bootstrap5/item.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/query/item.html @@ -23,7 +23,8 @@ class="<% if (contentTag === 'td') { %>col-sm-6 <% } else { %>input-group-sm <% } %>query-input-group"> <% if (input == "select1") { %> - aria-required="true"<% } %>> <% for (let key in itemsetChoicesDict) { %>
+
<% if (endPage) { %> {% block pagination_templates %} - {% include 'cloudcare/partials/bootstrap5/pagination.html' %} + {% include 'cloudcare/partials/pagination.html' %} {% endblock %} <% } %>
diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/settings_view.html b/corehq/apps/cloudcare/templates/cloudcare/partials/settings_view.html similarity index 97% rename from corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/settings_view.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/settings_view.html index 6eab93a10872..faedd2d1dc02 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/bootstrap5/settings_view.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/settings_view.html @@ -30,7 +30,7 @@

{% trans "Settings" %}

diff --git a/corehq/apps/cloudcare/templates/cloudcare/partials/users/bootstrap5/restore_as.html b/corehq/apps/cloudcare/templates/cloudcare/partials/users/restore_as.html similarity index 84% rename from corehq/apps/cloudcare/templates/cloudcare/partials/users/bootstrap5/restore_as.html rename to corehq/apps/cloudcare/templates/cloudcare/partials/users/restore_as.html index 7ad4bccc54b2..67ccbe25c0e5 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/partials/users/bootstrap5/restore_as.html +++ b/corehq/apps/cloudcare/templates/cloudcare/partials/users/restore_as.html @@ -14,7 +14,7 @@

{% trans "Log in as user" %}

value="<%- query %>" placeholder="{% trans_html_attr "Filter workers" %}" /> @@ -24,7 +24,7 @@

{% trans "Log in as user" %}

<% if (endPage) { %> {% block pagination_templates %} - {% include 'cloudcare/partials/bootstrap5/pagination.html' %} + {% include 'cloudcare/partials/pagination.html' %} {% endblock %} <% } %> diff --git a/corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app.html b/corehq/apps/cloudcare/templates/cloudcare/preview_app.html similarity index 96% rename from corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app.html rename to corehq/apps/cloudcare/templates/cloudcare/preview_app.html index 0870d0a1e5cd..1de3beb6e50d 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app.html +++ b/corehq/apps/cloudcare/templates/cloudcare/preview_app.html @@ -1,4 +1,4 @@ -{% extends "cloudcare/bootstrap5/preview_app_base.html" %} +{% extends "cloudcare/preview_app_base.html" %} {% load hq_shared_tags %} {% load compress %} @@ -22,6 +22,7 @@ {% initial_page_data 'allowed_host' request.get_host %} {% initial_page_data 'app' app %} + {% initial_page_data 'daterangepicker-show-clear' 'true' %} {% initial_page_data 'debugger_enabled' request.couch_user.can_edit_data %} {% initial_page_data 'domain' request.domain %} {% initial_page_data 'environment' environment %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app_base.html b/corehq/apps/cloudcare/templates/cloudcare/preview_app_base.html similarity index 94% rename from corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app_base.html rename to corehq/apps/cloudcare/templates/cloudcare/preview_app_base.html index fc63a599dfdd..62b81b425b60 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/bootstrap5/preview_app_base.html +++ b/corehq/apps/cloudcare/templates/cloudcare/preview_app_base.html @@ -57,15 +57,14 @@ {# This is fine as an inline script; it'll be removed once form designer is migrated to RequireJS #} {% block body %}{% endblock %} -{% include 'cloudcare/partials/bootstrap5/confirmation_modal.html' %} -{% include 'cloudcare/partials/bootstrap5/all_templates.html' %} +{% include 'cloudcare/partials/confirmation_modal.html' %} +{% include 'cloudcare/partials/all_templates.html' %} {% block js %}{{ block.super }} {% include 'cloudcare/partials/dependencies.html' %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap3/mocha.html b/corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap3/mocha.html deleted file mode 100644 index ac4e91b326a3..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap3/mocha.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "mocha/base.html" %} -{% load hq_shared_tags %} - -{% requirejs_main "cloudcare/js/formplayer/spec/main" %} - -{% block dependencies %} - {% include "cloudcare/partials/dependencies.html" %} -{% endblock %} - -{% block fixtures %} -
-
- -
- - - - {% include 'cloudcare/partials/bootstrap3/confirmation_modal.html' %} - {% include 'cloudcare/partials/bootstrap3/all_templates.html' %} - -{% endblock %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/bootstrap3/mocha.html b/corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/bootstrap3/mocha.html deleted file mode 100644 index c99aa28c8c24..000000000000 --- a/corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/bootstrap3/mocha.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "mocha/base.html" %} -{% load hq_shared_tags %} - -{% requirejs_main "cloudcare/js/form_entry/spec/main" %} - -{% block stylesheets %}{{ block.super }} - -{% endblock %} - -{% block dependencies %} - {% include "cloudcare/partials/dependencies.html" %} -{% endblock %} - -{% block fixtures %} -
-{% endblock %} diff --git a/corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/bootstrap5/mocha.html b/corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/mocha.html similarity index 100% rename from corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/bootstrap5/mocha.html rename to corehq/apps/cloudcare/templates/cloudcare/spec/form_entry/mocha.html diff --git a/corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap5/mocha.html b/corehq/apps/cloudcare/templates/cloudcare/spec/mocha.html similarity index 79% rename from corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap5/mocha.html rename to corehq/apps/cloudcare/templates/cloudcare/spec/mocha.html index 485a46e300a9..3cedc4fe1f95 100644 --- a/corehq/apps/cloudcare/templates/cloudcare/spec/bootstrap5/mocha.html +++ b/corehq/apps/cloudcare/templates/cloudcare/spec/mocha.html @@ -15,7 +15,7 @@ - {% include 'cloudcare/partials/bootstrap5/confirmation_modal.html' %} - {% include 'cloudcare/partials/bootstrap5/all_templates.html' %} + {% include 'cloudcare/partials/confirmation_modal.html' %} + {% include 'cloudcare/partials/all_templates.html' %} {% endblock %} diff --git a/corehq/apps/cloudcare/views.py b/corehq/apps/cloudcare/views.py index c29d0e95d625..115760064616 100644 --- a/corehq/apps/cloudcare/views.py +++ b/corehq/apps/cloudcare/views.py @@ -74,7 +74,7 @@ from corehq.apps.groups.models import Group from corehq.apps.hqwebapp.decorators import ( use_bootstrap5, - use_daterangepicker, + use_tempusdominus, waf_allow, ) from corehq.apps.hqwebapp.templatetags.hq_shared_tags import can_use_restore_as @@ -100,7 +100,8 @@ class FormplayerMain(View): urlname = 'formplayer_main' @xframe_options_sameorigin - @use_daterangepicker + @use_bootstrap5 + @use_tempusdominus @method_decorator(require_cloudcare_access) @method_decorator(requires_privilege_for_commcare_user(privileges.CLOUDCARE)) def dispatch(self, request, *args, **kwargs): @@ -221,7 +222,7 @@ def _default_lang(): } return set_cookie( - render(request, "cloudcare/bootstrap3/formplayer_home.html", context) + render(request, "cloudcare/formplayer_home.html", context) ) @@ -238,17 +239,18 @@ def wrap_get_current_app_doc(self, domain, username, app_id): return get_current_app_doc(domain, app_id) +@method_decorator(use_bootstrap5, name='dispatch') +@method_decorator(use_tempusdominus, name='dispatch') class PreviewAppView(TemplateView): - template_name = 'cloudcare/bootstrap3/preview_app.html' + template_name = 'cloudcare/preview_app.html' urlname = 'preview_app' - @use_daterangepicker @xframe_options_sameorigin def get(self, request, *args, **kwargs): mobile_ucr_count = get_mobile_ucr_count(request.domain) if should_restrict_web_apps_usage(request.domain, mobile_ucr_count): context = BlockWebAppsView.get_context_for_ucr_limit_error(request.domain, mobile_ucr_count) - return render(request, 'cloudcare/bootstrap3/block_preview_app.html', context) + return render(request, 'cloudcare/block_preview_app.html', context) app = get_app(request.domain, kwargs.pop('app_id')) return self.render_to_response({ 'app': _format_app_doc(app.to_json()), @@ -364,7 +366,7 @@ def post(self, request, domain): readable_form = readable.get_readable_form_data(form_data_json, pretty_questions) rendered_readable_form = render_to_string( - 'reports/form/partials/bootstrap3/readable_form.html', + 'reports/form/partials/bootstrap5/readable_form.html', {'questions': readable_form} ) @@ -569,6 +571,7 @@ def _fail(error): return HttpResponseRedirect(reverse(FormplayerMain.urlname, args=[domain]) + "#" + cloudcare_state) +@method_decorator(use_bootstrap5, name='dispatch') class BlockWebAppsView(BaseDomainView): urlname = 'block_web_apps' diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common-main.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common-main.scss index 591873618dd3..9164a16b2423 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common-main.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common-main.scss @@ -22,6 +22,7 @@ version of FORMPLAYER @import "formplayer-common/formnav"; @import "formplayer-common/markdown-table"; @import "formplayer-common/address"; +@import "formplayer-common/query"; @import "formplayer-common/webforms"; @import "debugger/debugger"; diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/breadcrumbs.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/breadcrumbs.scss index c20075a0b495..29d6a4250a9f 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/breadcrumbs.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/breadcrumbs.scss @@ -21,6 +21,7 @@ color: white; &:before { + padding: 0 6px 0 0; content: '\f054'; font-family: 'FontAwesome'; } diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/form.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/form.scss index 4fa2310c3172..e4f8403a510d 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/form.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/form.scss @@ -34,10 +34,3 @@ legend { border-top: $cc-neutral-hi solid 1px; padding-top: 20px; } - -.question-tile-row { - .gr { - padding-right: 20px !important; - padding-left: 20px !important; - } -} diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/module.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/module.scss index ca3f42623fc3..cec082638a49 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/module.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/module.scss @@ -5,9 +5,7 @@ vertical-align: middle; transition: background 1s; } - .module-column-name { - position: relative; - } + tr:hover { .module-column { background-color: $cc-bg; @@ -127,6 +125,7 @@ button.clickable-icon { .module-table .module-case-list-column-checkbox { cursor: default; width: 35px; + border: 0; vertical-align: middle; } diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/query.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/query.scss new file mode 100644 index 000000000000..675d5b374d2f --- /dev/null +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/query.scss @@ -0,0 +1,7 @@ +.query-caption.required label::before, .search-query-group-header.required .search-query-group-header-label::before { + content: '*'; + font-weight: bold; + color: $danger; + margin: 0 3px; + float: left; +} diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/webforms.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/webforms.scss index cfa3037d6708..63f1212fbde2 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/webforms.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-common/webforms.scss @@ -66,7 +66,7 @@ input:invalid { .required-group .gr-header .caption::before { content: '*'; font-weight: bold; - color: #c0392b; + color: $danger; margin: 0 3px; float: left; } diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/breadcrumbs.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/breadcrumbs.scss index 5c8bc5a3974c..00118218c2f7 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/breadcrumbs.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/breadcrumbs.scss @@ -5,7 +5,6 @@ margin-top: -1px; .breadcrumb-item { &:before { - padding: 0 6px 0 0; color: #ffffff; font-size: 12px; vertical-align: top; diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/case-tile.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/case-tile.scss index 4aaefef9ccd9..6d63815e77c0 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/case-tile.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/case-tile.scss @@ -148,6 +148,7 @@ } .list-cell-wrapper-style { + display: block; // override .card's display: flex rule margin: 10px 5px 0 5px; border-collapse: collapse; vertical-align: top; diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/content.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/content.scss index 6d8d5272c206..f317b3519061 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/content.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/content.scss @@ -18,12 +18,19 @@ body { font-size: 1.5rem; text-transform: uppercase; color: $cc-neutral-mid; - padding-left: 1.5rem; + padding-left: 12px; font-weight: bold; margin-top: 0px; } } +.page-header-apps { + padding-left: 0; + h1 { + padding-left: 0; + } +} + .page-footer { padding: 14px 8px 7px; } diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/form.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/form.scss index 2d3908672d6c..3c7a9e3dac44 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/form.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/form.scss @@ -17,7 +17,7 @@ $group-indent: 15px; padding-top: 3px; } - .form-control { + .form-control, .form-select { font-size: $form-text-size; } @@ -48,10 +48,10 @@ $group-indent: 15px; padding-right: $form-text-indent; } - .form-group { + .q { margin-left: 0px; margin-right: 0px; - .caption.control-label { + .caption { display: block; } } @@ -61,26 +61,26 @@ $group-indent: 15px; margin-right: $group-indent; } - .gr.panel { + .gr.card { border-radius: 0px; } - .rep.panel { + .rep.card { border-radius: 0px; } - .col-sm-12, - .col-sm-11, - .col-sm-10, - .col-sm-9, - .col-sm-8, - .col-sm-7, - .col-sm-6, - .col-sm-5, - .col-sm-4, - .col-sm-3, - .col-sm-2, - .col-sm-1 { + .col-md-12, + .col-md-11, + .col-md-10, + .col-md-9, + .col-md-8, + .col-md-7, + .col-md-6, + .col-md-5, + .col-md-4, + .col-md-3, + .col-md-2, + .col-md-1 { &:first-child { padding-left: 0; } @@ -89,7 +89,7 @@ $group-indent: 15px; } } - .panel-body { + .card-body { @include media-breakpoint-down(md) { padding-left: 0px; padding-right: 0px; @@ -97,7 +97,7 @@ $group-indent: 15px; } .stripe-repeats { - > .row, .panel-body > .children > .row { + > .row, .card-body > .children > .row { &:nth-of-type(odd) { background-color: $table-accent-bg; } @@ -133,7 +133,7 @@ $group-indent: 15px; } } - .panel-heading { + .card-header { border-top-left-radius: 0px; border-top-right-radius: 0px; } @@ -152,7 +152,7 @@ $group-indent: 15px; display: none; } - .form-group.required { + .q.required { transition: all .5s; margin-bottom: 0; label:before { @@ -160,7 +160,7 @@ $group-indent: 15px; } } - .form-group.required.on { + .q.required.on { background-color: $cc-att-neg-hi; border: 10px solid $cc-att-neg-mid; border-bottom: none; @@ -197,6 +197,10 @@ $group-indent: 15px; } @media print { + #content-container { + max-width: none; + } + .form-container.print-container { margin: 0px; .page-header { @@ -204,14 +208,14 @@ $group-indent: 15px; } } - .q.form-group { + .q { break-inside: avoid; } - .panel.panel-default.last, - .panel.panel-default.last *, - .q.form-group.last, - .q.form-group.last * { + .card.last, + .card.last *, + .q.last, + .q.last * { margin-bottom: 0px; padding-bottom: 0px; .widget-container { @@ -234,7 +238,7 @@ $group-indent: 15px; .question-tile-row { display: flex; align-items: start; - * .form-group, * p, * .control-label { + * .q, * p, * .caption { padding-top: 0px !important; padding-bottom: 0px !important; margin-top: 0px !important; @@ -242,13 +246,6 @@ $group-indent: 15px; } } -.question-tile-row { - .gr { - padding-right: 0px !important; - padding-left: 0px !important; - } -} - .gr-has-no-nested-questions { display: none; } @@ -266,3 +263,10 @@ $group-indent: 15px; position: fixed; bottom: 35px; } + +.my-05em-for-hs { + h1, h2, h3, h4, h5, h6 { + margin-top: 0.5em !important; + margin-bottom: 0.5em !important; + } +} diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/print-general.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/print-general.scss index 56c3a1d3d2cf..60d2d0d8ee0c 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/print-general.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/print-general.scss @@ -1,194 +1,194 @@ -// Renders Bootstrap as "small" layout when printing +// Renders Bootstrap as "medium" layout when printing @media print { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { float: left; } - .col-sm-12 { + .col-md-12 { width: 100%; } - .col-sm-11 { + .col-md-11 { width: 91.66666667%; } - .col-sm-10 { + .col-md-10 { width: 83.33333333%; } - .col-sm-9 { + .col-md-9 { width: 75%; } - .col-sm-8 { + .col-md-8 { width: 66.66666667%; } - .col-sm-7 { + .col-md-7 { width: 58.33333333%; } - .col-sm-6 { + .col-md-6 { width: 50%; } - .col-sm-5 { + .col-md-5 { width: 41.66666667%; } - .col-sm-4 { + .col-md-4 { width: 33.33333333%; } - .col-sm-3 { + .col-md-3 { width: 25%; } - .col-sm-2 { + .col-md-2 { width: 16.66666667%; } - .col-sm-1 { + .col-md-1 { width: 8.33333333%; } - .col-sm-pull-12 { + .col-md-pull-12 { right: 100%; } - .col-sm-pull-11 { + .col-md-pull-11 { right: 91.66666667%; } - .col-sm-pull-10 { + .col-md-pull-10 { right: 83.33333333%; } - .col-sm-pull-9 { + .col-md-pull-9 { right: 75%; } - .col-sm-pull-8 { + .col-md-pull-8 { right: 66.66666667%; } - .col-sm-pull-7 { + .col-md-pull-7 { right: 58.33333333%; } - .col-sm-pull-6 { + .col-md-pull-6 { right: 50%; } - .col-sm-pull-5 { + .col-md-pull-5 { right: 41.66666667%; } - .col-sm-pull-4 { + .col-md-pull-4 { right: 33.33333333%; } - .col-sm-pull-3 { + .col-md-pull-3 { right: 25%; } - .col-sm-pull-2 { + .col-md-pull-2 { right: 16.66666667%; } - .col-sm-pull-1 { + .col-md-pull-1 { right: 8.33333333%; } - .col-sm-pull-0 { + .col-md-pull-0 { right: auto; } - .col-sm-push-12 { + .col-md-push-12 { left: 100%; } - .col-sm-push-11 { + .col-md-push-11 { left: 91.66666667%; } - .col-sm-push-10 { + .col-md-push-10 { left: 83.33333333%; } - .col-sm-push-9 { + .col-md-push-9 { left: 75%; } - .col-sm-push-8 { + .col-md-push-8 { left: 66.66666667%; } - .col-sm-push-7 { + .col-md-push-7 { left: 58.33333333%; } - .col-sm-push-6 { + .col-md-push-6 { left: 50%; } - .col-sm-push-5 { + .col-md-push-5 { left: 41.66666667%; } - .col-sm-push-4 { + .col-md-push-4 { left: 33.33333333%; } - .col-sm-push-3 { + .col-md-push-3 { left: 25%; } - .col-sm-push-2 { + .col-md-push-2 { left: 16.66666667%; } - .col-sm-push-1 { + .col-md-push-1 { left: 8.33333333%; } - .col-sm-push-0 { + .col-md-push-0 { left: auto; } - .col-sm-offset-12 { + .col-md-offset-12 { margin-left: 100%; } - .col-sm-offset-11 { + .col-md-offset-11 { margin-left: 91.66666667%; } - .col-sm-offset-10 { + .col-md-offset-10 { margin-left: 83.33333333%; } - .col-sm-offset-9 { + .col-md-offset-9 { margin-left: 75%; } - .col-sm-offset-8 { + .col-md-offset-8 { margin-left: 66.66666667%; } - .col-sm-offset-7 { + .col-md-offset-7 { margin-left: 58.33333333%; } - .col-sm-offset-6 { + .col-md-offset-6 { margin-left: 50%; } - .col-sm-offset-5 { + .col-md-offset-5 { margin-left: 41.66666667%; } - .col-sm-offset-4 { + .col-md-offset-4 { margin-left: 33.33333333%; } - .col-sm-offset-3 { + .col-md-offset-3 { margin-left: 25%; } - .col-sm-offset-2 { + .col-md-offset-2 { margin-left: 16.66666667%; } - .col-sm-offset-1 { + .col-md-offset-1 { margin-left: 8.33333333%; } - .col-sm-offset-0 { + .col-md-offset-0 { margin-left: 0%; } - .visible-xs { + .visible-sm { display: none !important; } - .hidden-xs { + .hidden-sm { display: block !important; } - table.hidden-xs { + table.hidden-sm { display: table; } - tr.hidden-xs { + tr.hidden-sm { display: table-row !important; } - th.hidden-xs, - td.hidden-xs { + th.hidden-sm, + td.hidden-sm { display: table-cell !important; } - .hidden-xs.hidden-print { + .hidden-sm.hidden-print { display: none !important; } - .hidden-sm { + .hidden-md { display: none !important; } - .visible-sm { + .visible-md { display: block !important; } - table.visible-sm { + table.visible-md { display: table; } - tr.visible-sm { + tr.visible-md { display: table-row !important; } - th.visible-sm, - td.visible-sm { + th.visible-md, + td.visible-md { display: table-cell !important; } - } \ No newline at end of file + } diff --git a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/query.scss b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/query.scss index a62debf98737..894d06d967ed 100644 --- a/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/query.scss +++ b/corehq/apps/hqwebapp/static/cloudcare/scss/formplayer-webapp/query.scss @@ -13,11 +13,11 @@ #sidebar-region { background: transparent; - @include media-breakpoint-up(md) { + @include media-breakpoint-up(lg) { width: 300px; position: absolute; } - @include media-breakpoint-down(md) { + @include media-breakpoint-down(lg) { max-width: 600px; margin: auto; } @@ -76,14 +76,6 @@ } } -.query-caption.required .control-label::before, .search-query-group-header.required .search-query-group-header-label::before { - content: '*'; - font-weight: bold; - color: #c0392b; - margin: 0 3px; - float: left; -} - .search-query-group-header-label { font-size: larger; } diff --git a/corehq/apps/hqwebapp/static/hqwebapp/js/bootstrap5/inactivity.js b/corehq/apps/hqwebapp/static/hqwebapp/js/bootstrap5/inactivity.js index a653126820e9..c97ca8511c57 100644 --- a/corehq/apps/hqwebapp/static/hqwebapp/js/bootstrap5/inactivity.js +++ b/corehq/apps/hqwebapp/static/hqwebapp/js/bootstrap5/inactivity.js @@ -114,7 +114,7 @@ hqDefine('hqwebapp/js/bootstrap5/inactivity', [ }; var hideWarningModal = function (showLogin) { - $warningModal.hide(); + $warningModal.hide(); if (showLogin) { loginModal.show(); } @@ -134,7 +134,7 @@ hqDefine('hqwebapp/js/bootstrap5/inactivity', [ } else { $newVersionModal.find('#incompleteFormWarning').addClass('d-none'); } - if (!isModalOpen($modal)) { + if (!isModalOpen($loginModal)) { if (isModalOpen($warningModal)) { warningModal.hide(); } @@ -155,7 +155,7 @@ hqDefine('hqwebapp/js/bootstrap5/inactivity', [ // Parsing the app id out of URL hash will fail on the web apps home page, login as, etc. // where the hash isn't a JSON object but instead a string like "#apps". // In these cases, there's no app to check for a new version. - log("Could not parse app id out of " + window.location.hash) + log("Could not parse app id out of " + window.location.hash); selectedAppId = null; } var domain = initialPageData.get('domain'); diff --git a/corehq/apps/hqwebapp/static/hqwebapp/js/tempus_dominus.js b/corehq/apps/hqwebapp/static/hqwebapp/js/tempus_dominus.js index 91e500b05118..a617e853a26e 100644 --- a/corehq/apps/hqwebapp/static/hqwebapp/js/tempus_dominus.js +++ b/corehq/apps/hqwebapp/static/hqwebapp/js/tempus_dominus.js @@ -20,7 +20,7 @@ hqDefine("hqwebapp/js/tempus_dominus", [ window.Popper = Popper; let createDatePicker = function (el, options) { - return new tempusDominus.TempusDominus(el, _addDefaultOptions(options, { + let picker = new tempusDominus.TempusDominus(el, _addDefaultOptions(options, { display: { theme: 'light', components: { @@ -31,6 +31,22 @@ hqDefine("hqwebapp/js/tempus_dominus", [ format: 'yyyy-MM-dd', }), })); + + if (options.viewDate) { + picker.dates.setValue(options.viewDate); + } + + // Since picking a date is a single-click action, hide the picker on date selection + picker.subscribe("change.td", function () { + picker.hide(); + }); + + $(el).on("error.td", function (e) { + picker.dates.setValue(null); + e.stopPropagation(); + }); + + return picker; }; // This replaces createBootstrap3DefaultDateRangePicker in hqwebapp/js/daterangepicker.config @@ -68,10 +84,12 @@ hqDefine("hqwebapp/js/tempus_dominus", [ picker.dates.setValue(picker.dates.picked[0], 1); } }); + + return picker; }; let createTimePicker = function (el, options) { - return new tempusDominus.TempusDominus(el, _addDefaultOptions(options, { + var picker = new tempusDominus.TempusDominus(el, _addDefaultOptions(options, { display: { theme: 'light', components: { @@ -83,6 +101,17 @@ hqDefine("hqwebapp/js/tempus_dominus", [ format: 'H:mm', }), })); + + if (options.viewDate) { + picker.dates.setValue(options.viewDate); + } + + $(el).on("error.td", function (e) { + picker.dates.setValue(null); + e.stopPropagation(); + }); + + return picker; }; // Combine user-passed TD options with default options. @@ -148,5 +177,6 @@ hqDefine("hqwebapp/js/tempus_dominus", [ createDefaultDateRangePicker: createDefaultDateRangePicker, createTimePicker: createTimePicker, getDateRangeSeparator: getDateRangeSeparator, + tempusDominus: tempusDominus, }; }); diff --git a/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq.scss b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq.scss index e10e55aa5819..5d67ae875e5e 100644 --- a/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq.scss +++ b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq.scss @@ -15,6 +15,7 @@ @import "reboot"; @import "type"; @import "commcarehq/type"; +@import "commcarehq/print"; @import "images"; @import "containers"; @import "commcarehq/containers"; diff --git a/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_print.scss b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_print.scss new file mode 100644 index 000000000000..4bd6fe2ff7aa --- /dev/null +++ b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_print.scss @@ -0,0 +1,92 @@ +@media print { + *, + *:before, + *:after { + color: #000 !important; // Black prints faster: h5bp.com/s + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + + a, + a:visited { + text-decoration: underline; + } + + a[href]:after { + content: " (" attr(href) ")"; + } + + abbr[title]:after { + content: " (" attr(title) ")"; + } + + // Don't show links that are fragment identifiers, + // or use the `javascript:` pseudo protocol + a[href^="#"]:after, + a[href^="javascript:"]:after { + content: ""; + } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + + thead { + display: table-header-group; // h5bp.com/t + } + + tr, + img { + page-break-inside: avoid; + } + + img { + max-width: 100% !important; + } + + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + + h2, + h3 { + page-break-after: avoid; + } + + // Bootstrap specific changes start + + // Bootstrap components + .navbar { + display: none; + } + .btn, + .dropup > .btn { + > .caret { + border-top-color: #000 !important; + } + } + .label { + border: 1px solid #000; + } + + .table { + border-collapse: collapse !important; + + td, + th { + background-color: #fff !important; + } + } + .table-bordered { + th, + td { + border: 1px solid #ddd !important; + } + } +} diff --git a/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_select2.scss b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_select2.scss index 375d723a6dd7..2920eb1d26e3 100644 --- a/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_select2.scss +++ b/corehq/apps/hqwebapp/static/hqwebapp/scss/commcarehq/_select2.scss @@ -160,7 +160,7 @@ .select2-container--default { .select2-selection--single .select2-selection__clear { - margin-right: 30px; + margin-right: 30px !important; } } diff --git a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app-main.scss b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app-main.scss index 0fbc4c7d1705..9b7afdae9a10 100644 --- a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app-main.scss +++ b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app-main.scss @@ -5,6 +5,7 @@ $transition-speed: .5s; @import "preview_app/variables"; +@import "preview_app/datepicker"; @import "preview_app/notifications"; @import "preview_app/scrollable"; @import "preview_app/navigation"; @@ -15,3 +16,4 @@ $transition-speed: .5s; @import "preview_app/form"; @import "preview_app/formnav"; @import "preview_app/debugger"; +@import "preview_app/case-tile"; diff --git a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/case-tile.scss b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/case-tile.scss new file mode 100644 index 000000000000..cc64a7b96771 --- /dev/null +++ b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/case-tile.scss @@ -0,0 +1,3 @@ +#case-list-menu-header { + display: none; +} diff --git a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/datepicker.scss b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/datepicker.scss new file mode 100644 index 000000000000..3f0b9faf715e --- /dev/null +++ b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/datepicker.scss @@ -0,0 +1,27 @@ +$datepicker-width: 247px; +$datepicker-width-tablet: 447px; +$datepicker-height: 410px; +$datepicker-height-tablet: 565px; + +.tempus-dominus-widget { + transform: none !important; + position: fixed; + top: 30px !important; + left: 0px !important; + padding-bottom: 15px !important; + min-height: $datepicker-height !important; + + padding: 5px !important; + width: $datepicker-width !important; + margin-left: 2px !important; + margin-right: 2px !important; + + .datepicker { + margin: auto; + } +} + +.preview-tablet-mode .tempus-dominus-widget { + width: $datepicker-width-tablet !important; + min-height: $datepicker-height-tablet !important; +} diff --git a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/form.scss b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/form.scss index 017d60b3651b..e084a1e14b1b 100644 --- a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/form.scss +++ b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/form.scss @@ -73,7 +73,7 @@ } } -.form-group { +.q { padding: 10px 0; label { margin-right: 10px; @@ -81,15 +81,12 @@ } } -.form-group.required { +.q.required { transition: all .5s; margin-bottom: 0; - label:before { - display: none; - } } -.form-group.required.on { +.q.required.on { background-color: $cc-att-neg-hi; border: 10px solid $cc-att-neg-mid; border-bottom: none; @@ -119,7 +116,7 @@ border: none; } -.form-group .help-block { +.q .help-block { font-size: 11px; &:before { content: "\f05a"; diff --git a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/module.scss b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/module.scss index 424692d2dda0..2ae39671a74a 100644 --- a/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/module.scss +++ b/corehq/apps/hqwebapp/static/preview_app/scss/preview_app/module.scss @@ -45,15 +45,17 @@ } } -.module-per-page-container { - .pagination-lg .form-control, - .pagination-lg .btn{ +.pagination-container { + .form-select, + .pagination-lg .page-link, + .input-group-lg .form-control, + .input-group-lg .btn { font-size: 11px; height: 30px; padding: 5px 10px; } - .pagination-lg .btn [class*='fa-'] { - font-size: 11px; + .form-select { + padding: 5px 20px; // extra padding for the sake of the arrow } } @@ -129,8 +131,7 @@ .module-banner { font-size: 11px; - padding-left: 6px; - padding-right: 6px; + padding: 6px; } .module-menu-bar-offset { diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json index a14e9b16b866..75a5f82ef875 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diff_config.json @@ -415,107 +415,6 @@ "compare_all_files": true } ], - "apps/cloudcare/templates/cloudcare": [ - { - "directories": [ - "bootstrap3", - "bootstrap5" - ], - "file_type": "template", - "label": "cloudcare", - "compare_all_files": true - }, - { - "directories": [ - "partials/bootstrap3", - "partials/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials", - "compare_all_files": true - }, - { - "directories": [ - "partials/case_list/bootstrap3", - "partials/case_list/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/case_list", - "compare_all_files": true - }, - { - "directories": [ - "partials/form_entry/bootstrap3", - "partials/form_entry/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/form_entry", - "compare_all_files": true - }, - { - "directories": [ - "partials/grid_view/bootstrap3", - "partials/grid_view/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/grid_view", - "compare_all_files": true - }, - { - "directories": [ - "partials/menu/bootstrap3", - "partials/menu/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/menu", - "compare_all_files": true - }, - { - "directories": [ - "partials/query/bootstrap3", - "partials/query/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/query", - "compare_all_files": true - }, - { - "directories": [ - "partials/sessions/bootstrap3", - "partials/sessions/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/sessions", - "compare_all_files": true - }, - { - "directories": [ - "partials/users/bootstrap3", - "partials/users/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/partials/users", - "compare_all_files": true - }, - { - "directories": [ - "spec/bootstrap3", - "spec/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/spec", - "compare_all_files": true - }, - { - "directories": [ - "spec/form_entry/bootstrap3", - "spec/form_entry/bootstrap5" - ], - "file_type": "template", - "label": "cloudcare/spec/form_entry", - "compare_all_files": true - } - ], "apps/notifications/static/notifications/spec": [ { "directories": [ diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/block_preview_app.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/block_preview_app.html.diff.txt deleted file mode 100644 index 4939714ee4a8..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/block_preview_app.html.diff.txt +++ /dev/null @@ -1,8 +0,0 @@ ---- -+++ -@@ -1,4 +1,4 @@ --{% extends "cloudcare/bootstrap3/preview_app_base.html" %} -+{% extends "cloudcare/bootstrap5/preview_app_base.html" %} - {% load hq_shared_tags %} - {% load compress %} - {% load i18n %} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/formplayer_home.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/formplayer_home.html.diff.txt deleted file mode 100644 index d5ce15c90452..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/formplayer_home.html.diff.txt +++ /dev/null @@ -1,69 +0,0 @@ ---- -+++ -@@ -1,4 +1,4 @@ --{% extends 'hqwebapp/bootstrap3/base_navigation.html' %} -+{% extends 'hqwebapp/bootstrap5/base_navigation.html' %} - {% load i18n %} - {% load hq_shared_tags %} - {% load compress %} -@@ -20,11 +20,11 @@ - {% endblock %} - - {% block navigation %}{{ block.super }} -- -
diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/form.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/form.html.diff.txt deleted file mode 100644 index 60b5cdeb18ed..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/form.html.diff.txt +++ /dev/null @@ -1,38 +0,0 @@ ---- -+++ -@@ -17,11 +17,11 @@ - -
-
--
-+
-
- {% if environment == "web-apps" %} -
--
-+
- {% blocktrans %} - Please correct the answers below before submitting. -
-@@ -42,7 +42,7 @@ -
-
- {% endif %} --
0"> --
-- -- {% trans "Next Error" %} -+
-+ -+ {% trans "Next Error" %} -
-
- diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/grouped_element_tile_row.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/grouped_element_tile_row.html.diff.txt deleted file mode 100644 index b09821b06086..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/grouped_element_tile_row.html.diff.txt +++ /dev/null @@ -1,9 +0,0 @@ ---- -+++ -@@ -1,5 +1,3 @@ - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/help_multimedia.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/help_multimedia.html.diff.txt deleted file mode 100644 index c4fe692b291a..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/form_entry/help_multimedia.html.diff.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- -+++ -@@ -1,7 +1,7 @@ - {% load i18n %} - - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/badge.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/badge.html.diff.txt deleted file mode 100644 index 373dede076d9..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/badge.html.diff.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- -+++ -@@ -6,6 +6,6 @@ - and is different from x === undefined. - */ %> - <% if (typeof badgeText !== 'undefined' && badgeText) { %> -- <%- badgeText %> -+ <%- badgeText %> - <% } %> - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/breadcrumbs.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/breadcrumbs.html.diff.txt deleted file mode 100644 index d4e365cb0942..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/breadcrumbs.html.diff.txt +++ /dev/null @@ -1,16 +0,0 @@ ---- -+++ -@@ -7,9 +7,11 @@ - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/dropdown.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/dropdown.html.diff.txt deleted file mode 100644 index 1d31efd3c826..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/dropdown.html.diff.txt +++ /dev/null @@ -1,31 +0,0 @@ ---- -+++ -@@ -2,13 +2,17 @@ - - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid.html.diff.txt deleted file mode 100644 index 9ce80751f9c6..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid.html.diff.txt +++ /dev/null @@ -1,15 +0,0 @@ ---- -+++ -@@ -1,10 +1,10 @@ - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid_item.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid_item.html.diff.txt deleted file mode 100644 index 169d827a0fe2..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/grid_item.html.diff.txt +++ /dev/null @@ -1,25 +0,0 @@ ---- -+++ -@@ -1,5 +1,5 @@ - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/list.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/list.html.diff.txt deleted file mode 100644 index 523790e99f86..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/menu/list.html.diff.txt +++ /dev/null @@ -1,10 +0,0 @@ ---- -+++ -@@ -1,6 +1,6 @@ - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/query/list.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/query/list.html.diff.txt deleted file mode 100644 index 05304aee9348..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/query/list.html.diff.txt +++ /dev/null @@ -1,33 +0,0 @@ ---- -+++ -@@ -3,12 +3,11 @@ - - - - - - diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/users/restore_as.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/users/restore_as.html.diff.txt deleted file mode 100644 index 1e3b565f2cb7..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/partials/users/restore_as.html.diff.txt +++ /dev/null @@ -1,33 +0,0 @@ ---- -+++ -@@ -3,7 +3,7 @@ - - {# DO NOT COMPRESS #} - -@@ -55,14 +57,15 @@ - - {# This is fine as an inline script; it'll be removed once form designer is migrated to RequireJS #} - - - - {% block body %}{% endblock %} - --{% include 'cloudcare/partials/bootstrap3/confirmation_modal.html' %} --{% include 'cloudcare/partials/bootstrap3/all_templates.html' %} -+{% include 'cloudcare/partials/bootstrap5/confirmation_modal.html' %} -+{% include 'cloudcare/partials/bootstrap5/all_templates.html' %} - - {% block js %}{{ block.super }} - {% include 'cloudcare/partials/dependencies.html' %} -@@ -70,23 +73,23 @@ - - {% initial_page_data 'toggles_dict' toggles_dict %} - {% initial_page_data 'previews_dict' previews_dict %} --
-+
- {% block initial_page_data %} - {# do not override this block, use initial_page_data template tag to populate #} - {% endblock %} -
--
-+
- {% block registered_urls %} - {# do not override this block, use registerurl template tag to populate #} - {% endblock %} -
- {% include 'analytics/initial/all.html' %} --
-+
- {% block initial_analytics_data %} - {# do not override this block, use initial_analytics_data template tag to populate #} - {% endblock %} -
--
-+
- {% block analytics_ab_test %} - {# do not override this block, use analytics_ab_test template tag to populate #} - {% endblock %} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/spec/form_entry/mocha.html.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/spec/form_entry/mocha.html.diff.txt deleted file mode 100644 index 24922ccb8338..000000000000 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/cloudcare/spec/form_entry/mocha.html.diff.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- -+++ -@@ -1,7 +1,7 @@ - {% extends "mocha/base.html" %} - {% load hq_shared_tags %} - --{% requirejs_main "cloudcare/js/form_entry/spec/main" %} -+{% requirejs_main_b5 "cloudcare/js/form_entry/spec/main" %} - - {% block stylesheets %}{{ block.super }} -
- - -- {% include 'cloudcare/partials/bootstrap3/confirmation_modal.html' %} -- {% include 'cloudcare/partials/bootstrap3/all_templates.html' %} -+ {% include 'cloudcare/partials/bootstrap5/confirmation_modal.html' %} -+ {% include 'cloudcare/partials/bootstrap5/all_templates.html' %} - - {% endblock %} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/hqwebapp/js/inactivity.js.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/hqwebapp/js/inactivity.js.diff.txt index a5b723a4c7a1..b39c821fd634 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/hqwebapp/js/inactivity.js.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/javascript/hqwebapp/js/inactivity.js.diff.txt @@ -57,7 +57,7 @@ var hideWarningModal = function (showLogin) { - $warningModal.modal('hide'); -+ $warningModal.hide(); ++ $warningModal.hide(); if (showLogin) { - $modal.modal({backdrop: 'static', keyboard: false}); + loginModal.show(); @@ -81,9 +81,11 @@ + $newVersionModal.find('#incompleteFormWarning').removeClass('d-none'); } else { - $newVersionModal.find('#incompleteFormWarning').hide(); +- } +- if (!isModalOpen($modal)) { + $newVersionModal.find('#incompleteFormWarning').addClass('d-none'); - } - if (!isModalOpen($modal)) { ++ } ++ if (!isModalOpen($loginModal)) { if (isModalOpen($warningModal)) { - $warningModal.modal('hide'); + warningModal.hide(); @@ -97,11 +99,12 @@ selectedAppId = urlParams.appId; } } catch (error) { +- log("Could not parse app id out of " + window.location.hash) +- return; + // Parsing the app id out of URL hash will fail on the web apps home page, login as, etc. + // where the hash isn't a JSON object but instead a string like "#apps". + // In these cases, there's no app to check for a new version. - log("Could not parse app id out of " + window.location.hash) -- return; ++ log("Could not parse app id out of " + window.location.hash); + selectedAppId = null; } var domain = initialPageData.get('domain'); diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common-main.formplayer-common-main.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common-main.formplayer-common-main.style.diff.txt index 75a35eec0da8..b87132107d48 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common-main.formplayer-common-main.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common-main.formplayer-common-main.style.diff.txt @@ -8,3 +8,11 @@ /** These are the styles shared across both PREVIEW and the FULL PAGE WEB APP +@@ -22,6 +22,7 @@ + @import "formplayer-common/formnav"; + @import "formplayer-common/markdown-table"; + @import "formplayer-common/address"; ++@import "formplayer-common/query"; + @import "formplayer-common/webforms"; + + @import "debugger/debugger"; diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_breadcrumbs.formplayer-common_breadcrumbs.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_breadcrumbs.formplayer-common_breadcrumbs.style.diff.txt index cff6ffff6c27..eb166b40948b 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_breadcrumbs.formplayer-common_breadcrumbs.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_breadcrumbs.formplayer-common_breadcrumbs.style.diff.txt @@ -1,6 +1,6 @@ --- +++ -@@ -2,30 +2,34 @@ +@@ -2,30 +2,35 @@ position: sticky; position: -webkit-sticky; top: 0; @@ -31,6 +31,7 @@ + color: white; + &:before { ++ padding: 0 6px 0 0; content: '\f054'; font-family: 'FontAwesome'; } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_form.formplayer-common_form.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_form.formplayer-common_form.style.diff.txt index bb30a594c935..3576d2bf71d4 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_form.formplayer-common_form.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_form.formplayer-common_form.style.diff.txt @@ -1,6 +1,6 @@ --- +++ -@@ -31,7 +31,7 @@ +@@ -31,13 +31,6 @@ } .gr.repetition:not(:first-child) { @@ -8,4 +8,10 @@ + border-top: $cc-neutral-hi solid 1px; padding-top: 20px; } - +- +-.question-tile-row { +- .gr { +- padding-right: 20px !important; +- padding-left: 20px !important; +- } +-} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_module.formplayer-common_module.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_module.formplayer-common_module.style.diff.txt index 0a1956f97950..7f2058788f16 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_module.formplayer-common_module.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_module.formplayer-common_module.style.diff.txt @@ -1,15 +1,17 @@ --- +++ -@@ -3,14 +3,14 @@ +@@ -3,14 +3,12 @@ border: none; text-align: left; vertical-align: middle; - .transition(background 1s); +- } +- .module-column-name { +- position: relative; +- } + transition: background 1s; - } - .module-column-name { - position: relative; - } ++ } ++ tr:hover { .module-column { - background-color: @cc-bg; @@ -17,7 +19,7 @@ } } } -@@ -44,7 +44,7 @@ +@@ -44,7 +42,7 @@ } .module-icon-container { @@ -26,7 +28,7 @@ text-align: center; margin: 0 auto; -@@ -54,15 +54,15 @@ +@@ -54,15 +52,15 @@ } .module-icon-user { @@ -45,7 +47,7 @@ position: absolute; top: 50%; -@@ -70,29 +70,29 @@ +@@ -70,29 +68,29 @@ .module-audio-control { .module-audio-icon { @@ -85,7 +87,7 @@ .module-column-name h3 { font-size: 20px; } -@@ -107,7 +107,7 @@ +@@ -107,7 +105,7 @@ } .module-table .module-case-list-header { @@ -94,7 +96,15 @@ color: white; padding: 20px 10px; cursor: default; -@@ -135,31 +135,15 @@ +@@ -127,6 +125,7 @@ + .module-table .module-case-list-column-checkbox { + cursor: default; + width: 35px; ++ border: 0; + vertical-align: middle; + } + +@@ -135,31 +134,15 @@ } .module-table-case-list tbody tr:nth-child(even) > td { @@ -128,7 +138,7 @@ } .module-table-case-list tbody tr:hover .module-case-list-column-empty { -@@ -188,13 +172,13 @@ +@@ -188,13 +171,13 @@ } th, td { @@ -145,7 +155,7 @@ color: black; padding-top: 1rem; padding-bottom: 1rem; -@@ -206,16 +190,16 @@ +@@ -206,16 +189,16 @@ .module-table-case-detail tbody tr:nth-child(odd) { th, td { @@ -165,7 +175,7 @@ border-top-color: transparent; border-left-color: transparent; border-right-color: transparent; -@@ -224,7 +208,7 @@ +@@ -224,7 +207,7 @@ .module-case-detail-continue { width: 100%; @@ -174,7 +184,7 @@ } .module-case-detail-btn { -@@ -269,7 +253,7 @@ +@@ -269,7 +252,7 @@ bottom: 0; position: fixed; background-color: rgba(255, 255, 255, 0.9); @@ -183,7 +193,7 @@ text-align: center; } -@@ -299,7 +283,7 @@ +@@ -299,7 +282,7 @@ } } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_webforms.formplayer-common_webforms.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_webforms.formplayer-common_webforms.style.diff.txt index 3fcfe45f9c26..083d7a98ae28 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_webforms.formplayer-common_webforms.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-common_webforms.formplayer-common_webforms.style.diff.txt @@ -9,3 +9,12 @@ button p { margin-bottom: 0; } +@@ -68,7 +66,7 @@ + .required-group .gr-header .caption::before { + content: '*'; + font-weight: bold; +- color: #c0392b; ++ color: $danger; + margin: 0 3px; + float: left; + } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_breadcrumbs.formplayer-webapp_breadcrumbs.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_breadcrumbs.formplayer-webapp_breadcrumbs.style.diff.txt index af2015d21324..9fbc5aa9a2e3 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_breadcrumbs.formplayer-webapp_breadcrumbs.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_breadcrumbs.formplayer-webapp_breadcrumbs.style.diff.txt @@ -1,6 +1,6 @@ --- +++ -@@ -1,16 +1,11 @@ +@@ -1,16 +1,10 @@ #breadcrumb-region .breadcrumb, .single-app-view .breadcrumb, .breadcrumb-form-container .breadcrumb { @@ -16,11 +16,10 @@ + .breadcrumb-item { &:before { - padding: 0 6px 0 12px; -+ padding: 0 6px 0 0; color: #ffffff; font-size: 12px; vertical-align: top; -@@ -23,16 +18,16 @@ +@@ -23,16 +17,16 @@ } #breadcrumb-region .breadcrumb-nav { @@ -40,7 +39,7 @@ margin-bottom: 0; flex-grow: 1; } -@@ -52,7 +47,7 @@ +@@ -52,7 +46,7 @@ font-size: 12px; margin-bottom: 0px; padding-left: 33px; diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_case-tile.formplayer-webapp_case-tile.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_case-tile.formplayer-webapp_case-tile.style.diff.txt index 847a22897aad..edb60a083e26 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_case-tile.formplayer-webapp_case-tile.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_case-tile.formplayer-webapp_case-tile.style.diff.txt @@ -56,7 +56,7 @@ height: 25vh; } -@@ -142,8 +142,8 @@ +@@ -142,20 +142,21 @@ /* Horizontally center the text (icon) */ line-height: 12px; /* Vertically center the text (icon) */ @@ -67,7 +67,8 @@ } } -@@ -151,11 +151,11 @@ + .list-cell-wrapper-style { ++ display: block; // override .card's display: flex rule margin: 10px 5px 0 5px; border-collapse: collapse; vertical-align: top; @@ -81,7 +82,7 @@ } .module-icon, -@@ -165,14 +165,14 @@ +@@ -165,14 +166,14 @@ } &:hover { @@ -98,7 +99,7 @@ } .case-tile-group{ -@@ -205,7 +205,7 @@ +@@ -205,7 +206,7 @@ } .list-cell-wrapper-style { diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_content.formplayer-webapp_content.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_content.formplayer-webapp_content.style.diff.txt index 1fd8139a8d51..2c08374c8af6 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_content.formplayer-webapp_content.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_content.formplayer-webapp_content.style.diff.txt @@ -8,7 +8,7 @@ } .cloudcare-home-content { -@@ -13,13 +13,11 @@ +@@ -13,29 +13,26 @@ } .page-header { @@ -20,12 +20,21 @@ + font-size: 1.5rem; text-transform: uppercase; - color: @cc-neutral-mid; +- padding-left: 1.5rem; + color: $cc-neutral-mid; - padding-left: 1.5rem; ++ padding-left: 12px; font-weight: bold; margin-top: 0px; -@@ -28,14 +26,6 @@ + } + } ++.page-header-apps { ++ padding-left: 0; ++ h1 { ++ padding-left: 0; ++ } ++} ++ .page-footer { padding: 14px 8px 7px; -} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_form.formplayer-webapp_form.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_form.formplayer-webapp_form.style.diff.txt index 02c025695f11..17a35c24b1e3 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_form.formplayer-webapp_form.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_form.formplayer-webapp_form.style.diff.txt @@ -22,11 +22,13 @@ } .controls { -@@ -18,23 +18,16 @@ +@@ -17,24 +17,17 @@ + padding-top: 3px; } - .form-control { +- .form-control { - font-size: @form-text-size; ++ .form-control, .form-select { + font-size: $form-text-size; } @@ -58,40 +60,90 @@ } // Bootstrap introduces -10px left/right margin for row classes. This causes element to overflow parent. -@@ -51,8 +44,8 @@ +@@ -51,43 +44,43 @@ margin-right: 0px; } .question-container { - padding-left: @form-text-indent; - padding-right: @form-text-indent; +- } +- +- .form-group { + padding-left: $form-text-indent; + padding-right: $form-text-indent; - } - - .form-group { -@@ -64,8 +57,8 @@ ++ } ++ ++ .q { + margin-left: 0px; + margin-right: 0px; +- .caption.control-label { ++ .caption { + display: block; + } } .group-body { - margin-left: @group-indent; - margin-right: @group-indent; +- } +- +- .gr.panel { + margin-left: $group-indent; + margin-right: $group-indent; ++ } ++ ++ .gr.card { + border-radius: 0px; } - .gr.panel { -@@ -97,7 +90,7 @@ +- .rep.panel { ++ .rep.card { + border-radius: 0px; } - .panel-body { +- .col-sm-12, +- .col-sm-11, +- .col-sm-10, +- .col-sm-9, +- .col-sm-8, +- .col-sm-7, +- .col-sm-6, +- .col-sm-5, +- .col-sm-4, +- .col-sm-3, +- .col-sm-2, +- .col-sm-1 { ++ .col-md-12, ++ .col-md-11, ++ .col-md-10, ++ .col-md-9, ++ .col-md-8, ++ .col-md-7, ++ .col-md-6, ++ .col-md-5, ++ .col-md-4, ++ .col-md-3, ++ .col-md-2, ++ .col-md-1 { + &:first-child { + padding-left: 0; + } +@@ -96,29 +89,29 @@ + } + } + +- .panel-body { - @media (max-width: @screen-xs-max) { ++ .card-body { + @include media-breakpoint-down(md) { padding-left: 0px; padding-right: 0px; } -@@ -106,19 +99,19 @@ + } + .stripe-repeats { - > .row, .panel-body > .children > .row { +- > .row, .panel-body > .children > .row { ++ > .row, .card-body > .children > .row { &:nth-of-type(odd) { - background-color: @table-bg-accent; + background-color: $table-accent-bg; @@ -112,21 +164,33 @@ border-radius: 8px; margin: 2px; padding-top: 5px; -@@ -160,7 +153,7 @@ +@@ -140,7 +133,7 @@ + } + } + +- .panel-heading { ++ .card-header { + border-top-left-radius: 0px; + border-top-right-radius: 0px; + } +@@ -159,17 +152,17 @@ + display: none; } - .form-group.required { +- .form-group.required { - .transition(all .5s); ++ .q.required { + transition: all .5s; margin-bottom: 0; label:before { display: none; -@@ -168,8 +161,8 @@ + } } - .form-group.required.on { +- .form-group.required.on { - background-color: @cc-att-neg-hi; - border: 10px solid @cc-att-neg-mid; ++ .q.required.on { + background-color: $cc-att-neg-hi; + border: 10px solid $cc-att-neg-mid; border-bottom: none; @@ -148,7 +212,61 @@ color: white; width: auto; line-height: 14px; -@@ -268,3 +261,8 @@ +@@ -204,6 +197,10 @@ + } + + @media print { ++ #content-container { ++ max-width: none; ++ } ++ + .form-container.print-container { + margin: 0px; + .page-header { +@@ -211,14 +208,14 @@ + } + } + +- .q.form-group { ++ .q { + break-inside: avoid; + } + +- .panel.panel-default.last, +- .panel.panel-default.last *, +- .q.form-group.last, +- .q.form-group.last * { ++ .card.last, ++ .card.last *, ++ .q.last, ++ .q.last * { + margin-bottom: 0px; + padding-bottom: 0px; + .widget-container { +@@ -241,7 +238,7 @@ + .question-tile-row { + display: flex; + align-items: start; +- * .form-group, * p, * .control-label { ++ * .q, * p, * .caption { + padding-top: 0px !important; + padding-bottom: 0px !important; + margin-top: 0px !important; +@@ -249,13 +246,6 @@ + } + } + +-.question-tile-row { +- .gr { +- padding-right: 0px !important; +- padding-left: 0px !important; +- } +-} +- + .gr-has-no-nested-questions { + display: none; + } +@@ -268,3 +258,15 @@ padding-top: 0px !important; padding-bottom: 7px; } @@ -157,3 +275,10 @@ + position: fixed; + bottom: 35px; +} ++ ++.my-05em-for-hs { ++ h1, h2, h3, h4, h5, h6 { ++ margin-top: 0.5em !important; ++ margin-bottom: 0.5em !important; ++ } ++} diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_print-general.formplayer-webapp_print-general.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_print-general.formplayer-webapp_print-general.style.diff.txt index e69de29bb2d1..96cdd303aba2 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_print-general.formplayer-webapp_print-general.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_print-general.formplayer-webapp_print-general.style.diff.txt @@ -0,0 +1,272 @@ +--- ++++ +@@ -1,194 +1,194 @@ +-// Renders Bootstrap as "small" layout when printing ++// Renders Bootstrap as "medium" layout when printing + @media print { +- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { ++ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } +- .col-sm-12 { ++ .col-md-12 { + width: 100%; + } +- .col-sm-11 { ++ .col-md-11 { + width: 91.66666667%; + } +- .col-sm-10 { ++ .col-md-10 { + width: 83.33333333%; + } +- .col-sm-9 { ++ .col-md-9 { + width: 75%; + } +- .col-sm-8 { ++ .col-md-8 { + width: 66.66666667%; + } +- .col-sm-7 { ++ .col-md-7 { + width: 58.33333333%; + } +- .col-sm-6 { ++ .col-md-6 { + width: 50%; + } +- .col-sm-5 { ++ .col-md-5 { + width: 41.66666667%; + } +- .col-sm-4 { ++ .col-md-4 { + width: 33.33333333%; + } +- .col-sm-3 { ++ .col-md-3 { + width: 25%; + } +- .col-sm-2 { ++ .col-md-2 { + width: 16.66666667%; + } +- .col-sm-1 { ++ .col-md-1 { + width: 8.33333333%; + } +- .col-sm-pull-12 { ++ .col-md-pull-12 { + right: 100%; + } +- .col-sm-pull-11 { ++ .col-md-pull-11 { + right: 91.66666667%; + } +- .col-sm-pull-10 { ++ .col-md-pull-10 { + right: 83.33333333%; + } +- .col-sm-pull-9 { ++ .col-md-pull-9 { + right: 75%; + } +- .col-sm-pull-8 { ++ .col-md-pull-8 { + right: 66.66666667%; + } +- .col-sm-pull-7 { ++ .col-md-pull-7 { + right: 58.33333333%; + } +- .col-sm-pull-6 { ++ .col-md-pull-6 { + right: 50%; + } +- .col-sm-pull-5 { ++ .col-md-pull-5 { + right: 41.66666667%; + } +- .col-sm-pull-4 { ++ .col-md-pull-4 { + right: 33.33333333%; + } +- .col-sm-pull-3 { ++ .col-md-pull-3 { + right: 25%; + } +- .col-sm-pull-2 { ++ .col-md-pull-2 { + right: 16.66666667%; + } +- .col-sm-pull-1 { ++ .col-md-pull-1 { + right: 8.33333333%; + } +- .col-sm-pull-0 { ++ .col-md-pull-0 { + right: auto; + } +- .col-sm-push-12 { ++ .col-md-push-12 { + left: 100%; + } +- .col-sm-push-11 { ++ .col-md-push-11 { + left: 91.66666667%; + } +- .col-sm-push-10 { ++ .col-md-push-10 { + left: 83.33333333%; + } +- .col-sm-push-9 { ++ .col-md-push-9 { + left: 75%; + } +- .col-sm-push-8 { ++ .col-md-push-8 { + left: 66.66666667%; + } +- .col-sm-push-7 { ++ .col-md-push-7 { + left: 58.33333333%; + } +- .col-sm-push-6 { ++ .col-md-push-6 { + left: 50%; + } +- .col-sm-push-5 { ++ .col-md-push-5 { + left: 41.66666667%; + } +- .col-sm-push-4 { ++ .col-md-push-4 { + left: 33.33333333%; + } +- .col-sm-push-3 { ++ .col-md-push-3 { + left: 25%; + } +- .col-sm-push-2 { ++ .col-md-push-2 { + left: 16.66666667%; + } +- .col-sm-push-1 { ++ .col-md-push-1 { + left: 8.33333333%; + } +- .col-sm-push-0 { ++ .col-md-push-0 { + left: auto; + } +- .col-sm-offset-12 { ++ .col-md-offset-12 { + margin-left: 100%; + } +- .col-sm-offset-11 { ++ .col-md-offset-11 { + margin-left: 91.66666667%; + } +- .col-sm-offset-10 { ++ .col-md-offset-10 { + margin-left: 83.33333333%; + } +- .col-sm-offset-9 { ++ .col-md-offset-9 { + margin-left: 75%; + } +- .col-sm-offset-8 { ++ .col-md-offset-8 { + margin-left: 66.66666667%; + } +- .col-sm-offset-7 { ++ .col-md-offset-7 { + margin-left: 58.33333333%; + } +- .col-sm-offset-6 { ++ .col-md-offset-6 { + margin-left: 50%; + } +- .col-sm-offset-5 { ++ .col-md-offset-5 { + margin-left: 41.66666667%; + } +- .col-sm-offset-4 { ++ .col-md-offset-4 { + margin-left: 33.33333333%; + } +- .col-sm-offset-3 { ++ .col-md-offset-3 { + margin-left: 25%; + } +- .col-sm-offset-2 { ++ .col-md-offset-2 { + margin-left: 16.66666667%; + } +- .col-sm-offset-1 { ++ .col-md-offset-1 { + margin-left: 8.33333333%; + } +- .col-sm-offset-0 { ++ .col-md-offset-0 { + margin-left: 0%; + } +- .visible-xs { +- display: none !important; +- } +- .hidden-xs { +- display: block !important; +- } +- table.hidden-xs { +- display: table; +- } +- tr.hidden-xs { +- display: table-row !important; +- } +- th.hidden-xs, +- td.hidden-xs { +- display: table-cell !important; +- } +- .hidden-xs.hidden-print { ++ .visible-sm { + display: none !important; + } + .hidden-sm { ++ display: block !important; ++ } ++ table.hidden-sm { ++ display: table; ++ } ++ tr.hidden-sm { ++ display: table-row !important; ++ } ++ th.hidden-sm, ++ td.hidden-sm { ++ display: table-cell !important; ++ } ++ .hidden-sm.hidden-print { + display: none !important; + } +- .visible-sm { ++ .hidden-md { ++ display: none !important; ++ } ++ .visible-md { + display: block !important; + } +- table.visible-sm { ++ table.visible-md { + display: table; + } +- tr.visible-sm { ++ tr.visible-md { + display: table-row !important; + } +- th.visible-sm, +- td.visible-sm { ++ th.visible-md, ++ td.visible-md { + display: table-cell !important; + } +- }+ } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_query.formplayer-webapp_query.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_query.formplayer-webapp_query.style.diff.txt index e7d59c8c0f0f..78f48449c2f1 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_query.formplayer-webapp_query.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/formplayer-webapp_query.formplayer-webapp_query.style.diff.txt @@ -18,16 +18,16 @@ #sidebar-region { background: transparent; - @media (min-width: @screen-md-min) { -+ @include media-breakpoint-up(md) { ++ @include media-breakpoint-up(lg) { width: 300px; position: absolute; } - @media (max-width: @screen-sm-max) { -+ @include media-breakpoint-down(md) { ++ @include media-breakpoint-down(lg) { max-width: 600px; margin: auto; } -@@ -66,10 +69,10 @@ +@@ -66,35 +69,39 @@ .query-description { a { @@ -38,9 +38,17 @@ - color: @cc-brand-low; + color: $cc-brand-low; } +-} +- +-.query-caption.required .control-label::before, .search-query-group-header.required .search-query-group-header-label::before { +- content: '*'; +- font-weight: bold; +- color: #c0392b; +- margin: 0 3px; +- float: left; } -@@ -85,16 +88,28 @@ + .search-query-group-header-label { font-size: larger; } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/imports/select2s._select2.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/imports/select2s._select2.style.diff.txt index e3b369e36838..6716f1ea2ce9 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/imports/select2s._select2.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/imports/select2s._select2.style.diff.txt @@ -173,7 +173,7 @@ + +.select2-container--default { + .select2-selection--single .select2-selection__clear { -+ margin-right: 30px; ++ margin-right: 30px !important; + } +} + diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app-main.preview_app-main.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app-main.preview_app-main.style.diff.txt index fc2fee935978..6dbc92555c3e 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app-main.preview_app-main.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app-main.preview_app-main.style.diff.txt @@ -1,6 +1,6 @@ --- +++ -@@ -1,25 +1,17 @@ +@@ -1,25 +1,19 @@ -@import '../../hqwebapp/less/_hq/includes/variables.less'; -@import '../../hqwebapp/less/_hq/includes/mixins.less'; - @@ -14,6 +14,7 @@ -@import "preview_app/base"; @import "preview_app/variables"; ++@import "preview_app/datepicker"; @import "preview_app/notifications"; @import "preview_app/scrollable"; @import "preview_app/navigation"; @@ -28,3 +29,4 @@ -@import "preview_app/datepicker"; -@import "preview_app/panels"; @import "preview_app/debugger"; ++@import "preview_app/case-tile"; diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_datepicker.preview_app_datepicker.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_datepicker.preview_app_datepicker.style.diff.txt index 8fddd46cf8e7..1ffc5bbf63a3 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_datepicker.preview_app_datepicker.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_datepicker.preview_app_datepicker.style.diff.txt @@ -1,29 +1,39 @@ --- +++ -@@ -1,26 +0,0 @@ +@@ -1,17 +1,18 @@ -@datepicker-width: 247px; -@datepicker-width-tablet: 447px; -@datepicker-height: 410px; -@datepicker-height-tablet: 565px; -- ++$datepicker-width: 247px; ++$datepicker-width-tablet: 447px; ++$datepicker-height: 410px; ++$datepicker-height-tablet: 565px; + -.bootstrap-datetimepicker-widget.dropdown-menu { -- position: fixed; -- top: 30px !important; -- left: 0px !important; -- padding-bottom: 15px !important; ++.tempus-dominus-widget { ++ transform: none !important; + position: fixed; + top: 30px !important; + left: 0px !important; + padding-bottom: 15px !important; - min-height: @datepicker-height !important; -- -- padding: 5px !important; ++ min-height: $datepicker-height !important; + + padding: 5px !important; - width: @datepicker-width !important; -- margin-left: 2px !important; -- margin-right: 2px !important; -- -- .datepicker { -- margin: auto; -- } --} -- ++ width: $datepicker-width !important; + margin-left: 2px !important; + margin-right: 2px !important; + +@@ -20,7 +21,7 @@ + } + } + -.preview-tablet-mode .bootstrap-datetimepicker-widget.dropdown-menu { - width: @datepicker-width-tablet !important; - min-height: @datepicker-height-tablet !important; --} ++.preview-tablet-mode .tempus-dominus-widget { ++ width: $datepicker-width-tablet !important; ++ min-height: $datepicker-height-tablet !important; + } diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_form.preview_app_form.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_form.preview_app_form.style.diff.txt index dd7f99aa50ab..f9b73116de0c 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_form.preview_app_form.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_form.preview_app_form.style.diff.txt @@ -49,27 +49,39 @@ } } -@@ -85,7 +82,7 @@ +@@ -76,7 +73,7 @@ + } } - .form-group.required { +-.form-group { ++.q { + padding: 10px 0; + label { + margin-right: 10px; +@@ -84,17 +81,14 @@ + } + } + +-.form-group.required { - .transition(all .5s); ++.q.required { + transition: all .5s; margin-bottom: 0; - label:before { - display: none; -@@ -93,8 +90,8 @@ +- label:before { +- display: none; +- } } - .form-group.required.on { +-.form-group.required.on { - background-color: @cc-att-neg-hi; - border: 10px solid @cc-att-neg-mid; ++.q.required.on { + background-color: $cc-att-neg-hi; + border: 10px solid $cc-att-neg-mid; border-bottom: none; label { margin-left: 0; -@@ -104,13 +101,13 @@ +@@ -104,13 +98,13 @@ .form-group-required-label { opacity: 0; @@ -85,3 +97,12 @@ color: white; width: auto; line-height: 14px; +@@ -122,7 +116,7 @@ + border: none; + } + +-.form-group .help-block { ++.q .help-block { + font-size: 11px; + &:before { + content: "\f05a"; diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_module.preview_app_module.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_module.preview_app_module.style.diff.txt index 083e990dffab..6d5fc688ca2b 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_module.preview_app_module.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/preview_app_module.preview_app_module.style.diff.txt @@ -15,7 +15,7 @@ .input-group-lg .form-control, .input-group-lg .btn{ font-size: 11px; -@@ -45,18 +45,14 @@ +@@ -45,19 +45,17 @@ } } @@ -23,35 +23,39 @@ - width: 140px; -} - - .module-per-page-container { -- .input-group-lg .form-control, +-.module-per-page-container { ++.pagination-container { ++ .form-select, ++ .pagination-lg .page-link, + .input-group-lg .form-control, - .input-group-lg .btn{ -+ .pagination-lg .form-control, -+ .pagination-lg .btn{ ++ .input-group-lg .btn { font-size: 11px; height: 30px; padding: 5px 10px; } - .input-group-lg .btn [class*='fa-'] { -+ .pagination-lg .btn [class*='fa-'] { - font-size: 11px; - } - } -@@ -76,13 +72,6 @@ +- font-size: 11px; ++ .form-select { ++ padding: 5px 20px; // extra padding for the sake of the arrow } } +@@ -73,13 +71,6 @@ + + .module-icon { + max-height: 30px; +- } +-} +- -.module-pagination-container .pagination { - font-size: 10px; - [class*='fa-'] { - font-size: 14px; -- } --} -- - .module-case-detail-modal { - padding: 0 !important; - width: 251px; -@@ -99,8 +88,7 @@ + } + } + +@@ -99,8 +90,7 @@ .modal-content { height: 442px; overflow-x: hidden; @@ -61,7 +65,7 @@ } } -@@ -110,8 +98,7 @@ +@@ -110,8 +100,7 @@ } .modal-content { @@ -71,3 +75,13 @@ } .btn-lg { +@@ -142,8 +131,7 @@ + + .module-banner { + font-size: 11px; +- padding-left: 6px; +- padding-right: 6px; ++ padding: 6px; + } + + .module-menu-bar-offset { diff --git a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/style-imports.commcarehq.style.diff.txt b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/style-imports.commcarehq.style.diff.txt index f2f74bf555b2..e024285339d8 100644 --- a/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/style-imports.commcarehq.style.diff.txt +++ b/corehq/apps/hqwebapp/tests/data/bootstrap5_diffs/stylesheets/style-imports.commcarehq.style.diff.txt @@ -1,6 +1,6 @@ --- +++ -@@ -1,44 +1,94 @@ +@@ -1,44 +1,95 @@ -@import "_hq/includes/variables.less"; -@import "_hq/includes/mixins.less"; @@ -61,6 +61,7 @@ +@import "reboot"; +@import "type"; +@import "commcarehq/type"; ++@import "commcarehq/print"; +@import "images"; +@import "containers"; +@import "commcarehq/containers"; diff --git a/corehq/apps/hqwebapp/tests/utils/test_bootstrap_changes.py b/corehq/apps/hqwebapp/tests/utils/test_bootstrap_changes.py index 4d402b72c83d..fd3692fc1fc0 100644 --- a/corehq/apps/hqwebapp/tests/utils/test_bootstrap_changes.py +++ b/corehq/apps/hqwebapp/tests/utils/test_bootstrap_changes.py @@ -417,20 +417,19 @@ def test_update_gruntfile(): 'case_importer', ]; """ - mocha_paths = ["cloudcare/spec/mocha.html", "cloudcare/spec/form_entry/mocha.html"] + mocha_paths = ["notifications/spec/mocha.html"] result = update_gruntfile(filedata, mocha_paths) expected_result = """ var apps = [ 'app_manager', 'export/ko', - 'notifications', + 'notifications/bootstrap3', + 'notifications/bootstrap5', 'reports_core/choiceListUtils', 'locations', 'userreports', - 'cloudcare/bootstrap3', - 'cloudcare/bootstrap5', - 'cloudcare/form_entry/bootstrap3', - 'cloudcare/form_entry/bootstrap5', + 'cloudcare', + 'cloudcare/form_entry', 'hqwebapp', 'case_importer', ]; diff --git a/corehq/apps/hqwebapp/utils/bootstrap/changes_guide/js-bootstrapSwitch.md b/corehq/apps/hqwebapp/utils/bootstrap/changes_guide/js-bootstrapSwitch.md deleted file mode 100644 index 5b4ae5db46d1..000000000000 --- a/corehq/apps/hqwebapp/utils/bootstrap/changes_guide/js-bootstrapSwitch.md +++ /dev/null @@ -1,22 +0,0 @@ -The `bootstrap-switch` plugin is incompatible with Bootstrap 5, which has its own built-in switch widget. - -A similar switch widget is built into Bootstrap 5 and does not require JavaScript instantiation. - -An EXAMPLE for how to apply this change is provided below. -Please see docs for further details. - -previously -``` -$("#mySwitch").bootstrapSwitch(); -``` - -now -``` -
- - -
-``` - -Old docs: https://bttstrp.github.io/bootstrap-switch/ -New docs: https://getbootstrap.com/docs/5.1/forms/checks-radios/#switches diff --git a/corehq/apps/hqwebapp/utils/bootstrap/spec/bootstrap_3_to_5.json b/corehq/apps/hqwebapp/utils/bootstrap/spec/bootstrap_3_to_5.json index d15a90ba62a3..5653aea26922 100644 --- a/corehq/apps/hqwebapp/utils/bootstrap/spec/bootstrap_3_to_5.json +++ b/corehq/apps/hqwebapp/utils/bootstrap/spec/bootstrap_3_to_5.json @@ -104,7 +104,6 @@ ], "flagged_js_plugins": [ "affix", - "bootstrapSwitch", "button", "createDateRangePicker", "datetimepicker", 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 10df5128c61a..5ec3f13e4321 100644 --- a/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json +++ b/corehq/apps/hqwebapp/utils/bootstrap/status/bootstrap3_to_5.json @@ -73,6 +73,9 @@ "user_importer": { "is_complete": true }, + "cloudcare": { + "is_complete": true + }, "dropbox": { "is_complete": true }, diff --git a/corehq/apps/integration/templates/integration/base_cloudcare_template.html b/corehq/apps/integration/templates/integration/base_cloudcare_template.html index 6d400cd4a2fd..5e2ebec55445 100644 --- a/corehq/apps/integration/templates/integration/base_cloudcare_template.html +++ b/corehq/apps/integration/templates/integration/base_cloudcare_template.html @@ -16,9 +16,6 @@ {% endblock navigation %} {% block stylesheets %} - {% compress css %} - - {% endcompress %} {% compress css %} =1.10" moment "^2.9.0" -bootstrap-switch@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/bootstrap-switch/-/bootstrap-switch-3.3.2.tgz#79ddb49fadc308fb731e257f95957af48996eea7" - integrity sha1-ed20n63DCPtzHiV/lZV69ImW7qc= - dependencies: - jquery ">=1.9.0" - bootstrap-timepicker@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/bootstrap-timepicker/-/bootstrap-timepicker-0.5.1.tgz#1ee36b4a7c27904c7c96da0988b711c9ee9e99b7"