Switched from sqlite to mysql database. Moved feeding frequency to the settings table. Got the alert checkboxes working correctly. Started to add update feed method and button to site.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Hydro</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="/static/scripts.js"></script>
|
||||
<div>Hydro: <a href="index.html">home</a></div>
|
||||
<br>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
|
||||
@@ -1,38 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<body>
|
||||
<h1>Information</h1>
|
||||
<form method="post">
|
||||
<label>Plant Date</label>
|
||||
<input type="date" name="plantDate"
|
||||
value= {{ plant.plant }}>
|
||||
<input type="date" name="plantDate" value= {{ plant.plant }}>
|
||||
<br>
|
||||
<label>Last Feed Date</label>
|
||||
<input type="date" name="lastDate"
|
||||
value= {{ plant.last }}>
|
||||
<input type="date" name="lastDate" value= {{ plant.last }}>
|
||||
<br>
|
||||
<label>Next Feed Date</label>
|
||||
<input type="date" name="nextDate"
|
||||
value= {{ plant.next }}>
|
||||
<input type="date" name="nextDate" value= {{ plant.next }}>
|
||||
<br>
|
||||
Feed Frequency: {{ plant.freq }} days
|
||||
<br>
|
||||
<button type="submit">Update</button>
|
||||
<br>
|
||||
<h1>Alerts</h1>
|
||||
<input type="checkbox" id="alert_text" name="AlertText" value={{ alerts.text }} {{ "checked" if alerts.text else "" }}>
|
||||
<label for="alert_text">Text Message</label>
|
||||
<input type="checkbox" id="alert_email" name="AlertEmail" value={{ alerts.email }} {{ "checked" if alerts.email else "" }}>
|
||||
<label for="alert_email">Email</label><br>
|
||||
<input type="submit" id="DateSubmitForm" name="DateSubmitForm" value="Save">
|
||||
</form>
|
||||
<button class=button onclick="updateFeed()">Update Feed</button>
|
||||
|
||||
<h1>Alerts</h1>
|
||||
<div>
|
||||
<form method="post">
|
||||
<input type="checkbox" id="alert_text" name="AlertText" value=alerts.text {{ "checked" if alerts.text else "" }}>
|
||||
<label for="alert_text">Text Message</label>
|
||||
<input type="checkbox" id="alert_email" name="AlertEmail" value=alerts.email {{ "checked" if alerts.email else "" }}>
|
||||
<label for="alert_email">Email</label><br>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<br><br>
|
||||
<div>
|
||||
<button class=button onclick="updateFeed()">Update Feed</button>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user