From 0ff21402fa711c3e865a7c8b8b715d7dfac2f9fd Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 24 Apr 2017 19:18:32 +0300 Subject: Added queue menu to checkin/auth --- servo/forms/checkin.py | 8 +- servo/templates/checkin/newindex.html | 261 +++++++++++++++++----------------- 2 files changed, 138 insertions(+), 131 deletions(-) (limited to 'servo') diff --git a/servo/forms/checkin.py b/servo/forms/checkin.py index 31d28b5..b3ed0d0 100644 --- a/servo/forms/checkin.py +++ b/servo/forms/checkin.py @@ -17,7 +17,7 @@ from servo.validators import (apple_sn_validator, from servo.forms.base import SearchFieldInput from servo.models import (Configuration, Device, Attachment, Location, - Customer,) + Customer, Queue,) # Generate list of years for purchase date picker @@ -69,6 +69,11 @@ class DeviceForm(forms.ModelForm): help_text=_("Please describe the condition of the device") ) + queue = forms.ModelChoiceField(label=_('Queue'), + required=False, + queryset=Queue.objects.all(), + help_text=_('Assign order to this queue')) + class Meta: model = Device fields = ( @@ -233,7 +238,6 @@ class IssueForm(forms.Form): issue_description = forms.CharField( min_length=10, - #initial='Does not work very well', label=_(u'Problem description'), widget=forms.Textarea(attrs={'class': 'span12'}) ) diff --git a/servo/templates/checkin/newindex.html b/servo/templates/checkin/newindex.html index 878ddea..96c8042 100644 --- a/servo/templates/checkin/newindex.html +++ b/servo/templates/checkin/newindex.html @@ -6,140 +6,143 @@ {% block main %} {% comment %} -
+ + + + + +
+
+ + + +
+ {% endcomment %}
-
- {% csrf_token %} -
- {% include "checkin/device_form.html" %} -
- -
- {% include "checkin/customer_form.html" %} -
- - {% if request.user.is_authenticated %} -
-
-
- -
- {% for t in tags %} -
- -
- {% endfor %} -
-
-
-
- {% endif %} -
-
- {% bootstrap_field issue_form.issue_description %} - {% bootstrap_field issue_form.notes %} - {% bootstrap_field device_form.condition %} -
-
- {% bootstrap_field device_form.pop %} - - - - - - - - - - {% for q in questions %} - - - - - - {% endfor %} - -
{% trans "Yes" %}{% trans "No" %}
- {{ q }} -

{{ q.description }}

-
- {% bootstrap_field customer_form.checkin_location %} - {% bootstrap_field customer_form.checkout_location %} -
-
-
-
-
- {% buttons %} - {% if not request.user.is_authenticated %} - {% bootstrap_field customer_form.agree_to_terms %} - {% endif %} - {% if request.user.is_authenticated %} - - {% else %} - - {% endif %} - {% endbuttons %} -
-
-
+
+ {% csrf_token %} +
+ {% include "checkin/device_form.html" %} +
+ +
+ {% include "checkin/customer_form.html" %} +
+ + {% if request.user.is_authenticated %} +
+
+
+ +
+ {% for t in tags %} +
+ +
+ {% endfor %} +
+
+
+
+ {% endif %} +
+
+ {% bootstrap_field issue_form.issue_description %} + {% bootstrap_field issue_form.notes %} + {% bootstrap_field device_form.condition %} +
+
+ {% bootstrap_field device_form.pop %} + + + + + + + + + + {% for q in questions %} + + + + + + {% endfor %} + +
{% trans "Yes" %}{% trans "No" %}
+ {{ q }} +

{{ q.description }}

+
+ {% bootstrap_field customer_form.checkin_location %} + {% bootstrap_field customer_form.checkout_location %} + {% if request.user.is_authenticated %} + {% bootstrap_field device_form.queue %} + {% endif %} +
+
+
+
+
+ {% buttons %} + {% if not request.user.is_authenticated %} + {% bootstrap_field customer_form.agree_to_terms %} + {% endif %} + {% if request.user.is_authenticated %} + + {% else %} + + {% endif %} + {% endbuttons %} +
+
+
{% endblock main %} -- cgit v1.2.3