From baedc8bc27867439572f53172dfecde974efc31d Mon Sep 17 00:00:00 2001 From: fomichev Date: Tue, 4 Mar 2025 18:05:28 +0300 Subject: [PATCH] =?utf8?q?=D0=A2=D0=B5=D1=81=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?utf8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B0=D0=BF=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/CronController.php | 2 +- erp24/views/users-whatsapp-message/test.php | 62 +++++++++++---------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/erp24/commands/CronController.php b/erp24/commands/CronController.php index 1d810703..09f52b9d 100644 --- a/erp24/commands/CronController.php +++ b/erp24/commands/CronController.php @@ -766,7 +766,7 @@ class CronController extends Controller ); $channel = self::getChannelByName('WABA'); - $limit = $channel['limit'] ?? 250; + $limit = $channel['messagingLimit'] ?? 250; if (!empty($phonesArray)) { $messageText = $messagesSettings diff --git a/erp24/views/users-whatsapp-message/test.php b/erp24/views/users-whatsapp-message/test.php index 8d6de0fe..a651fa9b 100644 --- a/erp24/views/users-whatsapp-message/test.php +++ b/erp24/views/users-whatsapp-message/test.php @@ -5,25 +5,28 @@ use yii\helpers\Url; use yii\widgets\ActiveForm; use yii\base\DynamicModel; -$model = new DynamicModel([ - 'phones', 'channelName', 'cascadeName', 'subjectId', 'templateName' -]); +$model = new class(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateName']) extends DynamicModel { + public function formName() + { + return ''; + } +}; $model->addRule(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateName'], 'safe'); ?>
-

- 'btn btn-primary']) ?> -

+

+ 'btn btn-primary']) ?> +

- + 'post']); ?>

Отправка сообщений

-field($model, 'phones')->textInput([ - 'maxlength' => true, - 'placeholder' => 'Введите телефоны через запятую' -]) ?> + field($model, 'phones')->textInput([ + 'maxlength' => true, + 'placeholder' => 'Введите телефоны через запятую' + ]) ?>
addRule(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateN

Получить канал по имени

-field($model, 'channelName')->textInput([ - 'maxlength' => true, - 'placeholder' => 'Введите имя канала' -]) ?> + field($model, 'channelName')->textInput([ + 'maxlength' => true, + 'placeholder' => 'Введите имя канала' + ]) ?>
addRule(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateN

Получить каскад по имени

-field($model, 'cascadeName')->textInput([ - 'maxlength' => true, - 'placeholder' => 'Введите имя каскада' -]) ?> + field($model, 'cascadeName')->textInput([ + 'maxlength' => true, + 'placeholder' => 'Введите имя каскада' + ]) ?>
addRule(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateN

Получить шаблон по subjectId и имени шаблона

-field($model, 'subjectId')->textInput([ - 'maxlength' => true, - 'placeholder' => 'Введите subjectId' -]) ?> -field($model, 'templateName')->textInput([ - 'maxlength' => true, - 'placeholder' => 'Введите имя шаблона' -]) ?> + field($model, 'subjectId')->textInput([ + 'maxlength' => true, + 'placeholder' => 'Введите subjectId' + ]) ?> + field($model, 'templateName')->textInput([ + 'maxlength' => true, + 'placeholder' => 'Введите имя шаблона' + ]) ?>
addRule(['phones', 'channelName', 'cascadeName', 'subjectId', 'templateN ]) ?>
- - -
+ +
\ No newline at end of file -- 2.39.5