Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ml/location-gray-out' into autos…
Browse files Browse the repository at this point in the history
…taging
  • Loading branch information
gherceg committed Aug 23, 2024
2 parents 19bb5ae + 51bce01 commit 1164e0a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions corehq/apps/locations/static/locations/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ hqDefine("locations/js/widgets", [
},
processResults: function (data, params) {
var more = (params.page || 1) * 10 < data.total;
var selected_locations = $select[0].selectedOptions
if (selected_locations.length > 0) {
var loc_ids = []
for (var i in selected_locations) {
loc_ids.push(selected_locations[i].value)
}
for (var i in data.results) {
if (loc_ids.indexOf(data.results[i].id) > -1) {
data.results[i].disabled = "disabled"
}
}
}
return {
results: data.results,
pagination: { more: more },
Expand Down

0 comments on commit 1164e0a

Please sign in to comment.