comparison default/input/field.html @ 86:92ca411ee635

chat: new chat_select page to select a jid to talk to + improved button style
author Goffi <goffi@goffi.org>
date Fri, 05 Jan 2018 13:14:22 +0100
parents f76ec90e0e1e
children da8f1ba9034d
comparison
equal deleted inserted replaced
85:05b500bd6235 86:92ca411ee635
6 {% endfor %} 6 {% endfor %}
7 {% endmacro %} 7 {% endmacro %}
8 8
9 {% macro int(name, label="", init=0) %} 9 {% macro int(name, label="", init=0) %}
10 <span class="form_input"> 10 <span class="form_input">
11 <label id="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="number" name="{{name}}" value="{{init}}" step="1" min="0"> 11 <label for="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="number" name="{{name}}" value="{{init}}" step="1" min="0">
12 </span> 12 </span>
13 {% endmacro %} 13 {% endmacro %}
14 14
15 {% macro text(name, label="", placeholder="", required=false) %} 15 {% macro text(name, label="", placeholder="", required=false) %}
16 {# single line text field 16 {# single line text field
17 additional kwargs will be passed as attributes #} 17 additional kwargs will be passed as attributes #}
18 <span class="form_input"> 18 <span class="form_input">
19 <label id="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="text" name="{{name}}" placeholder="{{placeholder}}" {{"required" if required}} {{kwargs|xmlattr}}> 19 <label for="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="text" name="{{name}}" placeholder="{{placeholder}}" {{"required" if required}} {{kwargs|xmlattr}}>
20 </span> 20 </span>
21 {% endmacro %} 21 {% endmacro %}
22 22
23 {% macro password(name, label="", required=false) %} 23 {% macro password(name, label="", required=false) %}
24 {# password field 24 {# password field
25 additional kwargs will be passed as attributes #} 25 additional kwargs will be passed as attributes #}
26 <span class="form_input"> 26 <span class="form_input">
27 <label id="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="password" name="{{name}}" {{"required" if required}} {{kwargs|xmlattr}}> 27 <label for="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="password" name="{{name}}" {{"required" if required}} {{kwargs|xmlattr}}>
28 </span> 28 </span>
29 {% endmacro %} 29 {% endmacro %}
30 30
31 {% macro email(name, label="", required=false) %} 31 {% macro email(name, label="", required=false) %}
32 {# email field 32 {# email field
33 additional kwargs will be passed as attributes #} 33 additional kwargs will be passed as attributes #}
34 <span class="form_input"> 34 <span class="form_input">
35 <label id="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="email" name="{{name}}" {{"required" if required}} {{kwargs|xmlattr}}> 35 <label for="{{name|next_gidx}}">{{label}}</label><input id="{{name|cur_gidx}}" type="email" name="{{name}}" {{"required" if required}} {{kwargs|xmlattr}}>
36 </span> 36 </span>
37 {% endmacro %} 37 {% endmacro %}
38 38
39 {% macro textarea(name, rows=10, cols=50, placeholder='') %} 39 {% macro textarea(name, rows=10, cols=50, placeholder='') %}
40 <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea> 40 <textarea name="{{name}}" rows="{{rows}}" cols="{{cols}}" placeholder="{{placeholder}}"></textarea>