{% extends 'core/base.html' %}
{% block title %}Add Grow Log{% endblock %}

{% block content %}
  <h2>Add Grow Log{% if plant %} for {{ plant.common_name.name }}{% endif %}</h2>
  <form method="POST">
    {{ form.hidden_tag() }}

    {# only show this when not pre-selecting via URL #}
    {% if not hide_plant_select %}
      <div class="mb-3">
        {{ form.plant_uuid.label(class="form-label") }}
        {{ form.plant_uuid(class="form-select") }}
      </div>
    {% else %}
      {{ form.plant_uuid(type="hidden") }}
    {% endif %}

    <div class="mb-3">
      {{ form.event_type.label(class="form-label") }}
      {{ form.event_type(class="form-select") }}
    </div>

    <div class="mb-3">
      {{ form.title.label(class="form-label") }}
      {{ form.title(class="form-control") }}
    </div>

    <div class="mb-3">
      {{ form.notes.label(class="form-label") }}
      {{ form.notes(class="form-control", rows=4) }}
    </div>

    <div class="mb-3 form-check">
      {{ form.is_public(class="form-check-input") }}
      {{ form.is_public.label(class="form-check-label") }}
    </div>

    <button type="submit" class="btn btn-primary">{{ form.submit.label.text }}</button>
  </form>
{% endblock %}
