diff --git a/assets/templates/asset_create.html b/assets/templates/asset_create.html index 64ae9d84..013958ad 100644 --- a/assets/templates/asset_create.html +++ b/assets/templates/asset_create.html @@ -20,34 +20,34 @@ {% else %}
{% endif %} - {% include 'form_errors.html' %} -
-
-
- {% include 'partials/asset_buttons.html' %} + {% include 'form_errors.html' %} +
+
+
+ {% include 'partials/asset_buttons.html' %} +
-
- {% csrf_token %} - -
-
-
-
- Asset Details -
-
-
Asset ID - {% render_field form.asset_id|add_class:'form-control' value=object.asset_id %} + {% csrf_token %} + +
+
+
+
+ Asset Details
-
- - {% render_field form.description|add_class:'form-control' value=object.description %} -
-
- - {% for id, choice in form.category.field.choices %}
-
- - {% for id, choice in form.status.field.choices %} {% endfor %} -
-
- +
+
+ {% render_field form.serial_number|add_class:'form-control' value=object.serial_number %} -
- -
- +
+ +
+ {% render_field form.comments|add_class:'form-control' %} +
-
-
-
-
-
- Purchase Details -
-
-
- - -
- -
- -
- £ - {% render_field form.purchase_price|add_class:'form-control' value=object.purchase_price %} -
-
- -
- -
- £ - {% render_field form.salvage_value|add_class:'form-control' value=object.salvage_value %} -
-
- -
- - {% if object.date_acquired%} - {% with date_acq=object.date_acquired|date:"Y-m-d" %} - {% render_field form.date_acquired|add_class:'form-control'|attr:'type="date"' value=date_acq %} - {% endwith %} - {% else %} - - {% endif %} -
- -
- - {% with date_sol=object.form.date_sold|date:"Y-m-d" %} - {% render_field form.date_sold|add_class:'form-control'|attr:'type="date"' value=date_sol %} - {% endwith %} -
-
-
-
+
- Collection Details + Purchase Details
-
- +
+ + +
+ +
+ +
+ £ + {% render_field form.purchase_price|add_class:'form-control' value=object.purchase_price %} +
+
+ +
+ +
+ £ + {% render_field form.salvage_value|add_class:'form-control' value=object.salvage_value %} +
+
+ +
+ + {% if object.date_acquired%} + {% with date_acq=object.date_acquired|date:"Y-m-d" %} + {% render_field form.date_acquired|add_class:'form-control'|attr:'type="date"' value=date_acq %} + {% endwith %} + {% else %} + + {% endif %} +
+ +
+ + {% with date_sol=object.form.date_sold|date:"Y-m-d" %} + {% render_field form.date_sold|add_class:'form-control'|attr:'type="date"' value=date_sol %} + {% endwith %} +
+
+
+
+ {#% if object.is_cable and object.category == "Power" %#} + +
+
+
+ Collection Details +
+
+
+ {% include 'partials/asset_picker.html' %} +
@@ -155,10 +207,23 @@ {% include 'partials/asset_buttons.html' %}
-
-
- + -{% include 'partials/confirm_delete.html' with object=object %} + {% include 'partials/confirm_delete.html' with object=object %} -{% endblock %} + {% endblock %} + +{% block js%} + +{%endblock%} diff --git a/assets/templates/asset_update.html b/assets/templates/asset_update.html index e73eee3a..286c740e 100644 --- a/assets/templates/asset_update.html +++ b/assets/templates/asset_update.html @@ -192,7 +192,7 @@
{% if edit or duplicate %}
- + {% include 'partials/asset_picker.html' %}
{% else%} diff --git a/assets/views.py b/assets/views.py index 4f441dcc..341a0e44 100644 --- a/assets/views.py +++ b/assets/views.py @@ -100,6 +100,7 @@ class AssetCreate(LoginRequiredMixin, CableFormMixin, generic.CreateView): context = super(AssetCreate, self).get_context_data(**kwargs) context["create"] = True + context["connectors"] = models.Connector.objects.all() return context def get_success_url(self):