{% load widget_tweaks %}
{% csrf_token %}
<fieldset class="titleAndCategory">

	<legend>Product name &amp; category</legend>

	{{ form.name.errors }}
	<label for="id_name" class="">Title:</label>
	{{ form.name|add_class:"titleBox" }}

	{{ form.category.errors }}
	<label for="id_category" class="categoryLabel">Category:</label>
	{{ form.category }}

	{{ form.company.errors }}
	<label for="id_company" class="companyLabel">Company:</label>
	{{ form.company }}

</fieldset>

<fieldset>

	<legend>Product description</legend>

    {{ form.description.errors }}
    <label for="id_category" class="categoryLabel">Description (<span class="count">0</span>/400):</label>
    {{ form.description|add_class:'limited' }}

</fieldset>

<fieldset class="dimensions units">

	<legend>Product dimensions &amp; weight</legend>

	{{ form.width.errors }}
	<label for="id_width" class="">Width:</label>
	{{ form.width|add_class:'unitBox' }}

	{{ form.depth.errors }}
	<label for="id_depth" class="">Depth:</label>
	{{ form.depth|add_class:'unitBox' }}

	{{ form.height.errors }}
	<label for="id_height" class="">Height:</label>
	{{ form.height|add_class:'unitBox' }}

	{{ form.weight.errors }}
	<label for="id_weight" class="weightLabel">Weight:</label>
	{{ form.weight|add_class:'unitBox' }}

</fieldset>

<fieldset class="price units">

	<legend>Product price</legend>

	{{ form.price_gbp.errors }}
	<label for="id_price_gbp" class="">GBP:</label>
	{{ form.price_gbp|add_class:'unitBox' }}

	{{ form.price_eur.errors }}
	<label for="id_price_eur" class="">EUR:</label>
	{{ form.price_eur|add_class:'unitBox' }}

	{{ form.price_usd.errors }}
	<label for="id_price_usd" class="">USD:</label>
	{{ form.price_usd|add_class:'unitBox' }}


	{{ form.cost_purchase.errors }}
	<label for="id_cost_purchase" class="">Cost of Purchase<label>
	{{ form.cost_purchase|add_class:'unitBox' }}

	{{ form.cost_work.errors }}
	<label for="id_cost_work" class="">Cost of Work Done<label>
	{{ form.cost_work|add_class:'unitBox' }}

</fieldset>
<fieldset class="checkboxes">

	<legend>Featured &amp; sold</legend>

	{{ form.featured.errors }}
	{{ form.featured|add_class:'checkbox' }}
	<label for="id_featured" class="checkboxLabel">Feature this product on the homepage</label><br>
	{{ form.live.errors }}
	{{ form.live|add_class:'checkbox' }}
	<label for="id_live" class="checkboxLabel">Product is visible on site</label><br>

	{{ form.sold.errors }}
	{{ form.sold|add_class:'checkbox' }}
	<label for="id_sold" class="checkboxLabel">Mark this item as sold</label><br/>

	{{ form.sold_date.errors }}
	<label for="id_sold_date" class="checkboxLabel">Date item was sold</label>
	{{ form.sold_date|add_class:'datepicker' }}

</fieldset>