mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
cleand up new views
This commit is contained in:
@@ -53,8 +53,8 @@
|
||||
{% trans 'New' %}
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item" href="{% url 'new_recipe' %}"><i
|
||||
class="fas fa-book"></i> {% trans 'Recipe' %}</a>
|
||||
<!--<a class="dropdown-item" href="{% url 'new_recipe' %}"><i
|
||||
class="fas fa-book"></i> {% trans 'Recipe' %}</a>-->
|
||||
<a class="dropdown-item" href="{% url 'new_category' %}"><i
|
||||
class="fas fa-archive"></i> {% trans 'Category' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'new_keyword' %}"><i
|
||||
|
||||
25
cookbook/templates/generic/new_template.html
Normal file
25
cookbook/templates/generic/new_template.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{% trans 'New' %} - {{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>{% trans 'New' %} {{ title }}</h3>
|
||||
|
||||
<form action="." method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<input type="submit" value="Submit" class="btn btn-success">
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
//converts multiselct in recipe edit to searchable multiselect
|
||||
//shitty solution that needs to be redone at some point
|
||||
$(document).ready(function () {
|
||||
$('#id_keywords').select2();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user