[Erp5-report] r8689 - /erp5/trunk/products/ERP5Form/ListBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Jul 22 22:40:43 CEST 2006
Author: kevin
Date: Sat Jul 22 22:40:31 2006
New Revision: 8689
URL: http://svn.erp5.org?rev=8689&view=rev
Log:
Fix bug "Entering an editable field in listbox redirects to the url_method of this field" (#416).
Don't include error_message tag if no error.
Modified:
erp5/trunk/products/ERP5Form/ListBox.py
Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=8689&r1=8688&r2=8689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Sat Jul 22 22:40:31 2006
@@ -1835,6 +1835,7 @@
else:
processed_value = unicode(str(processed_value), self.renderer.getEncoding())
+ LOG(sql, 0, str((obj.getPath(),original_value, type(original_value))))
value_list.append((original_value, processed_value))
return value_list
@@ -1967,8 +1968,12 @@
if url is None:
html = cell_html + error_message
else:
- html = u'<a href="%s">%s</a> <span class="warning">%s</span>' % (url, cell_html, error_message)
-
+ if editable_field.get_value('editable'):
+ html = u'%s' % cell_html
+ else:
+ html = u'<a href="%s">%s</a>' % (url, cell_html)
+ if error_message not in ('', None):
+ html += u' <span class="warning">%s</span>' % error_message
else:
# If not editable, show a static text with a link, if enabled.
processed_value = cgi.escape(processed_value)
More information about the Erp5-report
mailing list