diff default/input/field.html @ 27:38328c57f3ef

field: added new text and textarea macros
author Goffi <goffi@goffi.org>
date Sat, 24 Jun 2017 20:23:40 +0200
parents 8fa2fd2e928e
children 0520b7c9dcc0
line wrap: on
line diff
--- a/default/input/field.html	Sat Jun 24 20:22:36 2017 +0200
+++ b/default/input/field.html	Sat Jun 24 20:23:40 2017 +0200
@@ -12,6 +12,16 @@
     </span>
 {% endmacro %}
 
+{% macro text(name, label="", placeholder="") %}
+    <span class="form_input">
+        <label id="{{'field'|next_gidx}}">{{label}}</label><input id="{{'field'|cur_gidx}}" type="text" name="{{name}}" placeholder="{{placeholder}}"></label>
+    </span>
+{% endmacro %}
+
+{% macro textarea(name, rows=10, cols=50, placeholder='') %}
+    <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea>
+{% endmacro %}
+
 {% macro meta(name, value) %}
     <input type="hidden" name="{{name}}" value="{{value}}">
 {% endmacro %}