aboutsummaryrefslogtreecommitdiffstats
path: root/servo/forms
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-12-12 23:56:41 +0200
committerFilipp Lepalaan <filipp@mac.com>2015-12-12 23:56:41 +0200
commit8b336df1628fe16c5c068002e543e22a51f75da5 (patch)
treedce68019dd7ad0f2b82f20b959506e96788f2448 /servo/forms
parentb6fe7d57744b6144869c12b9d3435099037d3498 (diff)
downloadServo-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.py16
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):