28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="col-md-8 offset-md-2">
|
|
<h2 class="mb-4">{% if recipe %}Edit{% else %}Add New{% endif %} Recipe</h2>
|
|
<form method="POST">
|
|
<div class="mb-3">
|
|
<label for="title" class="form-label">Title</label>
|
|
<input type="text" class="form-control" id="title" name="title" required value="{{ recipe.title if recipe }}">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="ingredients" class="form-label">Ingredients (one per line)</label>
|
|
<textarea class="form-control" id="ingredients" name="ingredients" rows="5" required>{{ recipe.ingredients if recipe }}</textarea>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="instructions" class="form-label">Instructions (one step per line)</label>
|
|
<textarea class="form-control" id="instructions" name="instructions" rows="8" required>{{ recipe.instructions if recipe }}</textarea>
|
|
</div>
|
|
<div class="mb-3">
|
|
<button type="submit" class="btn btn-primary">Save Recipe</button>
|
|
<a href="{{ url_for('admin') }}" class="btn btn-secondary">Cancel</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|