{% load thumbnail %}
{% load pin_tags %}

<form method="post" action="{% url pin-item-edit post.id%}" data-async class="form-horizontal" action="" id="pin_form-edit" >
{% csrf_token%}
	
      	{{ form.errors}}
        
		
		{% thumbnail post.image "110" upscale=False as im %}
		<div class="img-block" style="float:left;">
			<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
		</div>
		{% endthumbnail %}
		<input type="hidden" value="{{post.image}}" id="image_field" name="image" />
			<textarea id="id_text" rows="5" cols="40" name="text">{{form.text.value}}</textarea><br><br>
		
			<input type="text" name="url" value="{{form.url.value}}" placeholder="URL" class="span3 ltr">
	        <br><br>
	        <p class="text-info">برچسب ها را با enter از یکدیگر جدا کنید</p>
	        <textarea id="textareaEdit" name="tags" rows="1"></textarea>
<div class="form-actions">
	<input type="submit" class="btn btn-primary" value="ذخیره" />
</div>
</form>
<script type="text/javascript">
$('#textareaEdit').textext({ plugins: 'tags',
	tagsItems: [{% for tag in post.tags.all %} '{{tag.name}}', {% endfor%}] });


</script>
