dont use var name "input"
This commit is contained in:
parent
c98cdb2352
commit
8ba4c372f4
@ -12,23 +12,23 @@ class Alert(UIModule):
|
||||
level=level)
|
||||
|
||||
class TextInput(UIModule):
|
||||
def render(self, input, placeholder=''):
|
||||
def render(self, field, placeholder=''):
|
||||
return self.render_string(
|
||||
"components/text_input.html.to",
|
||||
input=input,
|
||||
label=re.sub('<[^<]+?>', '', str(input.label)),
|
||||
errors=input.errors,
|
||||
field=field,
|
||||
label=re.sub('<[^<]+?>', '', str(field.label)),
|
||||
errors=field.errors,
|
||||
placeholder=placeholder,
|
||||
description=input.description)
|
||||
description=field.description)
|
||||
|
||||
class OptionsInput(UIModule):
|
||||
def render(self, input, inline=False):
|
||||
def render(self, field, inline=False):
|
||||
return self.render_string(
|
||||
"components/options_input.html.to",
|
||||
input=input,
|
||||
label=re.sub('<[^<]+?>', '', str(input.label)),
|
||||
errors=input.errors,
|
||||
description=input.description,
|
||||
field=field,
|
||||
label=re.sub('<[^<]+?>', '', str(field.label)),
|
||||
errors=field.errors,
|
||||
description=field.description,
|
||||
inline=inline)
|
||||
|
||||
class Icon(UIModule):
|
||||
|
@ -12,7 +12,7 @@
|
||||
{% end %}
|
||||
</legend>
|
||||
|
||||
{% raw input() %}
|
||||
{% raw field() %}
|
||||
|
||||
{% if errors %}
|
||||
{% for error in errors %}
|
||||
|
@ -11,7 +11,7 @@
|
||||
{% end %}
|
||||
</label>
|
||||
|
||||
{% raw input(placeholder=placeholder) %}
|
||||
{% raw field(placeholder=placeholder) %}
|
||||
|
||||
{% if errors %}
|
||||
{% for error in errors %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user