63 lines
2.7 KiB
Twig
63 lines
2.7 KiB
Twig
<div>
|
|
<h2 class="title">
|
|
{{ DATA.id is not empty ? dt.gM("Edit Deliver data") : dt.gM("Add new delivery") }}
|
|
<input type="hidden" value="{{ DATA.id|default('') }}" id="id" name="id" />
|
|
</h2>
|
|
|
|
{# BASE DATA #}
|
|
<div id="pbase" class="sbox p20">
|
|
<ul class="dx col2">
|
|
{% for field in [
|
|
{'id': 't_order', 'label': 'Order', 'class': 'long', 'type': 'input'},
|
|
{'id': 't_cost', 'label': 'Delivery cost', 'class': 'short', 'type': 'input'},
|
|
{'id': 't_title', 'label': 'Title', 'class': 'long', 'type': 'input'},
|
|
{'id': 't_cms', 'label': 'cms Title', 'class': 'long', 'type': 'input'},
|
|
{'id': 't_desc', 'label': 'Description', 'class': 'long', 'type': 'textarea'}
|
|
] %}
|
|
<li>
|
|
<label for="{{ field.id }}">{{ dt.gM(field.label) }}:</label>
|
|
<div class="validate">
|
|
{% set val = DATA[field.id]|default('') %}
|
|
{% if field.type == 'textarea' %}
|
|
<textarea id="{{ field.id }}" name="{{ field.id }}" class="{{ field.class }}">{{ val }}</textarea>
|
|
{% else %}
|
|
<input id="{{ field.id }}" name="{{ field.id }}" type="text" class="{{ field.class }}" value="{{ val }}"/>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
{# SETTINGS DATA CHECKBOXES #}
|
|
<div id="psettings" class="sbox noskip show">
|
|
<h3><a>{{ dt.gM("Classificator settings") }}</a></h3>
|
|
<div style="display:none;">
|
|
<ul class="dx pblocks">
|
|
{% for chk in [
|
|
{
|
|
'id': 't_enabled',
|
|
'label': 'Delivery enabled',
|
|
'desc': 'Indicates whether Deliver is enabled or not'
|
|
},
|
|
{
|
|
'id': 't_default',
|
|
'label': 'Delivery default',
|
|
'desc': 'Indicates whether Delivery is default or not'
|
|
},
|
|
] %}
|
|
<li>
|
|
{% set sel = (DATA[chk.id] is defined and DATA[chk.id] == '1') ? '1' : '' %}
|
|
<input id="{{ chk.id }}" name="{{ chk.id }}" type="hidden" class="chk-value" value="{{ sel }}"/>
|
|
<label>{{ dt.gM(chk.label) }}:</label>
|
|
<p>{{ dt.gM(chk.desc) }}</p>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<div class="clear"></div>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<br/> |