web/views/edit_attributes.pt
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 24 Jul 2012 10:16:25 +0200
changeset 8493 25da1e5c7c50
parent 0 b97547f5f1fa
permissions -rw-r--r--
[entity/hooks] fix regression introduced by 4ba11607d84a on create_entity, attributes weren't cached, but they are since 4ba11607d84a and this triggered a bug: used values may be transformed by hooks (e.g. TidyHtmlFields), ending in invalid value in the cache. This is the regression. Now, set_attributes used to update the attributes cache while suffering from the very same pb. This is the now fixed old bug. Transformed attributes are now recorded in a transaction shared variable, and those are omitted from the client cache.

  <table class="attributeForm" style="width:100%;"
	 tal:attributes="id tab_id | nothing;
			 class tab_class | nothing;">
    <tr tal:iter="widget lines">
      <th class="labelCol" tal:content="structure python:widget.render_label(entity)">attrname</th>
      <td tal:define="error python:widget.render_error(entity)" style="width:100%;"
          tal:attributes="class python:error and 'error' or nothing">
	<div tal:replace="structure error">error message if any</div>
	<div tal:replace="structure python:widget.edit_render(entity)" >widget (input, textarea, etc.)</div>
	<div tal:replace="structure python:widget.render_help(entity)">format help if any</div>
      </td>
    </tr>
  </table>