+{% extends 'base.html' %}
+{% block css %}
+textarea.booking { width: 100%; }
+div.savers { float: right; }
+input[type=number] { text-align: right; font-family: monospace; }
+div.edit_mode_switch { width: 8em; margin-right: 0.5em; border-right: 1px solid #888888; float: left; }
+{% endblock %}
+{% block content %}
+{% if error_msg %}{{error_msg}}{% endif %}
+<form method="POST" action="edit?i={{index}}">
+<div class="savers">
+{% if adding %}
+<input type="submit" name="add" value="add" />
+{% else %}
+<input type="submit" name="update" value="UPDATE (not add!!)" />
+{% endif %}
+</div>
+<div>
+<div class="edit_mode_switch">
+{% if edit_mode == 'textarea' %}
+<input type="submit" name="table" value="as table" />
+{% else %}
+<input type="submit" name="textarea" value="as textarea" />
+{% endif %}
+</div>
+<input type="submit" name="check" value="check" />
+<input type="submit" name="mirror" value="mirror" />
+<input type="submit" name="fill_sink" value="fill sink" />
+<input type="submit" name="add_taxes" value="add taxes" />
+<input name="replace_from" />
+<input type="submit" name="replace" value="-> replace ->" />
+<input name="replace_to" />
+</div>
+{% if edit_mode == 'textarea' %}
+<textarea class="booking" name="booking" rows=100>{% for line in content %}{{ line|e }}{% if not loop.last %}
+{% endif %}{% endfor %}</textarea>
+{% else %}
+<input name="date" value="{{content.date}}" size=9 />
+<input name="description" value="{{content.description|e}}" />
+; <textarea name="top_comment" rows=1 cols={{content.comment_cols}}>{{content.top_comment|e}}</textarea>
+<br />
+{% for line in content.transfer_lines %}
+<input name="account" value="{{line.account|e}}" size=40 list="accounts" autocomplete="off" />
+<input name="amount" value="{{line.amount}}" type="number" step=0.01 size=10 />
+<input name="currency" value="{{line.currency|e}}" size=3 />
+; <textarea rows=1 cols={{line.comment_cols}} name="comment">{{line.comment|e}}</textarea><br />
+{% endfor %}
+{% for i in range(10) %}
+<input name="account" value="" size=40 list="accounts" autocomplete="off" />
+<input name="amount" value="" type="number" type="number" step=0.01 size=10 />
+<input name="currency" value="€" size=3 />
+; <textarea name="comment" rows=1 ></textarea><br />
+{% endfor %}
+<datalist id="accounts">
+{% for acc in accounts %}
+<option value="{{acc|e}}">{{acc|e}}</option>
+{% endfor %}
+</datalist>
+{% endif %}
+<input type="hidden" name="index" value="{{index}}" />
+<input type="hidden" name="edit_mode" value="{{edit_mode}}" />
+</form>
+{% endblock %}
+