Fix reviews

parent bb6ad369
......@@ -28,12 +28,12 @@ class ReviewAdminController extends AdminController
public static function actionsTitles() {
return [
"Create" => "Добавление группы",
"Update" => "Редактирование группы",
"View" => "Просмотр группы",
"Manage" => "Управление группами",
"Delete" => "Удаление группы",
"Updateanswer" => "Ответить",
"Create" => "Добавление отзыва",
"Update" => "Редактирование отзыва",
"View" => "Просмотр отзыва",
"Manage" => "Управление отзывами",
"Delete" => "Удаление отзыва",
"Update-answer" => "Ответить",
];
}
......@@ -42,7 +42,8 @@ class ReviewAdminController extends AdminController
* $id integer
* @return mixed
*/
public function actionUpdateanswer($id) {
public function actionUpdateAnswer($id)
{
$model = $this->findModel($id);
\yii::$app->controller->page_title = 'Ответ на отзыв <small>'.$model->user->email.'</small>';
......
......@@ -21,10 +21,6 @@ return [
'type' => 'dropdownlist',
'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',],
'text' => ['type' => 'textarea', 'class' => 'form-control'],
'<a id="doAnswer" style="cursor: pointer;" onclick="$(this).next().next().slideToggle(); return false;">Ответить</a>' .
......
......@@ -91,8 +91,8 @@ class Reviews extends \common\components\ActiveRecordModel
public function rules()
{
return [
[['user_id', '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'],
[['text', 'state', 'date', 'notification_send', 'show_in_module'], 'required'],
[['admin_id', 'priority', 'notification_send', 'order', 'cat_id', 'show_in_module', 'rate_usability', 'rate_loyality', 'rate_profit'], 'integer'],
[['text', 'state', 'attendant_products'], 'string'],
[['admin_id'], 'adminIdValidate'],
[['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