69 lines
No EOL
2 KiB
HTML
69 lines
No EOL
2 KiB
HTML
{% extends "base_with_list.html" %}
|
|
|
|
{% macro is_difficulty(diff) %}
|
|
{% if recipe.difficulty == diff %}
|
|
selected
|
|
{% endif %}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="content" id="recipe-edit">
|
|
<label for="input-title">Title</label>
|
|
<input
|
|
id="input-title"
|
|
type="text"
|
|
name="title"
|
|
value="{{ recipe.title }}"
|
|
autocomplete="title"
|
|
autofocus="true" />
|
|
|
|
<label for="input-description">Description</label>
|
|
<input
|
|
id="input-description"
|
|
type="text"
|
|
name="description"
|
|
value="{{ recipe.description }}"
|
|
autocomplete="title" />
|
|
|
|
<label for="input-description">Estimated time</label>
|
|
<input
|
|
id="input-estimated-time"
|
|
type="number"
|
|
name="estimated-time"
|
|
value="
|
|
{% match recipe.estimated_time %}
|
|
{% when Some with (t) %}
|
|
{{ t }}
|
|
{% when None %}
|
|
0
|
|
{% endmatch %}"
|
|
autocomplete="title" />
|
|
|
|
<label for="select-difficulty">Difficulty</label>
|
|
<select id="select-difficulty" name="difficulty">
|
|
<option value="0" {%+ call is_difficulty(crate::data::model::Difficulty::Unknown) %}> - </option>
|
|
<option value="1" {%+ call is_difficulty(crate::data::model::Difficulty::Easy) %}>Easy</option>
|
|
<option value="2" {%+ call is_difficulty(crate::data::model::Difficulty::Medium) %}>Medium</option>
|
|
<option value="3" {%+ call is_difficulty(crate::data::model::Difficulty::Hard) %}>Hard</option>
|
|
</select>
|
|
|
|
<label for="select-language">Language</label>
|
|
<select id="select-language" name="language">
|
|
{% for lang in languages %}
|
|
<option value="{{ lang.1 }}">{{ lang.0 }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<input
|
|
id="input-is-published"
|
|
type="checkbox"
|
|
name="is-published"
|
|
value="{{ recipe.is_published }}" />
|
|
<label for="input-is-published">Is published</label>
|
|
|
|
<div id="groups-container">
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |