Sort states and substates by their ID in the model.
Use the right number of hyphens to separate the current ADs from old ADs in the I-D Search form. - Legacy-Id: 374
This commit is contained in:
parent
2ad2219895
commit
ada5521a9f
|
@ -12,7 +12,7 @@ class IDSearch(forms.Form):
|
|||
search_rfcnumber = forms.CharField(widget=forms.TextInput(attrs={'size': 5, 'maxlength': 60}))
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(IDSearch, self).__init__(*args, **kwargs)
|
||||
self.fields['search_job_owner'].choices = [('', '--All/Any')] + [(ad.id, "%s, %s" % (ad.last_name, ad.first_name)) for ad in IESGLogin.objects.filter(user_level=1).order_by('last_name')] + [('-99', '----------')] + [(ad.id, "%s, %s" % (ad.last_name, ad.first_name)) for ad in IESGLogin.objects.filter(user_level=2).order_by('last_name')]
|
||||
self.fields['search_job_owner'].choices = [('', '--All/Any')] + [(ad.id, "%s, %s" % (ad.last_name, ad.first_name)) for ad in IESGLogin.objects.filter(user_level=1).order_by('last_name')] + [('-99', '------------------')] + [(ad.id, "%s, %s" % (ad.last_name, ad.first_name)) for ad in IESGLogin.objects.filter(user_level=2).order_by('last_name')]
|
||||
|
||||
class EmailFeedback(forms.Form):
|
||||
category = forms.CharField(widget=forms.HiddenInput())
|
||||
|
|
|
@ -40,6 +40,7 @@ class IDState(models.Model):
|
|||
choices = staticmethod(choices)
|
||||
class Meta:
|
||||
db_table = 'ref_doc_states_new'
|
||||
ordering = ['document_state_id']
|
||||
class Admin:
|
||||
pass
|
||||
|
||||
|
@ -62,6 +63,7 @@ class IDSubState(models.Model):
|
|||
return self.sub_state
|
||||
class Meta:
|
||||
db_table = 'sub_state'
|
||||
ordering = ['sub_state_id']
|
||||
class Admin:
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue