mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Removed the need for forms to update the Application status.
This commit is contained in:
19
hr/forms.py
19
hr/forms.py
@@ -37,25 +37,6 @@ def CreateApplicationForm(user):
|
||||
return self.cleaned_data
|
||||
return ApplicationForm
|
||||
|
||||
def CreateApplicationStatusForm(admin):
|
||||
|
||||
if admin:
|
||||
form_choices = APPLICATION_STATUS_CHOICES_ADMIN
|
||||
else:
|
||||
form_choices = APPLICATION_STATUS_CHOICES_USER
|
||||
|
||||
class ApplicationStatusForm(forms.Form):
|
||||
""" Application Status Change Form """
|
||||
|
||||
application = forms.IntegerField(required=True, widget=forms.HiddenInput)
|
||||
new_status = forms.ChoiceField(label = u'New Status', choices = form_choices)
|
||||
|
||||
class Meta:
|
||||
exclude = ('application')
|
||||
|
||||
return ApplicationStatusForm
|
||||
|
||||
|
||||
class NoteForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user