bookie-python/templates/form.html
2014-10-24 18:34:28 -04:00

39 lines
No EOL
2.1 KiB
HTML

{% extends "layout.html" %}
{% block title %} | New Bookmark{% endblock %}
{% block body %}
<div class="form new">
<h3>Add/Update Bookmark</h3>
{% if action == "/edit" %}
<a href="/{{b.short}}/details">{{b.short}} info</a>
{% endif %}
<form action="{{action}}" method="POST" enctype="multipart/form-data">
<p><label for="title">Title</label><br/>
<input type="text" name="title" class="text" value="{%if b%}{{b.title}}{%endif%}"/></p>
<p><label for="note">Note</label><br/>
<textarea name="note" class="textarea">{%if b%}{{b.note}}{%endif%}</textarea></p>
<p><label for="tags">Tags</label><br/>
<input type="text" name="tags" class="text" value="{%if b%}{%for t in b.tags%}{{t.name}} {%endfor%}{%endif%}"/></p>
<p><label for="image">Embed as image?</label>
<input type="checkbox" name="image_embed" class="checkbox" {%if b%}{%if b.image_embed%}checked="checked"{%endif%}{%endif%}"/></p>
<p><label for="archive">Archive page (text)?</label>
<input type="checkbox" name="archive_text_needed" class="checkbox" {%if b%}{%if b.archive_text_needed%}checked="checked"{%endif%}{%endif%}/></p>
<p><label for="archive">Archive page (image)?</label>
<input type="checkbox" name="archive_image_needed" class="checkbox" {%if b%}{%if b.archive_image_needed%}checked="checked"{%endif%}{%endif%}/></p>
<p><label for="unread">Mark as unread?</label>
<input type="checkbox" name="unread" class="checkbox" {%if b%}{%if b.unread%}checked="checked"{%endif%}{%endif%}/></p>
<hr/>
<p><label for="url">Bookmark URL</label><br/>
<input type="text" name="url" class="text" value="{%if b%}{{b.url}}{%endif%}"/></p>
<p><input type="submit" name="linker" value="Link" class="button"/></p>
<hr/>
<p><label for="upload">Upload File</label><br/>
<input type="file" name="file_upload" class="file"/><p>
<p><input type="submit" name="uploader" value="Upload" class="button"/></p>
</form>
</div>
{% endblock %}