Commit 21c0a52b authored by Kristian Tan's avatar Kristian Tan

Moved forms

parent 8c19b3cb
...@@ -30,6 +30,23 @@ ...@@ -30,6 +30,23 @@
{% endfor %} {% endfor %}
<p><a href="/devices/add_device">Add device</a></p> <p><a href="/devices/add_device">Add device</a></p>
{% if display_change_kWh == True %}
<form action="{{ url_for('handle_change_kWh') }}" method="post">
Change cost per kWh: <input type="text" name="kWhprice" required>
<input type="submit">
</form>
{% endif %}
{% if display_new_device_form == True %}
<div class=".add_new_device_form">
<form action="{{ url_for('handle_new_device') }}" method="post">
New device name: <input type="text" name="new_device_name" required> <br>
New device wattage: <input type="number" name="new_device_wattage" required> <br>
<input type="submit">
</form>
</div>
{% endif %}
</div> </div>
<div class="smart_meter"> <div class="smart_meter">
...@@ -94,22 +111,22 @@ ...@@ -94,22 +111,22 @@
</div> </div>
</div> </div>
<div class="inputs"> <div class="inputs">
{% if display_change_kWh == True %} {# {% if display_change_kWh == True %}#}
<form action="{{ url_for('handle_change_kWh') }}" method="post"> {# <form action="{{ url_for('handle_change_kWh') }}" method="post">#}
Change cost per kWh: <input type="text" name="kWhprice" required> {# Change cost per kWh: <input type="text" name="kWhprice" required>#}
<input type="submit"> {# <input type="submit">#}
</form> {# </form>#}
{% endif %} {# {% endif %}#}
{##}
{% if display_new_device_form == True %} {# {% if display_new_device_form == True %}#}
<div class=".add_new_device_form"> {# <div class=".add_new_device_form">#}
<form action="{{ url_for('handle_new_device') }}" method="post"> {# <form action="{{ url_for('handle_new_device') }}" method="post">#}
New device name: <input type="text" name="new_device_name" required> <br> {# New device name: <input type="text" name="new_device_name" required> <br>#}
New device wattage: <input type="number" name="new_device_wattage" required> <br> {# New device wattage: <input type="number" name="new_device_wattage" required> <br>#}
<input type="submit"> {# <input type="submit">#}
</form> {# </form>#}
</div> {# </div>#}
{% endif %} {# {% endif %}#}
</div> </div>
</body> </body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment