initial commit
This commit is contained in:
27
templates/recipe_form.html
Normal file
27
templates/recipe_form.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user