dont use var name "input"

This commit is contained in:
Andrew Croce 2018-07-25 13:28:48 -04:00
parent c98cdb2352
commit 8ba4c372f4
3 changed files with 12 additions and 12 deletions

View File

@ -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):

View File

@ -12,7 +12,7 @@
{% end %}
</legend>
{% raw input() %}
{% raw field() %}
{% if errors %}
{% for error in errors %}

View File

@ -11,7 +11,7 @@
{% end %}
</label>
{% raw input(placeholder=placeholder) %}
{% raw field(placeholder=placeholder) %}
{% if errors %}
{% for error in errors %}