<h1 tal:replace="structure here/manage_page_header|nothing">Header</h1>
<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
    tal:replace="structure here/manage_tabs">Tabs</h2>


<form method="POST" action=""
      tal:attributes="action string:${here/absolute_url}/manage_editMimeType;"
      tal:define="mt python:here.lookup(request.form.get('mt_name'))[0]">

  <div class="form-title">
    Edit mime type <b tal:content="mt/name"/>.
  </div>

  <div tal:define="status python:request.get('portal_status', '')"
       tal:condition="status"
       class="error"
       tal:content="status"
       />

  <input type="hidden" name="name" tal:attributes="value request/mt_name"/>

  <table width="50%">
    <tr>
      <td>Name</td>
      <td>
        <input name="new_name"
               tal:attributes="value python:request.get('new_name', mt.name());"/>
      </td>
      </tr><tr>
      <td>Icon path</td>
      <td>
        <input name="icon_path"
               tal:attributes="value python:request.get('icon_path', mt.icon_path);"/>
      </td>
      </tr><tr>
      <td>Binary?
      </td>
      <td>
        <input name="binary" type="checkbox"
               tal:attributes="checked python:request.get('binary', mt.binary) and 1 or 0;"/>
      </td>
      </tr><tr>
      <td>Mime-types
      </td>
      <td>
        <textarea name="mimetypes"
                  tal:content="python:request.get('mimetypes', '\n'.join(mt.mimetypes))"/>
      </td>
      </tr><tr>
      <td>Extensions
      </td>
      <td>
        <textarea name="extensions"
                  tal:content="python:request.get('extensions', '\n'.join(mt.extensions))"/>
      </td>
      </tr><tr>
      <td>Globs
      </td>
      <td>
        <textarea name="globs"
                  tal:content="python:request.get('globs', '\n'.join(mt.globs))"/>
      </td>
    </tr>
  </table>

  <input type="submit"/>
</form>

<tal:footer tal:replace="structure here/manage_page_footer|nothing">footer</tal:footer>
