Source code for intranet.apps.itemreg.forms
from django import forms
from .models import CalculatorRegistration, ComputerRegistration, PhoneRegistration
[docs]class CalculatorRegistrationForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields["calc_type"].label = "Calculator Type"
self.fields["calc_serial"].label = "Calculator Serial"
self.fields["calc_serial"].help_text = "Enter the calculator serial code (found engraved on the back of the calculator)"
self.fields["calc_id"].label = "Calculator ID"
self.fields["calc_id"].help_text = "Enter the calculator ID (without dashes)"