lib.itmens/common/templates/widgets/hstore.html
Henri Dickson 0ffd47ca96
new style
* new style with picocss
* djlint
* rate distribution
* collection item drag to order
* discover available for guest
* search combine movie tv
2023-05-20 11:01:18 -04:00

33 lines
877 B
HTML

<style>
.widget-value-key-input input:nth-child(odd) {
width: 49%;
margin-right: 1%;
}
.widget-value-key-input input:nth-child(even) {
width: 49%;
margin-left: 1%;
}
</style>
<div class="widget-value-key-input"
name='{{ widget.name }}'
{% include "django/forms/widgets/attrs.html" %}>
{% if widget.value != None %}
{% for pair in widget.value %}
{% for k, v in pair.items %}
<input type="text" value="{{ k }}">
<input type="text" value="{{ v }}">
{% endfor %}
{% endfor %}
{% endif %}
</div>
<input type="text"
class="widget-value-key-input-data"
hidden
name="{{ widget.name }}">
<script>
keyValueInput(
$(".widget-value-key-input[name='{{ widget.name }}']"),
$(".widget-value-key-input-data[name='{{ widget.name }}']")
);
</script>