diff default/input/field.html @ 116:da8f1ba9034d

input/comment: renamed "comment" library to "textbox", and made it more generic
author Goffi <goffi@goffi.org>
date Tue, 30 Jan 2018 07:47:23 +0100
parents 92ca411ee635
children
line wrap: on
line diff
--- a/default/input/field.html	Tue Jan 30 07:47:21 2018 +0100
+++ b/default/input/field.html	Tue Jan 30 07:47:23 2018 +0100
@@ -36,8 +36,8 @@
     </span>
 {% endmacro %}
 
-{% macro textarea(name, rows=10, cols=50, placeholder='') %}
-    <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea>
+{% macro textarea(name, rows=10, cols=50, placeholder='', required=false) %}
+    <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}" {{"required" if required}}></textarea>
 {% endmacro %}
 
 {% macro meta(name, value) %}