diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-12-12 23:56:41 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-12-12 23:56:41 +0200 |
commit | 8b336df1628fe16c5c068002e543e22a51f75da5 (patch) | |
tree | dce68019dd7ad0f2b82f20b959506e96788f2448 /servo/forms | |
parent | b6fe7d57744b6144869c12b9d3435099037d3498 (diff) | |
download | Servo-8b336df1628fe16c5c068002e543e22a51f75da5.tar.gz Servo-8b336df1628fe16c5c068002e543e22a51f75da5.tar.bz2 Servo-8b336df1628fe16c5c068002e543e22a51f75da5.zip |
Move customer selection to customer view
Diffstat (limited to 'servo/forms')
-rw-r--r-- | servo/forms/devices.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/servo/forms/devices.py b/servo/forms/devices.py index 47838b1..8a451cf 100644 --- a/servo/forms/devices.py +++ b/servo/forms/devices.py @@ -57,12 +57,18 @@ class DeviceForm(forms.ModelForm): class DeviceUploadForm(forms.Form): - datafile = forms.FileField() - customer = forms.ModelChoiceField( - queryset=Customer.objects.all(), - required=False + datafile = forms.FileField( + help_text=_('Device data in Excel format (.xls or .xlsx)') + ) + customer = forms.IntegerField( + required=False, + widget=forms.HiddenInput, + ) + do_warranty_check = forms.BooleanField( + required=False, + initial=True, + help_text=_('Perform warranty check on uploaded serial numbers') ) - do_warranty_check = forms.BooleanField(required=False, initial=True) class DiagnosticsForm(forms.Form): |