Tagging using JS using Partials
This commit is contained in:
@@ -38,45 +38,10 @@
|
||||
</div>
|
||||
|
||||
<section class="LP-Section">
|
||||
<!--
|
||||
<input name='basic' value='tag1, tag2'>
|
||||
<script>
|
||||
// The DOM element you wish to replace with Tagify
|
||||
var input = document.querySelector('input[name=basic]');
|
||||
|
||||
// initialize Tagify on the above input node reference
|
||||
new Tagify(input, {
|
||||
'whitelist': ['wurstwasser']
|
||||
})
|
||||
</script>-->
|
||||
{% url 'place_tag_submit' place_id=place.id as tag_submit_url%}
|
||||
{% include 'partials/tagging.html' with tag_list=place.tags.all url=tag_submit_url input_field=tagging_form.tag_list%}
|
||||
|
||||
<div class="LP-TagList">
|
||||
<ul class="LP-TagList__List">
|
||||
{% for tag in place.tags.all %}
|
||||
<li class="LP-TagList__Item">
|
||||
<div class="LP-Tag">
|
||||
<p class="LP-Paragraph">{{tag}}</p>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<form class="LP-Form LP-Form--inline" method="POST" action="{% url 'place_tag_submit' place_id=place.id %}">
|
||||
<fieldset class="LP-Form__Fieldset">
|
||||
<legend class="LP-Form__Legend">Tags hinzufügen</legend>
|
||||
{% csrf_token %}
|
||||
<div class="LP-Form__Composition LP-Form__Composition--breakable">
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=tagging_form.tag_list %}
|
||||
</div>
|
||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
||||
<button class="LP-Button">hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
|
Reference in New Issue
Block a user