-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlfs.catalog.products.product_property_validated.html
67 lines (64 loc) · 3.25 KB
/
lfs.catalog.products.product_property_validated.html
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% load i18n %}
{% load lfs_tags %}
{% for property in properties %}
{% if property.obj.is_select_field %}
<span class="property-label">
{{ property.title }}:
</span>
<span>
<select class="cp-property"
name="property-{{ property.id }}">
{% if not property.obj.required %}
<option>---</option>
{% endif %}
{% for option in property.options %}
<option value="{{ option.id }}"
{% if option.selected %}selected="selected"{% endif %}>
{{ option.name }}
{% if property.display_price %}
/ {{ option.price|currency:request}}
{% endif %}
</option>
{% endfor %}
</select>
</span>
<span></span>
{% else %}
<span class="property-label">
{{ property.title }}:
</span>
<span class="right">
{% if property.obj.is_text_field %}
<input class="product-input-field text-field" type="input" size="15" maxlength="100" name="property-{{ property.id }}" value="{{ property.value }}" />
<span></span>
{% else %}
{% if property.obj.is_number_field %}
<span class="cp-property">
<input class="right product-input-field number-field" type="input" size="6" maxlength="9" name="property-{{ property.id }}" value="{{ property.value }}" />
</span>
<span></span>
{% else %}
<select class="cp-property"
name="property-{{ property.id }}">
{% if not property.obj.required %}
<option>---</option>
{% endif %}
{% for component in property.components %}
<option value="{{ component.id }}">
{{ component.name }}
{% if property.display_price %}
/ {{ component.price|currency:request}}
{% endif %}
</option>
{% endfor %}
</select>
{% endif %}
{% endif %}
</span>
<span>
{{ property.unit }}
</span>
<br>
{% endif %}
<br><br>
{% endfor %}