fixed issue 728, bug in languages, thanks pgergo
This commit is contained in:
+7
-6
@@ -571,7 +571,7 @@ class AutocompleteWidget(object):
|
||||
if self.is_reference:
|
||||
id_field = self.fields[1]
|
||||
if self.help_fields:
|
||||
options = [OPTION(self.help_string % dict([(h.name,s[h.name]) for h in self.fields[:1]+self.help_fields]),
|
||||
options = [OPTION(self.help_string % dict([(h.name,s[h.name]) for h in self.fields[:1]+self.help_fields]),
|
||||
_value=s[id_field.name], _selected=(k==0)) for k,s in enumerate(rows)]
|
||||
else:
|
||||
options = [OPTION(s[field.name],_value=s[id_field.name],
|
||||
@@ -1005,7 +1005,7 @@ class SQLFORM(FORM):
|
||||
elif callable(self.formstyle):
|
||||
table = TABLE()
|
||||
for id,a,b,c in xfields:
|
||||
raw_b = self.field_parent[id] = b
|
||||
raw_b = self.field_parent[id] = b
|
||||
newrows = self.formstyle(id,a,raw_b,c)
|
||||
if type(newrows).__name__ != "tuple":
|
||||
newrows = [newrows]
|
||||
@@ -1388,8 +1388,8 @@ class SQLFORM(FORM):
|
||||
var k=jQuery('#web2py_keywords');
|
||||
var v=k.val();
|
||||
if(aggregator=='new') k.val(s); else k.val((v?(v+' '+ aggregator +' '):'')+s);
|
||||
jQuery('#w2p_query_panel').slideUp();
|
||||
}
|
||||
jQuery('#w2p_query_panel').slideUp();
|
||||
}
|
||||
""")
|
||||
return CAT(
|
||||
INPUT(
|
||||
@@ -1835,7 +1835,7 @@ class SQLFORM(FORM):
|
||||
value = A('File',
|
||||
_href='%s/%s' % (upload, value))
|
||||
else:
|
||||
value = ''
|
||||
value = ''
|
||||
elif isinstance(value,str):
|
||||
value = truncate_string(value,maxlength)
|
||||
else:
|
||||
@@ -1956,7 +1956,7 @@ class SQLFORM(FORM):
|
||||
previous_tablename,previous_fieldname,previous_id = \
|
||||
tablename,fieldname,id
|
||||
try:
|
||||
format = db[referee]._format
|
||||
format = db[referee]._format
|
||||
if callable(format): name = format(record)
|
||||
else: name = format % record
|
||||
except TypeError:
|
||||
@@ -2296,3 +2296,4 @@ form_factory = SQLFORM.factory # for backward compatibility, deprecated
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user