Commit 17d17c67 authored by Kristian Tan's avatar Kristian Tan

Made form fields required

parent 8467fad4
...@@ -51,15 +51,15 @@ ...@@ -51,15 +51,15 @@
{% 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"> Change cost per kWh: <input type="text" name="kWhprice">
<input type="submit"> <input type="submit" required>
</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"> <br> New device name: <input type="text" name="new_device_name" required> <br>
New device wattage: <input type="number" name="new_device_wattage"> <br> New device wattage: <input type="number" name="new_device_wattage" required> <br>
<input type="submit"> <input type="submit">
</form> </form>
</div> </div>
......
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