Skip to content

Commit

Permalink
Merge pull request #5540 from takeuji/order-edit-row-fix
Browse files Browse the repository at this point in the history
受注登録画面で商品の削除、追加を行うとエラーになる不具合を修正
  • Loading branch information
chihiro-adachi committed Aug 16, 2022
2 parents 8f02333 + a1c33ea commit 8d1b80d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Eccube/Resource/template/admin/Order/edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ file that was distributed with this source code.
$collectionHolder = $('#table-form-field');
index = $collectionHolder.find('tbody > tr').length;
formIdPrefix = '#order_OrderItems_';
if (index > 0) {
let row = '#' + $collectionHolder.find('tbody > tr').last().data("row");
index = row.replace(formIdPrefix, '');
}
$(document).on('click', '.delete', function(e) {
// 商品削除
Expand Down Expand Up @@ -739,7 +743,7 @@ file that was distributed with this source code.
<tbody>
{% for orderItemForm in form.OrderItems %}
{% set OrderItem = orderItemForm.vars.data %}
<tr>
<tr data-row="{{ orderItemForm.vars.id }}">
{# hidden values #}
{{ form_widget(orderItemForm.ProductClass) }}
{{ form_widget(orderItemForm.order_item_type) }}
Expand Down

0 comments on commit 8d1b80d

Please sign in to comment.