Part-DB.Part-DB-server/templates/Parts/edit/edit_form_styles.html.twig

60 lines
2.6 KiB
Twig
Raw Normal View History

{% block pricedetail_widget %}
{% form_theme form.currency 'Form/extendedBootstrap4_layout.html.twig' %}
<tr>
<td>{{ form_widget(form.minDiscountQuantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.minDiscountQuantity) }}</td>
<td>
<div class="input-group input-group-sm">
{{ form_widget(form.price) }}
<div class="input-group-append">
{{ form_widget(form.currency, {'attr': {'class': 'selectpicker form-control-sm'}}) }}
</div>
</div>
{{ form_errors(form.price) }}
{{ form_errors(form.currency) }}
</td>
<td>{{ form_widget(form.priceRelatedQuantity, {'attr': {'class': 'form-control-sm'}}) }} {{ form_errors(form.price) }}</td>
<td><button type="button" class="btn btn-danger order_btn_delete btn-sm" title="{% trans %}orderdetail.delete{% endtrans %}" onclick="delete_pricedetail_entry(this);">
<i class="fas fa-trash-alt fa-fw"></i>
</button>
</td>
</tr>
{% endblock %}
{% block orderdetail_widget %}
<tr>
<td>
{{ form_row(form.supplierpartnr, {'attr': {'class': 'form-control-sm'}}) }}
{{ form_row(form.supplier, {'attr': {'class': 'form-control-sm'}}) }}
{{ form_row(form.supplierProductUrl, {'attr': {'class': 'form-control-sm'}}) }}
{{ form_widget(form.obsolete) }}
</td>
<td>
<table class="table table-sm table-bordered" data-prototype="{{ form_widget(form.priceDetails.vars.prototype)|e('html_attr') }}">
<thead>
<tr>
<th>Min Qty.</th>
<th>Price</th>
<th>Price Qty</th>
<th></th>
</tr>
</thead>
<tbody>
{% for price in form.priceDetails %}
{{ form_widget(price) }}
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success" onclick="create_pricedetail_entry(this)">
<i class="fas fa-plus-square fa-fw"></i>
{% trans %}pricedetail.create{% endtrans %}
</button>
</td>
<td>
<button type="button" class="btn btn-danger order_btn_delete" onclick="delete_orderdetail_entry(this);" title="{% trans %}orderdetail.delete{% endtrans %}">
<i class="fas fa-trash-alt fa-fw"></i>
</button>
</td>
</tr>
{% endblock %}