Fix reviews

parent bb6ad369
...@@ -28,12 +28,12 @@ class ReviewAdminController extends AdminController ...@@ -28,12 +28,12 @@ class ReviewAdminController extends AdminController
public static function actionsTitles() { public static function actionsTitles() {
return [ return [
"Create" => "Добавление группы", "Create" => "Добавление отзыва",
"Update" => "Редактирование группы", "Update" => "Редактирование отзыва",
"View" => "Просмотр группы", "View" => "Просмотр отзыва",
"Manage" => "Управление группами", "Manage" => "Управление отзывами",
"Delete" => "Удаление группы", "Delete" => "Удаление отзыва",
"Updateanswer" => "Ответить", "Update-answer" => "Ответить",
]; ];
} }
...@@ -42,7 +42,8 @@ class ReviewAdminController extends AdminController ...@@ -42,7 +42,8 @@ class ReviewAdminController extends AdminController
* $id integer * $id integer
* @return mixed * @return mixed
*/ */
public function actionUpdateanswer($id) { public function actionUpdateAnswer($id)
{
$model = $this->findModel($id); $model = $this->findModel($id);
\yii::$app->controller->page_title = 'Ответ на отзыв <small>'.$model->user->email.'</small>'; \yii::$app->controller->page_title = 'Ответ на отзыв <small>'.$model->user->email.'</small>';
......
...@@ -21,10 +21,6 @@ return [ ...@@ -21,10 +21,6 @@ return [
'type' => 'dropdownlist', 'type' => 'dropdownlist',
'items' => ArrayHelper::map(\common\modules\languages\models\Languages::find()->all(),'code','name') 'items' => ArrayHelper::map(\common\modules\languages\models\Languages::find()->all(),'code','name')
], ],
'user_id' => [
'type' => 'dropdownlist',
'items' => ArrayHelper::map(\common\modules\scoring\models\ScClient::find()->all(),'id','fullName'),
],
'date' => ['type' => 'date', 'class' => 'form-control',], 'date' => ['type' => 'date', 'class' => 'form-control',],
'text' => ['type' => 'textarea', 'class' => 'form-control'], 'text' => ['type' => 'textarea', 'class' => 'form-control'],
'<a id="doAnswer" style="cursor: pointer;" onclick="$(this).next().next().slideToggle(); return false;">Ответить</a>' . '<a id="doAnswer" style="cursor: pointer;" onclick="$(this).next().next().slideToggle(); return false;">Ответить</a>' .
......
...@@ -91,8 +91,8 @@ class Reviews extends \common\components\ActiveRecordModel ...@@ -91,8 +91,8 @@ class Reviews extends \common\components\ActiveRecordModel
public function rules() public function rules()
{ {
return [ return [
[['user_id', 'text', 'state', 'date', 'notification_send', 'show_in_module'], 'required'], [['text', 'state', 'date', 'notification_send', 'show_in_module'], 'required'],
[['user_id', 'admin_id', 'priority', 'notification_send', 'order', 'cat_id', 'show_in_module', 'rate_usability', 'rate_loyality', 'rate_profit'], 'integer'], [['admin_id', 'priority', 'notification_send', 'order', 'cat_id', 'show_in_module', 'rate_usability', 'rate_loyality', 'rate_profit'], 'integer'],
[['text', 'state', 'attendant_products'], 'string'], [['text', 'state', 'attendant_products'], 'string'],
[['admin_id'], 'adminIdValidate'], [['admin_id'], 'adminIdValidate'],
[['date', 'answer', 'good', 'bad', 'date_create', 'notification_date', 'rate_usability', 'rate_loyality', 'rate_profit', 'title', 'order'], 'safe'], [['date', 'answer', 'good', 'bad', 'date_create', 'notification_date', 'rate_usability', 'rate_loyality', 'rate_profit', 'title', 'order'], 'safe'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment