start component parameter formset
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% load qr_code %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
@@ -72,6 +73,34 @@
|
||||
No description available
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h2>Parameters</h2>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<th scope="col">Parameter</th>
|
||||
<th scope="col">Value</th>
|
||||
<th scope="col">Unit</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for f in param_formset %}
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" name="{{f.parameter_type.name}}" value="{{f.parameter_type.value}}"></td>
|
||||
<td><input type="text" class="form-control" name="{{f.value.name}}" value="{{f.value.value}}"></td>
|
||||
<td>{{f.parameter_type_object.unit}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="submit" class="btn btn-primary" name="submit-edit-params" value="Save Parameters">
|
||||
</form>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h2>Stocks</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user