Skip to content

Commit

Permalink
Merge pull request #34792 from dimagi/ze/geospatial-better-algorithm-…
Browse files Browse the repository at this point in the history
…descriptions

Better Algorithm Descriptions for Geospatial Feature
  • Loading branch information
zandre-eng authored Jun 20, 2024
2 parents 7ef55ca + e3bc902 commit 35379ef
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion corehq/apps/geospatial/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.utils.translation import gettext_lazy as _
from django import forms
from corehq.apps.geospatial.models import GeoConfig, validate_travel_mode
from corehq.apps.hqwebapp.utils.translation import format_html_lazy
from corehq import toggles


Expand Down Expand Up @@ -108,7 +109,20 @@ class Meta:
# ),
choices=DISBURSEMENT_ALGORITHM_OPTIONS,
required=True,
help_text=_("The algorithm which will be used to disburse cases between users"),
help_text=format_html_lazy('''
<span data-bind="visible: selectedAlgorithm() == '{}'">
{}
</span>
<span data-bind="visible: selectedAlgorithm() == '{}'">
{}
</span>''',
GeoConfig.RADIAL_ALGORITHM,
_('Uses the straight-line distance between users and cases to determine '
' allocation of cases. Ideal for when map road coverage is poor.'),
GeoConfig.ROAD_NETWORK_ALGORITHM,
_('Takes distance along roads between users and cases into account to determine '
'allocation of cases. Ideal for when map road coverage is good.'),
)
)
min_cases_per_user = forms.IntegerField(
label=_("Minimum cases assigned per user"),
Expand Down

0 comments on commit 35379ef

Please sign in to comment.