# HG changeset patch # User Goffi # Date 1509123241 -7200 # Node ID 87680eed9e250bd9296004db029191500c14c9c1 # Parent 1023563381187644198d15ad1c29830679579e8e input(field, form): improved classes + new email field diff -r 102356338118 -r 87680eed9e25 default/input/field.html --- a/default/input/field.html Fri Oct 27 18:52:34 2017 +0200 +++ b/default/input/field.html Fri Oct 27 18:54:01 2017 +0200 @@ -1,20 +1,38 @@ {% macro choices(name, choices_list, checked=none) %} {% for choice, label in choices_list %}
- +
{% endfor %} {% endmacro %} {% macro int(name, label="", init=0) %} - + + +{% endmacro %} + +{% macro text(name, label="", placeholder="", required=false) %} + {# single line text field + additional kwargs will be passed as attributes #} + + {% endmacro %} -{% macro text(name, label="", placeholder="") %} +{% macro password(name, label="", required=false) %} + {# password field + additional kwargs will be passed as attributes #} - + + +{% endmacro %} + +{% macro email(name, label="", required=false) %} + {# email field + additional kwargs will be passed as attributes #} + + {% endmacro %} diff -r 102356338118 -r 87680eed9e25 default/input/form.html --- a/default/input/form.html Fri Oct 27 18:52:34 2017 +0200 +++ b/default/input/form.html Fri Oct 27 18:54:01 2017 +0200 @@ -1,5 +1,5 @@ -{% macro form(action='') %} -
+{% macro form(action='', class='') %} + {% if csrf_token is defined %} {% endif %}