fixed problem with error on liststring widget
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-16 12:23:15) stable
|
Version 2.0.9 (2012-09-16 13:06:39) stable
|
||||||
|
|||||||
+3
-2
@@ -242,10 +242,11 @@ class ListWidget(StringWidget):
|
|||||||
requires = field.requires if isinstance(
|
requires = field.requires if isinstance(
|
||||||
field.requires, (IS_NOT_EMPTY, IS_LIST_OF)) else None
|
field.requires, (IS_NOT_EMPTY, IS_LIST_OF)) else None
|
||||||
attributes['_style'] = 'list-style:none'
|
attributes['_style'] = 'list-style:none'
|
||||||
|
nvalue = value or ['']
|
||||||
items = [LI(INPUT(_id=_id, _class=_class, _name=_name,
|
items = [LI(INPUT(_id=_id, _class=_class, _name=_name,
|
||||||
value=v, hideerror=k<len(value)-1,
|
value=v, hideerror=k<len(nvalue)-1,
|
||||||
requires=requires),
|
requires=requires),
|
||||||
**attributes) for (k,v) in enumerate(value or [''])]
|
**attributes) for (k,v) in enumerate(nvalue)]
|
||||||
script=SCRIPT("""
|
script=SCRIPT("""
|
||||||
// from http://refactormycode.com/codes/694-expanding-input-list-using-jquery
|
// from http://refactormycode.com/codes/694-expanding-input-list-using-jquery
|
||||||
(function(){
|
(function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user