Discussion:
[Erp5-dev] patch for xhtml - mark changed fields
bartek
2007-03-29 11:57:31 UTC
Permalink
Hi

This is a proposed patch for erp5_xhtml/field_render - it highlights
changed fields, so that the user is aware that the form contains unsaved
changes.

Would that be ok? (yes, the color should be in css, but apart from that?).

Bartek

Index: field_render.xml
===================================================================
--- field_render.xml (wersja 13116)
+++ field_render.xml (kopia robocza)
@@ -89,7 +89,9 @@
<div tal:define="html_render python: field.render_htmlgrid(value,
request)"\n
tal:attributes="title field_description;\n
class python: \' \'.join([x for x in
[\'field\', field.is_required() and \'required\' or None,
field_has_error and \'error\' or None, field.get_value(\'css_class\') or
None] if x is not None])"\n
- i18n:attributes="title" i18n:domain="ui">\n
+ i18n:attributes="title" i18n:domain="ui"\n
+ onchange="event.target.style.backgroundColor=\'yellow\';"\n
+ >\n
<tal:block tal:repeat="html_tuple html_render">\n
<label>\n
<tal:block tal:content="structure python: html_tuple[0]"\n

Loading...