WMGZON/templates/new_product.html

37 lines
1.5 KiB
HTML

<link rel="stylesheet" href="{{ url_for('static', filename='css/forms.css') }}" />
<div id="form-wrapper">
<h2>Create New Product</h2>
<form class="input-form" method="POST" action="{{ url_for('main.seller.add') }}" enctype="multipart/form-data">
<div class="form-row">
<input type="text" id="name" name="name" placeholder="Product Name" required>
<input type="file" id="image" name="image" accept="image/x" required>
</div>
<div class="form-row">
<textarea id="description" name="description" placeholder="Product Description" required></textarea>
</div>
<div class="form-row">
<select name="category" id="category">
{% for category in categories %}
<option value="{{category.id}}">{{category.name}}</option>
{% endfor %}
</select>
</div>
<div class="form-row">
<input type="number" id="cost" name="cost" placeholder="Cost" min=0 step=0.01 required>
<input type="number" id="quantity" name="quantity" placeholder="Quantity Available" min=0 required>
</div>
<div class="form-row">
<input type="submit" id="Create Product" value="Create Product">
</div>
</form>
<div id="form-footer">
<p>Want to view all of your products? <a href="{{ url_for('main.seller.display_own') }}">Click Here</a><p>
</div>
</div>