mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 03:14:52 +02:00
Made orderdetails strings translatable.
This commit is contained in:
parent
6e34cc3633
commit
c4d5d4291b
4 changed files with 14 additions and 6 deletions
|
@ -47,20 +47,26 @@ class OrderdetailType extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('supplierpartnr', TextType::class, [
|
||||
'label' => 'orderdetails.edit.supplierpartnr',
|
||||
'required' => false,
|
||||
'empty_data' => ""
|
||||
]);
|
||||
|
||||
$builder->add('supplier', StructuralEntityType::class, ['class' => Supplier::class, 'disable_not_selectable' => true]);
|
||||
$builder->add('supplier', StructuralEntityType::class, [
|
||||
'class' => Supplier::class, 'disable_not_selectable' => true,
|
||||
'label' => 'orderdetails.edit.supplier'
|
||||
]);
|
||||
|
||||
$builder->add('supplier_product_url', UrlType::class, [
|
||||
'required' => false,
|
||||
'empty_data' => ""
|
||||
'empty_data' => "",
|
||||
'label' => 'orderdetails.edit.url'
|
||||
]);
|
||||
|
||||
$builder->add('obsolete', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label_attr' => ['class' => 'checkbox-custom']
|
||||
'label_attr' => ['class' => 'checkbox-custom'],
|
||||
'label' => 'orderdetails.edit.obsolete'
|
||||
]);
|
||||
|
||||
//Attachment section
|
||||
|
|
|
@ -47,6 +47,7 @@ class PricedetailType extends AbstractType
|
|||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
//No labels needed, we define translation in templates
|
||||
$builder->add("min_discount_quantity", IntegerType::class);
|
||||
$builder->add("price_related_quantity", IntegerType::class);
|
||||
$builder->add("price", NumberType::class);
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
<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>{% trans %}pricedetails.edit.min_qty{% endtrans %}</th>
|
||||
<th>{% trans %}pricedetails.edit.price{% endtrans %}</th>
|
||||
<th>{% trans %}pricedetails.edit.price_qty{% endtrans %}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -90,5 +90,6 @@
|
|||
</div>
|
||||
{{ form_row(form.save) }}
|
||||
{{ form_row(form.reset) }}
|
||||
{{ form_errors(form) }}
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue