Commit 181f58cb authored by Jean-Paul Smets's avatar Jean-Paul Smets

I added a css class (editable or viewable) to fieldsets generated for...

I added a css class (editable or viewable) to fieldsets generated for form_render because it is necessary to make a distinction between forms in readonly mode (Web) and forms in editable mode (Web & ERP5). Otherwise, the current solution consists of using a different CSS in both cases which is not convenient and not so efficient to reduce the CSS cache size. Thanks to this change, it is possible to code the CSS of web sites both in ediatble mode and viewable mode inside the same CSS. Performance impact must be checked..

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25750 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab0f9b4e
......@@ -79,8 +79,9 @@ It is possible to specify a group id and a group title by naming a group followi
<tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid;">\n
<fieldset tal:condition="python: gid.find(\'hidden\') &lt; 0"\n
tal:attributes="class gid;\n
id python: \'fieldset_%s\' % (gid.replace(\' \', \'_\'), );">\n
tal:attributes="class python:gid + \n
(\' editable\' * request.get(\'editable_mode\', 0) or \' viewable\');\n
id python: \'fieldset_%s\' % (gid.replace(\' \', \'_\'), );">\n
<legend i18n:translate="" i18n:domain="ui" tal:condition="group/gtitle" tal:content="group/gtitle" class="group_title"></legend>\n
<tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n
<tal:block metal:use-macro="field_render" />\n
......
648
\ No newline at end of file
651
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment