Closed paul121 closed 4 years ago
@paul121 and I discussed this and the decision was to drop the logic that is currently automatically setting the "done" status from the PHP submit function, and instead add a simple JS behavior to the page that will automatically check/uncheck the "done" box based on the date field.
This should ONLY happen when creating a NEW planting, IMO, and the user should be able to easily override that. Changes to existing logs should be fully manual.
I added a JS behavior that automatically checks the "Completed" checkbox when the date field is changed: 266d1e3d53216cc6badfa1a660cb2341210817b3
I've added a checkbox for existing Seeding and Transplanting logs that displays the "done" status of the log. When saving the log, if the checkbox value has changed then the log will be updated with the new status
....UNLESS the log
timestamp
is changed, in this case the form submit function "automatically" sets the log status based on the date being past or future.I made this so the checkbox is only displayed if there is an existing log for the planting - when adding a planting from scratch, or just adding a new seeding/transplanting log, there is no checkbox.