-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmapping_item.mako
48 lines (41 loc) · 995 Bytes
/
mapping_item.mako
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% if field.widget.hidden:
<li
% if not field.error:
class=${field.error}
% else:
class=${field.widget.error_class}
% endif
title="${field.description}"
id="item-${field.oid}" i18n:domain="deform">
% endif
<!-- mapping_item -->
% if not (field.widget.hidden or field.widget.category == 'structural'):
<label class="desc"
title="${field.description}"
for="${field.oid}"
>${field.title}
%if field.required:
<span class="req"
id="req-${field.oid}">*</span>
% endif
</label>
% endif
${field.serialize(cstruct)}
% if field.error and not field.widget.hidden:
<%
errstr = 'error-%s' % field.oid
%>
% for msg in field.error.messages():
<p
% if msg.index==0:
id="${errstr}"
% else:
id=${'%s-%s' % (errstr, msg.index)}
% endif
class="${field.widget.error_class}" i18n:translate="">${msg}</p>
% endfor
% endif
<!-- /mapping_item -->
% if field.widget.hidden:
</li>
% endif