From: marina Date: Tue, 4 Mar 2025 13:50:24 +0000 (+0300) Subject: ERP-302 Редактирование букета X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=5fe8ed79f08688f5c3fc021f12501a68aed6e688;p=erp24_rep%2Fyii-erp24%2F.git ERP-302 Редактирование букета --- diff --git a/erp24/records/BouquetComposition.php b/erp24/records/BouquetComposition.php index 9ca3377d..4b9ba74f 100644 --- a/erp24/records/BouquetComposition.php +++ b/erp24/records/BouquetComposition.php @@ -454,6 +454,7 @@ class BouquetComposition extends ActiveRecord */ public static function disabledButtons(bool $isCreate = false): bool { + return false; if ($isCreate) { return false; } diff --git a/erp24/views/bouquet/index.php b/erp24/views/bouquet/index.php index 75200de8..675475e1 100644 --- a/erp24/views/bouquet/index.php +++ b/erp24/views/bouquet/index.php @@ -196,12 +196,13 @@ $this->title = 'Содержание матрицы';
" . Html::a('Редактировать', Url::to(['/bouquet/view', 'id' => $model['id']]), [ - 'class' => 'btn btn-warning btn-edit' . - ((Yii::$app->request->get('year') < date('Y') || // Если год в прошлом → disabled - (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') < date('m')) || - (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') == date('m') && BouquetComposition::disabledButtons()) || - (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') == date('m') + 1 &&BouquetComposition::disabledButtons()) - ) ? ' disabled' : ''), + 'class' => 'btn btn-warning btn-edit' +// . +// ((Yii::$app->request->get('year') < date('Y') || // Если год в прошлом → disabled +// (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') < date('m')) || +// (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') == date('m') && BouquetComposition::disabledButtons()) || +// (Yii::$app->request->get('year') == date('Y') && Yii::$app->request->get('month') == date('m') + 1 &&BouquetComposition::disabledButtons()) +// ) ? ' disabled' : ''), ]) . "