Commit 70da9fc3 authored by Sebastien Robin's avatar Sebastien Robin

- allow to have more parameters for the tales expression of width and height,

  usefull for listboxes


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24900 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 38922215
......@@ -34,6 +34,7 @@ from ProxyField import ProxyField
from MultiLinkField import MultiLinkFieldWidget
from AccessControl import ClassSecurityInfo
from DocumentTemplate.ustr import ustr
from DocumentTemplate.DT_Util import html_quote
from cgi import escape
import types
from zLOG import LOG
......@@ -376,7 +377,17 @@ TextAreaWidget.render_view = TextWidget_patched_render_view
original_TextAreaWidget_render = TextAreaWidget.render
def TextAreaWidget_render(self, field, key, value, REQUEST, render_prefix=None):
return original_TextAreaWidget_render(self, field, key, value, REQUEST)
width = field.get_value('width', REQUEST=REQUEST)
height = field.get_value('height', REQUEST=REQUEST)
return render_element("textarea",
name=key,
css_class=field.get_value('css_class'),
cols=width,
rows=height,
contents=html_quote(value),
extra=field.get_value('extra'))
TextAreaWidget.render = TextAreaWidget_render
class IntegerWidget(TextWidget) :
......
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