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

<p>This is an experimental mechanism for updating your existing objects when
you update an Archetypes class's schema.  It rebuilds all your objects using
a simple migration mechanism: it gathers all your object's values using the
existing field accessors, updates the schema, re-initializes the object, and
finally resets the values using the new field mutators.  It should be fairly
smart about detecting schema changes in your objects.  Use at your own risk.
</p>

<form method="PUT" action="manage_updateSchema">

  <b>Update the following classes:</b>
  <table border="0">
    <tr tal:repeat="klass python:here.getChangedSchema()">
      <td>
        <input type="checkbox" 
               tal:attributes="name python:klass[0];
                               checked python:klass[1];" />
        <span tal:replace="python:klass[0]" />
      </td>
    </tr>
  </table>

  <p>Update 
  <select name="update_all:int">
    <option value="0">Objects with old schemas</option>
    <option value="1">All objects</option>
  </select></p>

   <input type="submit" name="submit" value="Update schema"/>
</form>
    
<tal:footer tal:replace="structure here/manage_page_footer|nothing">footer</tal:footer>
