Skip to content

Improvement of form Add Pantry Item #293

Closed

Description

@pp140466

cookcli 0.27.1

In cook server mode on page Pantry, form Add Pantry Item the Section selector offers only the default list of sections even if pantry.conf file has been edited.

This could be imporved by a small change in cookcli\templates\pantry.html in <form id="add-form"> line 168

replace

                <select id="add-section" class="w-full px-3 py-2 border rounded-lg dark:bg-gray-700 dark:border-gray-600" required>
                    <option value="">{{ tr.t("pantry-section-select") }}</option>
                    <option value="freezer">{{ tr.t("pantry-section-freezer") }}</option>
                    <option value="fridge">{{ tr.t("pantry-section-fridge") }}</option>
                    <option value="pantry">{{ tr.t("pantry-section-pantry") }}</option>
                    <option value="spices">{{ tr.t("pantry-section-spices") }}</option>
                    <option value="other">{{ tr.t("pantry-section-other") }}</option>
                </select>

by

                <select id="add-section" class="w-full px-3 py-2 border rounded-lg dark:bg-gray-700 dark:border-gray-600" required>
                    <option value="">{{ tr.t("pantry-section-select") }}</option>
					{% if sections.is_empty() %}
						<option value="freezer">{{ tr.t("pantry-section-freezer") }}</option>
						<option value="fridge">{{ tr.t("pantry-section-fridge") }}</option>
						<option value="pantry">{{ tr.t("pantry-section-pantry") }}</option>
						<option value="spices">{{ tr.t("pantry-section-spices") }}</option>
						<option value="other">{{ tr.t("pantry-section-other") }}</option>
					{% else %}
						{% for section in sections %}
							<option value="{{ section.name }}">{{ section.name }}</option>
						{% endfor %}
					{% endif %}
                </select>

Activity

  1. added a commit that references this issue on Apr 2, 2026
    08233b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions