mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
forms
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{% load staticfiles %}
|
||||
{% load i18n %}
|
||||
|
||||
<html>
|
||||
<head>
|
||||
@@ -19,7 +20,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<a class="navbar-brand" href="{% url 'index' %}">Kochbuch</a>
|
||||
<!--<a class="navbar-brand" href="{% url 'index' %}">{% trans 'Cookbook' %}</a>-->
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText"
|
||||
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@@ -27,16 +28,16 @@
|
||||
<div class="collapse navbar-collapse" id="navbarText">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="{% url 'index' %}">Rezepte <span class="sr-only">(current)</span></a>
|
||||
<a class="nav-link" href="{% url 'index' %}">{% trans 'Cookbook' %}<span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'new_recipe' %}">Neues Rezept</a>
|
||||
<a class="nav-link" href="{% url 'new_recipe' %}">{% trans 'New Recipe' %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'new_category' %}">Neue Kategorie</a>
|
||||
<a class="nav-link" href="{% url 'new_category' %}">{% trans 'New Category' %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'new_keyword' %}">Neues Tag</a>
|
||||
<a class="nav-link" href="{% url 'new_keyword' %}">{% trans 'New Keyword' %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="navbar-text">
|
||||
|
||||
@@ -13,15 +13,14 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="" method="get">
|
||||
{% crispy filter.form %}
|
||||
<input type="submit"/>
|
||||
{{ filter.form|crispy }}
|
||||
<input class="btn btn-primary" type="submit"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<br/>
|
||||
|
||||
|
||||
{% if recipes %}
|
||||
{% render_table recipes %}
|
||||
{% else %}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}Neue Kategorie{% endblock %}
|
||||
{% block title %}{% trans 'New Category' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
Neue Kategorie
|
||||
<small class="text-muted">Neue Kategorie für ein Rezept</small>
|
||||
{% trans 'New Category' %}
|
||||
<small class="text-muted">{% trans 'New recipe Category' %}</small>
|
||||
</h3>
|
||||
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="save btn btn-default">Save</button>
|
||||
{% crispy form %}
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,9 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'New Keyword' %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
{% trans 'New Keyword' %}
|
||||
<small class="text-muted">{% trans 'New recipe Keyword' %}</small>
|
||||
</h3>
|
||||
|
||||
<form method="POST" class="post-form">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit" class="save btn btn-default">Save</button>
|
||||
</form>
|
||||
{% crispy form %}
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user