From f7283db26b4896a299b9ce4e9f43d478681b6d63 Mon Sep 17 00:00:00 2001 From: Jennifer Schweers Date: Thu, 25 Jan 2024 18:10:02 -0500 Subject: [PATCH 1/2] Removed unused ota templates --- .../templates/ota/advanced_prime_restore_cache.html | 13 ------------- .../apps/ota/templates/ota/prime_restore_cache.html | 8 -------- 2 files changed, 21 deletions(-) delete mode 100644 corehq/apps/ota/templates/ota/advanced_prime_restore_cache.html delete mode 100644 corehq/apps/ota/templates/ota/prime_restore_cache.html diff --git a/corehq/apps/ota/templates/ota/advanced_prime_restore_cache.html b/corehq/apps/ota/templates/ota/advanced_prime_restore_cache.html deleted file mode 100644 index 46f8ab028fbd..000000000000 --- a/corehq/apps/ota/templates/ota/advanced_prime_restore_cache.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'ota/prime_restore_cache.html' %} -{% load i18n %} - -{% block page_content %} -

{% trans 'Use this form to generate the restore response for users and cache the results for 24 hours.' %}

-

- - {% trans 'More info' %} - -

-
- {{ block.super }} -{% endblock %} diff --git a/corehq/apps/ota/templates/ota/prime_restore_cache.html b/corehq/apps/ota/templates/ota/prime_restore_cache.html deleted file mode 100644 index 5415650bc09a..000000000000 --- a/corehq/apps/ota/templates/ota/prime_restore_cache.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends 'hqwebapp/bootstrap3/base_section.html' %} -{% load crispy_forms_tags %} - -{% block page_content %} -
- {% crispy form %} -
-{% endblock %} From 19f19ceddd2431dd9da97bf3b0e845cb3c1ba426 Mon Sep 17 00:00:00 2001 From: Jennifer Schweers Date: Thu, 25 Jan 2024 18:11:40 -0500 Subject: [PATCH 2/2] Removed forms.py --- corehq/apps/ota/forms.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 corehq/apps/ota/forms.py diff --git a/corehq/apps/ota/forms.py b/corehq/apps/ota/forms.py deleted file mode 100644 index c0317d2a603b..000000000000 --- a/corehq/apps/ota/forms.py +++ /dev/null @@ -1,34 +0,0 @@ -from django import forms -from django.utils.translation import gettext - -from crispy_forms import layout as crispy -# todo proper B3 Handle -from crispy_forms.bootstrap import StrictButton -from crispy_forms.helper import FormHelper - -from corehq.apps.hqwebapp import crispy as hqcrispy - - -class PrimeRestoreCacheForm(forms.Form): - info_text = gettext( - "For projects where mobile users manage a lot of cases (e.g. more than 10,000), " - "this tool can be used to temporarily speed up phone sync times. Once activated, " - "it will ensure that the 'Sync with Server' functionality runs faster on the phone for 24 hours.") - - def __init__(self, *args, **kwargs): - super(PrimeRestoreCacheForm, self).__init__(*args, **kwargs) - self.helper = FormHelper() - - self.helper.form_method = 'post' - self.helper.form_action = '.' - - self.helper.layout = crispy.Layout( - crispy.HTML("

" + self.info_text + "

"), - hqcrispy.FormActions( - StrictButton( - "Click here to speed up 'Sync with Server'", - css_class="btn-primary", - type="submit", - ), - ), - )