1
0
forked from ScoDoc/ScoDoc

Pour une poignée d'octets

This commit is contained in:
Emmanuel Viennet 2021-12-11 09:58:04 +01:00
parent 2cca1e9bbd
commit c2c1c5b5f2

View File

@ -334,7 +334,7 @@ class TF(object):
buttons_markup = ""
if self.submitbutton:
buttons_markup += (
'<input type="submit" name="%s_submit" id="%s_submit" value="%s" %s/>'
'<input type="submit" name="%s_submit" id="%s_submit" value="%s" %s>'
% (
self.formid,
self.formid,
@ -344,7 +344,7 @@ class TF(object):
)
if self.cancelbutton:
buttons_markup += (
' <input type="submit" name="%s_cancel" id="%s_cancel" value="%s"/>'
' <input type="submit" name="%s_cancel" id="%s_cancel" value="%s">'
% (self.formid, self.formid, self.cancelbutton)
)
@ -364,7 +364,7 @@ class TF(object):
'<form action="%s" method="%s" id="%s" enctype="%s" name="%s" %s>'
% (self.form_url, self.method, self.formid, enctype, name, klass)
)
R.append('<input type="hidden" name="%s_submitted" value="1"/>' % self.formid)
R.append('<input type="hidden" name="%s_submitted" value="1">' % self.formid)
if self.top_buttons:
R.append(buttons_markup + "<p></p>")
R.append('<table class="tf">')
@ -406,7 +406,7 @@ class TF(object):
else:
checked = ""
lab.append(
'<input type="checkbox" name="%s:list" value="%s" onclick="tf_enable_elem(this)" %s/>'
'<input type="checkbox" name="%s:list" value="%s" onclick="tf_enable_elem(this)" %s>'
% ("tf-checked", field, checked)
)
if title_bubble:
@ -439,13 +439,13 @@ class TF(object):
add_no_enter_js = True
# lem.append('onchange="document.%s.%s.focus()"'%(name,nextitemname))
# lem.append('onblur="document.%s.%s.focus()"'%(name,nextitemname))
lem.append(('value="%(' + field + ')s" />') % values)
lem.append(('value="%(' + field + ')s" >') % values)
elif input_type == "password":
lem.append(
'<input type="password" name="%s" id="%s" size="%d" %s'
% (field, wid, size, attribs)
)
lem.append(('value="%(' + field + ')s" />') % values)
lem.append(('value="%(' + field + ')s" >') % values)
elif input_type == "radio":
labels = descr.get("labels", descr["allowed_values"])
for i in range(len(labels)):
@ -549,24 +549,24 @@ class TF(object):
if descr.get("type", "") == "list":
for v in values[field]:
lem.append(
'<input type="hidden" name="%s:list" value="%s" %s />'
'<input type="hidden" name="%s:list" value="%s" %s >'
% (field, v, attribs)
)
else:
lem.append(
'<input type="hidden" name="%s" id="%s" value="%s" %s />'
'<input type="hidden" name="%s" id="%s" value="%s" %s >'
% (field, wid, values[field], attribs)
)
elif input_type == "separator":
pass
elif input_type == "file":
lem.append(
'<input type="file" name="%s" size="%s" value="%s" %s/>'
'<input type="file" name="%s" size="%s" value="%s" %s>'
% (field, size, values[field], attribs)
)
elif input_type == "date": # JavaScript widget for date input
lem.append(
'<input type="text" name="%s" size="10" value="%s" class="datepicker"/>'
'<input type="text" name="%s" size="10" value="%s" class="datepicker">'
% (field, values[field])
)
elif input_type == "text_suggest":
@ -716,7 +716,7 @@ var {field}_as = new bsn.AutoSuggest('{field}', {field}_opts);
bool_val = 0
R.append(labels[bool_val])
if bool_val:
R.append('<input type="hidden" name="%s" value="1"/>' % field)
R.append('<input type="hidden" name="%s" value="1">' % field)
else:
labels = descr.get("labels", descr["allowed_values"])
for i in range(len(labels)):