From: Vladimir Fomichev Date: Thu, 7 Aug 2025 11:34:14 +0000 (+0300) Subject: Деактивация форм X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=f91dbf301eb559640acec3aa7e0113d05d4a0abd;p=erp24_rep%2Fyii-erp24%2F.git Деактивация форм --- diff --git a/erp24/views/products1c-nomenclature-actuality/index.php b/erp24/views/products1c-nomenclature-actuality/index.php index 02296dd2..f0998b1f 100644 --- a/erp24/views/products1c-nomenclature-actuality/index.php +++ b/erp24/views/products1c-nomenclature-actuality/index.php @@ -235,7 +235,7 @@ $months = monthList(); 'actuality-form']); ?>
- 'btn btn-success']) ?> + 'btn btn-success', 'id' => 'saveButton']) ?>
$dataProvider, @@ -280,15 +280,18 @@ $months = monthList(); $from = $active ? (new \DateTime($active->date_from))->format('Y-m') : null; $to = $active ? (new \DateTime($active->date_to))->format('Y-m') : null; } + return Html::hiddenInput("actuality[$i][guid]", $m->id) . Html::tag('div', Html::dropDownList("actuality[$i][from]", $from, $months, [ 'class'=>'form-select from-month form-select-sm me-1', - 'prompt'=>'от' + 'prompt'=>'от', + 'disabled' => $filter->onlyInactive ? true : null ]) . Html::dropDownList("actuality[$i][to]", $to, $months, [ 'class'=>'form-select to-month form-select-sm', - 'prompt'=>'до' + 'prompt'=>'до', + 'disabled' => $filter->onlyInactive ? true : null ]), ['class'=>'d-flex align-items-center'] ); @@ -298,16 +301,20 @@ $months = monthList(); 'label' => 'Склад NN', 'format' => 'raw', 'contentOptions' => ['style'=>'width:60px; text-align:center;'], - 'value' => function ($m, $k, $i) { - return Html::checkbox("actuality[$i][warehouse_nn]", false); + 'value' => function ($m, $k, $i) use ($filter){ + return Html::checkbox("actuality[$i][warehouse_nn]", false, [ + 'disabled' => $filter->onlyInactive ? true : null + ]); } ], [ 'label' => 'Склад MSK', 'format' => 'raw', 'contentOptions' => ['style'=>'width:60px; text-align:center;'], - 'value' => function ($m, $k, $i) { - return Html::checkbox("actuality[$i][warehouse_msk]", false); + 'value' => function ($m, $k, $i) use ($filter){ + return Html::checkbox("actuality[$i][warehouse_msk]", false, [ + 'disabled' => $filter->onlyInactive ? true : null + ]); } ], [