maps: sort icon labels in new layer page (#21567)
This commit is contained in:
parent
44f198df2a
commit
19c73ccc72
|
@ -50,6 +50,12 @@ class MapNewLayerForm(forms.ModelForm):
|
|||
}
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(MapNewLayerForm, self).__init__(*args, **kwargs)
|
||||
self.fields['icon'].choices = list(
|
||||
sorted(self.fields['icon'].choices, key=lambda x: force_text(x[1])))
|
||||
|
||||
|
||||
class MapLayerForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = MapLayer
|
||||
|
|
Loading…
Reference in New Issue