web/views/edit_multiple.pt
author Sylvain Thenault <sylvain.thenault@logilab.fr>
Mon, 22 Dec 2008 12:53:08 +0100
changeset 249 5ab64969df20
parent 0 b97547f5f1fa
permissions -rw-r--r--
define an actual download box, keeping download_box function for bw compat

<!-- rows are precomputed first to consume error messages if necessary -->
<form method="post" id="entityForm" onsubmit="return validateForm('entityForm', null);"
      action="%(action)s"
      tal:define="rows python:[self.edit_form(e) for e in rset.entities()]"
      >
  <div tal:replace="structure self/error_message"/>
  <div id="progress" tal:content="progress">validating changes...</div>
  <fieldset>
  <input type="hidden" name="__errorurl" value="#"
         tal:attributes="value req/url;" />
  <input type="hidden" name="__form_id" value="#"
	 tal:attributes="value python:self.id"/>
  <input type="hidden" name="__redirectvid" value="primary"
	 tal:attributes="value python:req.form.get('__redirectvid', 'list');"/>
  <input type="hidden" name="__redirectrql" value="#"
	 tal:attributes="value python:req.form.get('__redirectrql', rset.printable_rql());"/>
  <table class="listing">
    <tr class="header">
      <th align="left"><input type="checkbox" onclick="setCheckboxesState('eid', this.checked)" value="" title="toggle check boxes" /></th>
      <tal:th tal:iter="rdef python:sampleentity.relations_by_category('primary', 'add')">
	<th tal:condition="python: rdef[0].type != 'eid'"
            tal:content="python: rdef[0].display_name(req, rdef[-1])"/>
      </tal:th>
    </tr>
    <tr tal:iter="row rows" tal:attributes="class python: repeat['row'].getOdd() and 'even' or 'odd'" tal:content="structure row"/>
  </table>
  <table width="100%%">
    <tr>
      <td align="left">
	<input class="validateButton" type="submit"  value="#"
	       tal:attributes="value okbuttonmsg; title okbuttontitle;"/>
	<input class="validateButton" type="reset" name="__action_cancel" value="#"
	       tal:attributes="value  cancelbuttonmsg; title cancelbuttontitle;"/>
      </td>
    </tr>
  </table>
  </fieldset>
</form>