class EntryForm(BaseEntryForm): rank = forms.ChoiceField(choices=RANK_CHOICES, required=True) step = forms.DecimalField(max_digits=4, decimal_places=2, help_text="Current salary step") base_salary = fields.AddSalaryField(help_text="Base annual salary for this rank + step.") add_salary = fields.AddSalaryField(label="Market Differential") add_pay = fields.AddPayField() def post_init(self): # find the last-known rank as a default if self.person: from faculty.models import CareerEvent event = CareerEvent.objects.filter(person=self.person, event_type='SALARY').effective_now().last() if event: self.fields['rank'].initial = event.config['rank']
class EntryForm(BaseEntryForm): description = forms.CharField( help_text='A brief description of the service', max_length=30) add_pay = fields.AddPayField() teaching_credits = fields.TeachingCreditField()