Add "cols" parameter to the textarea macro

Macro textarea depends on cols variable, but there is no way to pass it.
This commit is contained in:
unkind
2013-09-17 11:34:02 +04:00
parent 4001f81a17
commit c735d6de7a
+1 -1
View File
@@ -15,7 +15,7 @@ Imagine we have a helper module that renders forms (called ``forms.html``):
<input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
{% endmacro %}
{% macro textarea(name, value, rows) %}
{% macro textarea(name, value, rows, cols) %}
<textarea name="{{ name }}" rows="{{ rows|default(10) }}" cols="{{ cols|default(40) }}">{{ value|e }}</textarea>
{% endmacro %}