|
|
@ -45,7 +45,7 @@ class FormRender(object): |
|
|
|
u'class="{classes}" style="{style}" />', |
|
|
|
u'class="{classes}" style="{style}" />', |
|
|
|
"file": u'<input {required} type="file" name="{name}" ' |
|
|
|
"file": u'<input {required} type="file" name="{name}" ' |
|
|
|
u'class="{classes}" style="{style}" />', |
|
|
|
u'class="{classes}" style="{style}" />', |
|
|
|
"password": u'<input {required} type="password" min="{minval}" ' |
|
|
|
"password": u'<input {required} type="password" minlength="{minlen}" ' |
|
|
|
u'name="{name}" value="{value}" class="{classes}" ' |
|
|
|
u'name="{name}" value="{value}" class="{classes}" ' |
|
|
|
u'style="{style}" />', |
|
|
|
u'style="{style}" />', |
|
|
|
"text": u'<textarea {required} name="{name}" rows="{rows}" ' |
|
|
|
"text": u'<textarea {required} name="{name}" rows="{rows}" ' |
|
|
@ -164,7 +164,7 @@ class FormRender(object): |
|
|
|
return tpl.format(name=name, required=required, classes=classes, |
|
|
|
return tpl.format(name=name, required=required, classes=classes, |
|
|
|
style=style) |
|
|
|
style=style) |
|
|
|
|
|
|
|
|
|
|
|
def r_field_password(self, name, value, minval=None, required=False, |
|
|
|
def r_field_password(self, name, value, minlen=None, required=False, |
|
|
|
classes=None, style=""): |
|
|
|
classes=None, style=""): |
|
|
|
""" |
|
|
|
""" |
|
|
|
Render a password field to HTML. |
|
|
|
Render a password field to HTML. |
|
|
@ -172,7 +172,7 @@ class FormRender(object): |
|
|
|
if classes is None: |
|
|
|
if classes is None: |
|
|
|
classes = [] |
|
|
|
classes = [] |
|
|
|
tpl = self.field_tpl['password'] |
|
|
|
tpl = self.field_tpl['password'] |
|
|
|
return tpl.format(name=name, value=value, minval=minval, |
|
|
|
return tpl.format(name=name, value=value, minlen=minlen, |
|
|
|
required=required, classes=classes, style=style) |
|
|
|
required=required, classes=classes, style=style) |
|
|
|
|
|
|
|
|
|
|
|
def r_field_text(self, name, value, rows=4, cols=80, required=False, |
|
|
|
def r_field_text(self, name, value, rows=4, cols=80, required=False, |
|
|
|