@@ -121,14 +121,14 @@ |
||
| 121 | 121 | Yii::$app->getSession()->setFlash('success', Yii::t('yuncms', 'Delete success.')); |
| 122 | 122 | return $this->redirect(['index']); |
| 123 | 123 | } |
| 124 | - /** |
|
| 125 | - * Batch Delete existing Task model. |
|
| 126 | - * If deletion is successful, the browser will be redirected to the 'index' page. |
|
| 127 | - * @return mixed |
|
| 128 | - * @throws NotFoundHttpException |
|
| 129 | - * @throws \Throwable |
|
| 130 | - * @throws \yii\db\StaleObjectException |
|
| 131 | - */ |
|
| 124 | + /** |
|
| 125 | + * Batch Delete existing Task model. |
|
| 126 | + * If deletion is successful, the browser will be redirected to the 'index' page. |
|
| 127 | + * @return mixed |
|
| 128 | + * @throws NotFoundHttpException |
|
| 129 | + * @throws \Throwable |
|
| 130 | + * @throws \yii\db\StaleObjectException |
|
| 131 | + */ |
|
| 132 | 132 | public function actionBatchDelete() |
| 133 | 133 | { |
| 134 | 134 | if (($ids = Yii::$app->request->post('ids', null)) != null) { |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | if (($model = Task::findOne($id)) !== null) { |
| 156 | 156 | return $model; |
| 157 | 157 | } else { |
| 158 | - throw new NotFoundHttpException (Yii::t('yii', 'The requested page does not exist.')); |
|
| 158 | + throw new NotFoundHttpException(Yii::t('yii', 'The requested page does not exist.')); |
|
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | /* @var yuncms\models\Task $model */ |
| 8 | 8 | /* @var ActiveForm $form */ |
| 9 | 9 | ?> |
| 10 | -<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?> |
|
| 10 | +<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?> |
|
| 11 | 11 | |
| 12 | 12 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> |
| 13 | 13 | <div class="hr-line-dashed"></div> |
@@ -70,14 +70,14 @@ |
||
| 70 | 70 | 'crontab_str', |
| 71 | 71 | [ |
| 72 | 72 | 'attribute' => 'switch', |
| 73 | - 'value' => function ($model) { |
|
| 73 | + 'value' => function($model) { |
|
| 74 | 74 | return $model->switch == Task::SWITCH_ACTIVE ? Yii::t('yuncms', 'Active') : Yii::t('yuncms', 'Disable'); |
| 75 | 75 | }, |
| 76 | 76 | 'label' => Yii::t('yuncms', 'Task Switch'), |
| 77 | 77 | ], |
| 78 | 78 | [ |
| 79 | 79 | 'attribute' => 'status', |
| 80 | - 'value' => function ($model) { |
|
| 80 | + 'value' => function($model) { |
|
| 81 | 81 | return $model->switch == Task::STATUS_NORMAL ? Yii::t('yuncms', 'normal') : Yii::t('yuncms', 'Save'); |
| 82 | 82 | }, |
| 83 | 83 | 'label' => Yii::t('yuncms', 'Task Status'), |