web/views/edit_multiple.pt
author sylvain.thenault@logilab.fr
Mon, 09 Feb 2009 14:09:55 +0100
changeset 562 bdadb26c4a3c
parent 0 b97547f5f1fa
permissions -rw-r--r--
old .validators attribute is now .vid_validators

<!-- 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>