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