cleand up new views

This commit is contained in:
vabene1111
2018-05-03 20:54:27 +02:00
parent e722863093
commit 05dc3924c4
5 changed files with 61 additions and 99 deletions

View File

@@ -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

View 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 %}