<form id="design_form" name="design-data" onsubmit="event.preventDefault()">
  <input type="hidden" id="design_id" value="{{id}}"/>
  <div class="edittiles">
    <div class="edittile"><label>Design Name:</label>&nbsp;&nbsp;&nbsp;<input type="text" id="title_txt" name="title" value="{{title}}" size="80"/></div>
    <div class="edittile"><input id="submit_design" type="submit" value="Save it!" /></div>
  </div>
<script type="text/javascript" src="/static/by.js"></script>
<div class="editarea">
  <textarea id="editor" rows="8" cols="90"></textarea>
</div>
<div class="edittiles">
  <div class="edittile">
    <label>Category</label><br>
    <div>
      <select id="category_sel" name="category">
        {{#categories}}
          <option value="{{name}}" {{{selected}}}>{{name}}</option>
        {{/categories}}
      </select>
    </div>
  </div>
  <div class="edittile taglist">
    <label>Tags</label><br>
    <div class="tags">
      <input class="tag_input" type="text" name="tags"
        value="{{#tags}}{{tag_name}},{{/tags}}"
        data-whitelist="{{#all_tags}}{{tag_name}},{{/all_tags}}"
      />
    </div>
  </div>
  <div class="edittile">
    <label>Delete</label><br>
    <div>
      <a href="/edit/delete/{{id_str}}/">Delete This Design</a>
    </div>
  </div>
</div>
<div class="imgbox">
  <div class="images">
    {{#photos}}
    <div class="image_edit">
      <img src="/static/photos/{{filename}}"/><br/>
      <a href="/edit/view-photo/{{filename}}">{{filename}}</a> &mdash;
      <a href="/edit/photo/{{filename}}?design_id={{id_str}}">Delete this image</a>
    </div>
    {{/photos}}
    <div class="image_edit add_image">
      <a href="/edit/photo/?id={{id}}"><h2>New Photo</h2></a>
    </div>
  </div>
</div>
</form>
