<form class="edit-box"
      method="POST"
      enctype="multipart/form-data"
      action="?action=update"
      id="edit-form">
	<aside class="sidebar hidden_mobile" id="sidebar"><!-- TODO: i18n -->
		<fieldset><!-- TODO: make this thing work with radiobuttons that are generated automatically for all supported mimes -->
			<legend>{{index .Locale "edit/text mime type"}}</legend>
			<p>{{index .Locale "edit/text mime type/tip"}}
			<input type="text" name="text_mime" value="{{ .TextMime }}" id="text_mime"/>
		</fieldset>

		<fieldset>
			<legend>{{index .Locale "edit/revision comment"}}</legend>
			<p>{{index .Locale "edit/revision comment/tip"}}</p>
			<input type="text" name="comment" id="comment"
			       value='{{printf (index .Locale "edit/revision comment/old") .Name}}'/>
		</fieldset>

		<fieldset>
			<legend>{{index .Locale "edit/tags"}}</legend>
			<p>{{index .Locale "edit/tags/tip"}}</p>
			<input type="text" name="tags" value="{{ .Tags }}" id="tags"/>
		</fieldset>

		<fieldset>
			<legend>{{index .Locale "edit/upload file"}}</legend>
			<p>{{index .Locale "edit/upload file/tip"}}</p>
			<input type="file" name="binary" id="binary"/>
		</fieldset>

		<p>
			<input type="submit" value="update" form="edit-form"/>
			<a href="?">{{index .Locale "edit/cancel"}}</a>
		</p>
	</aside>	
	<main class="main">
		<h1 class="page__title">{{printf (index .Locale "edit/box/title") .Name}}</h1>
		<fieldset>
			<legend>{{index .Locale "edit/box"}}</legend>
			<textarea class="edit-box__text" name="text">{{ .Text }}</textarea>
		</fieldset>
	</main>
</form>

