From 6d89bca033de2e708daeab60792d41ee289d53c0 Mon Sep 17 00:00:00 2001 From: reverend Date: Wed, 2 Sep 2020 00:08:00 +0200 Subject: [PATCH] Deletion of tags --- lostplaces/lostplaces_app/forms.py | 6 +++++- lostplaces/lostplaces_app/static/main.css | 3 ++- .../templates/partials/tagging.html | 19 +++++++++++++++---- .../templates/place/place_detail.html | 2 +- lostplaces/lostplaces_app/urls.py | 4 +++- .../lostplaces_app/views/place_views.py | 9 +++++++-- lostplaces/lostplaces_app/views/views.py | 13 ++++++++++++- 7 files changed, 45 insertions(+), 11 deletions(-) diff --git a/lostplaces/lostplaces_app/forms.py b/lostplaces/lostplaces_app/forms.py index 6ac307a..9b97388 100644 --- a/lostplaces/lostplaces_app/forms.py +++ b/lostplaces/lostplaces_app/forms.py @@ -51,4 +51,8 @@ class PlaceImageCreateForm(forms.ModelForm): class TagSubmitForm(forms.Form): - tag_list = forms.CharField(max_length=500, required=False) \ No newline at end of file + tag_list = forms.CharField( + max_length=500, + required=False, + widget=forms.TextInput(attrs={'autocomplete':'off'}) + ) \ No newline at end of file diff --git a/lostplaces/lostplaces_app/static/main.css b/lostplaces/lostplaces_app/static/main.css index 8489e0c..fef1375 100644 --- a/lostplaces/lostplaces_app/static/main.css +++ b/lostplaces/lostplaces_app/static/main.css @@ -1472,7 +1472,8 @@ body { line-height: inherit; position: relative; white-space: pre-wrap; - margin-left: 15px; } + margin-left: 15px; + height: 1em; } .tagify__tag__removeBtn { order: 5; diff --git a/lostplaces/lostplaces_app/templates/partials/tagging.html b/lostplaces/lostplaces_app/templates/partials/tagging.html index d9db359..38a274e 100644 --- a/lostplaces/lostplaces_app/templates/partials/tagging.html +++ b/lostplaces/lostplaces_app/templates/partials/tagging.html @@ -3,14 +3,25 @@ {% for tag in tag_list %}
  • -

    {{tag}}

    + + + {{tag}} + + + + + + + + +
  • {% endfor %} -
    +
    Tags hinzufügen {% csrf_token %} @@ -19,14 +30,14 @@
    - {% include 'partials/form/inputField.html' with field=input_field classes="LP-Input--tagging" %} + {% include 'partials/form/inputField.html' with field=config.submit_form.tag_list classes="LP-Input--tagging" %}