tallybill/templates/admin/product.html
2019-08-17 02:05:08 +02:00

70 lines
2.1 KiB
HTML

{% extends "main.html" %}
{% block content %}
<form id="delete_form" method="POST" style="display: none">
{% csrf_token %}
<input hidden name="delete"/>
</form>
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
Deleting Inventory
</div>
<div class="modal-body">
Do you really want to delete this Inventory? This cannot be undone.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button class="btn btn-danger" type="submit" form="delete_form">Delete</button>
</div>
</div>
</div>
</div>
<form id="product_form" method="POST">{% csrf_token %}
<h1>{{ obj.name }} </h1>
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>product_type</th>
</tr>
</thead>
<tbody>
<tr class="calcfor">
<td class="name">
<input name="name" value="{{ obj.name }}"/>
</td>
<td>
<select name="product_type">
{% for t in product_types %}
<option {% if t.pk == obj.product_type %}selected{% endif %} value="{{ t.id }}">{{ t.name }}</option>
{% endfor %}
</select>
</td>
</tr>
</tbody>
</table>
</form>
<table style="width: 100%;">
<tr>
<td>
<button class="btn btn-default" data-toggle="modal" data-target="#confirm-delete">
Delete
</button>
</td>
<td style="text-align: right">
<button style="margin-bottom: 10px" class="btn btn-primary" type="submit" form="product_form">Save</button>
</td>
</tr>
{% endblock %}