diff --git a/common/modules/comment/Controller.php b/common/modules/comment/Controller.php index bf806d6..6b39f7c 100644 --- a/common/modules/comment/Controller.php +++ b/common/modules/comment/Controller.php @@ -3,13 +3,16 @@ class Controller extends \yii\web\Controller { + + public $enableCsrfValidation = false; + public function behaviors() { return [ 'verbs' => [ - 'class' => \yii\filters\VerbFilter::className(), + 'class' => \yii\filters\VerbFilter::className(), 'actions' => [ - '*' => ['post'], + '*' => [ 'post' ], ], ], ]; @@ -20,25 +23,25 @@ \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; $post = \Yii::$app->request->post('Comment'); $get = \Yii::$app->request->get(); - if(empty($post['comment_id']) && !empty($get['comment_id'])) { - $post['comment_id'] = $get['comment_id']; + if(empty( $post[ 'comment_id' ] ) && !empty( $get[ 'comment_id' ] )) { + $post[ 'comment_id' ] = $get[ 'comment_id' ]; } - if(!empty($post['comment_id'])) { - if($model = \common\modules\comment\models\Comment::findOne($post['comment_id'])) { + if(!empty( $post[ 'comment_id' ] )) { + if($model = \common\modules\comment\models\Comment::findOne($post[ 'comment_id' ])) { /** * @var \common\modules\comment\models\Comment $model */ $model->scenario = is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST; if($model->deleteComment()) { - \Yii::$app->response->data = ['text' => 'Comment marked as deleted and will be check by administrators']; + \Yii::$app->response->data = [ 'text' => 'Comment marked as deleted and will be check by administrators' ]; } else { - \Yii::$app->response->data = ['error' => $model->hasErrors('comment_id')?$model->getFirstError('comment_id'):'Cannot delete message']; + \Yii::$app->response->data = [ 'error' => $model->hasErrors('comment_id') ? $model->getFirstError('comment_id') : 'Cannot delete message' ]; } - }else { - \Yii::$app->response->data = ['error' => 'Comment not found']; + } else { + \Yii::$app->response->data = [ 'error' => 'Comment not found' ]; }; } else { - \Yii::$app->response->data = ['error' => 'Missing comment_id']; + \Yii::$app->response->data = [ 'error' => 'Missing comment_id' ]; } \Yii::$app->response->send(); } @@ -47,55 +50,80 @@ { \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; $post = \Yii::$app->request->post(); - if(!empty($post['Comment']['comment_id'])) { - if($model = \common\modules\comment\models\Comment::findOne($post['Comment']['comment_id'])) { + if(!empty( $post[ 'Comment' ][ 'comment_id' ] )) { + if($model = \common\modules\comment\models\Comment::findOne($post[ 'Comment' ][ 'comment_id' ])) { /** * @var \common\modules\comment\models\Comment $model */ $model->scenario = is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST; $model->load($post); - if(empty($post['Comment']['comment_pid'])) { - $model->comment_pid = null; + if(empty( $post[ 'Comment' ][ 'comment_pid' ] )) { + $model->comment_pid = NULL; } if($model->updateComment()) { - \Yii::$app->response->data = ['text' => 'Comment successfully updated']; + $model->rating->load($post); + if($model->rating->save()) { + return [ + 'result' => [ + 'text' => 'Comment successfully updated', + 'html' => $this->renderAjax('@common/modules/comment/widgets/views/_review_comment_view', [ 'model' => $model ]), + ], + ]; + } else { + return [ + 'error' => $model->hasErrors() ? $model->getFirstErrors() : 'Cannot update message', + 'form' => $this->renderAjax('@common/modules/comment/widgets/views/form-comment-review', [ + 'model' => $model, + ]), + ]; + } } else { - \Yii::$app->response->data = ['error' => $model->hasErrors()?$model->getFirstErrors():'Cannot update message']; + return [ + 'error' => $model->hasErrors() ? $model->getFirstErrors() : 'Cannot update message', + 'form' => $this->renderAjax('@common/modules/comment/widgets/views/form-comment-review', [ + 'model' => $model, + ]), + ]; } - }else { - \Yii::$app->response->data = ['error' => 'Comment not found']; - }; + } else { + return [ 'error' => 'Comment not found' ]; + } } else { - \Yii::$app->response->data = ['error' => 'Missing comment_id']; + return [ 'error' => 'Missing comment_id' ]; } - \Yii::$app->response->send(); } public function actionForm() { + \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; $post = \Yii::$app->request->post('Comment'); - if(!empty($post['comment_id'])) { - $model = \common\modules\comment\models\Comment::find()->where(['comment_id' => $post['comment_id']])->with('parent', 'author')->one(); + if(!empty( $post[ 'comment_id' ] )) { + $model = \common\modules\comment\models\Comment::find() + ->where([ 'comment_id' => $post[ 'comment_id' ] ]) + ->with('parent', 'author') + ->one(); if($model) { /** * @var \common\modules\comment\models\Comment $model */ $model->scenario = is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST; if($model->checkUpdate()) { - return $this->renderAjax('@common/modules/comment/views/comment_form', [ - 'model' => $model, - ]); + return [ + 'result' => [ + 'form' => $this->renderAjax('@common/modules/comment/widgets/views/form-comment-review', [ + 'model' => $model, + ]), + ], + ]; } else { - \Yii::$app->response->data = ['error' => 'You are not able to update this comment']; + return [ 'error' => 'You are not able to update this comment' ]; } - }else { - \Yii::$app->response->data = ['error' => 'Comment not found']; - }; + } else { + return [ 'error' => 'Comment not found' ]; + } } else { - \Yii::$app->response->data = ['error' => 'Missing comment_id']; + return [ 'error' => 'Missing comment_id' ]; } - \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; - \Yii::$app->response->send(); } } \ No newline at end of file diff --git a/common/modules/comment/assets/CommentAsset.php b/common/modules/comment/assets/CommentAsset.php index 3db5e5c..1167f8d 100644 --- a/common/modules/comment/assets/CommentAsset.php +++ b/common/modules/comment/assets/CommentAsset.php @@ -20,7 +20,7 @@ ]; public $jsOptions = [ - 'position' => \yii\web\View::POS_READY, + 'position' => \yii\web\View::POS_HEAD, ]; } \ No newline at end of file diff --git a/common/modules/comment/models/Comment.php b/common/modules/comment/models/Comment.php index b721a80..2b2370b 100644 --- a/common/modules/comment/models/Comment.php +++ b/common/modules/comment/models/Comment.php @@ -22,6 +22,7 @@ * @property int $model_id * @property Rating $rating * @property User $user + * @property User $author * @package common\modules\comment\models */ class Comment extends \yii\db\ActiveRecord @@ -206,7 +207,7 @@ return false; } else { if($this->update()) { - $this->clearSafe(); + // $this->clearSafe(); Clears safe attributes after AJAX update return true; } else { return false; @@ -271,9 +272,11 @@ return \Yii::$app->user->can(\common\modules\comment\Permissions::UPDATE, [ 'model' => $this->model, 'model_id' => $this->model_id, + 'comment' => $this, ]) || \Yii::$app->user->can(\common\modules\comment\Permissions::UPDATE_OWN, [ 'model' => $this->model, 'model_id' => $this->model_id, + 'comment' => $this, ]); } } @@ -283,15 +286,24 @@ if($this->scenario == self::SCENARIO_GUEST) { return false; } else { - return (\Yii::$app->user->can(\common\modules\comment\Permissions::DELETE, [ - 'model' => $this->model, - 'model_id' => $this->model_id, - 'comment' => $this, - ]) || \Yii::$app->user->can(\common\modules\comment\Permissions::DELETE_OWN, [ - 'model' => $this->model, - 'model_id' => $this->model_id, - 'comment' => $this, - ])); + return ( \Yii::$app->user->can(\common\modules\comment\Permissions::DELETE, [ + 'model' => $this->model, + 'model_id' => $this->model_id, + 'comment' => $this, + ]) || \Yii::$app->user->can(\common\modules\comment\Permissions::DELETE_OWN, [ + 'model' => $this->model, + 'model_id' => $this->model_id, + 'comment' => $this, + ]) ); + } + } + + public function checkReply() + { + if($this->scenario == self::SCENARIO_GUEST) { + return false; + } else { + return $this->allowReply; } } @@ -310,6 +322,15 @@ return $this->hasOne(self::className(), [ 'comment_id' => 'comment_pid' ]); } + public function getAuthorName() + { + if(!empty( $this->author )) { + return $this->author->name; + } else { + return $this->user_name; + } + } + public function getAuthor() { // if($this->user_id != NULL) { @@ -378,6 +399,23 @@ 'comment_id' => $this->comment_id, ]); } + if($this->checkUpdate()) { + $this->buttons[ 'update' ] = Url::to([ + 'artbox-comment/update', + 'comment_id' => $this->comment_id, + ]); + } + if($this->checkReply()) { + $this->buttons[ 'reply' ] = Url::to([ + 'artbox-comment/reply', + 'comment_id' => $this->comment_id, + ]); + } + } + + public function getAllowReply() + { + return $this->hasAttribute('comment_pid'); } } diff --git a/common/modules/comment/rbac/ArtboxCommentUpdateOwnRule.php b/common/modules/comment/rbac/ArtboxCommentUpdateOwnRule.php index 7d921e3..edfd0b2 100644 --- a/common/modules/comment/rbac/ArtboxCommentUpdateOwnRule.php +++ b/common/modules/comment/rbac/ArtboxCommentUpdateOwnRule.php @@ -11,6 +11,9 @@ public function execute($user, $item, $params) { + if($params['comment']->user_id == \Yii::$app->user->id) { + return true; + } return false; } diff --git a/common/modules/comment/rbac/ArtboxCommentUpdateRule.php b/common/modules/comment/rbac/ArtboxCommentUpdateRule.php index 2b14e44..536ac3f 100644 --- a/common/modules/comment/rbac/ArtboxCommentUpdateRule.php +++ b/common/modules/comment/rbac/ArtboxCommentUpdateRule.php @@ -11,7 +11,7 @@ public function execute($user, $item, $params) { - return true; + return false; } } \ No newline at end of file diff --git a/common/modules/comment/resources/comment.css b/common/modules/comment/resources/comment.css index 2577fa1..7e37fce 100644 --- a/common/modules/comment/resources/comment.css +++ b/common/modules/comment/resources/comment.css @@ -16,4 +16,25 @@ height: 13px; top: 0; cursor: pointer; -} \ No newline at end of file +} +.removeable { + color: #a94442; + background-color: #f2dede; + border-color: #ebccd1; + border-radius: 4px; + padding: 15px; + padding-right: 35px; + position: relative; +} +.removeable::after { + content: ' '; + display: block; + position: absolute; + right: 5px; + top: 5px; + width: 15px; + height: 15px; + background: url('delete-ico.png'); + background-size: cover; + cursor: pointer; +} diff --git a/common/modules/comment/resources/comment.js b/common/modules/comment/resources/comment.js index f853007..27572ef 100644 --- a/common/modules/comment/resources/comment.js +++ b/common/modules/comment/resources/comment.js @@ -1,89 +1,115 @@ $(function() { - $(document).on('click', '.artbox_comment_delete', function() { + $(document).on('click', '.artbox_comment_container .removeable', function(e) { + e.preventDefault(); var container = $(this).parents('.artbox_comment_container'); - var comment_id = $(container).data('comment_id'); - var form_name = $(container).data('form_name'); - if(confirm("Уверены, что хотите удалить комментарий?")) { - $.post( - '/artbox-comment/delete', - { - Comment: { - comment_id: comment_id - } - }, - function(data, textStatus, jqXHR) { - if(!data.error) { - $(container).after('

'+data.text+'

'); - $(container).remove(); - } else { - $(container).prepend('

'+data.error+'

') + $(container).remove(); + }); + + $(document).on( + 'click', '.artbox_comment_delete', function(e) + { + e.preventDefault(); + var container = $(this).parents('.artbox_comment_container'); + var comment_id = $(container).data('key'); + var form_name = $(container).data('form'); + if(confirm("Уверены, что хотите удалить комментарий?")) + { + $.post( + '/artbox-comment/delete', { + Comment : { + comment_id : comment_id + } + }, function(data, textStatus, jqXHR) + { + if(!data.error) + { + $(container).empty(); + $(container).append('

' + data.text + '

'); + } else + { + $(container).prepend('

' + data.error + '

') + } } + ); + } + } + ); + + $(document).on( + 'click', '.artbox_comment_reply', function(e) + { + e.preventDefault(); + var container = $(this).parents('.artbox_comment_container').first(); + var comment_id = $(container).data('key'); + var form_name = $(container).data('form'); + var author = $(container).find('.artbox_comment_author').first().text(); + var comment_form = $(container).parents('.artbox_comment_widget').find('.artbox_comment_form').first(); + var offset = $(comment_form).offset(); + var reply_block = $(comment_form).find('.artbox_comment_reply_block').first(); + $(reply_block).empty(); + $(reply_block).append(''); + $(reply_block).append('

' + author + '

'); + $('html, body').animate( + { + scrollTop : offset.top - 50, } ); } - }); + ); - $(document).on('click', '.artbox_comment_reply', function() { - var container = $(this).parents('.artbox_comment_container').first(); - var comment_id = $(container).data('comment_id'); - var form_name = $(container).data('form_name'); - var author = $(container).find('.artbox_comment_author').first().text(); - var comment_form = $('.artbox_comment_form').first(); - var offset = $(comment_form).offset(); - var reply_block = $(comment_form).find('.artbox_comment_reply_block').first(); - $(reply_block).empty(); - $(reply_block).append(''); - $(reply_block).append('

'+author+'

'); - $('html, body').animate({ - scrollTop: offset.top - 50, - }); - }); - - $(document).on('click', '.artbox_comment_reply_author', function() { - $(this).parents('.artbox_comment_reply_block').first().empty(); - }); + $(document).on( + 'click', '.artbox_comment_reply_author', function() + { + $(this).parents('.artbox_comment_reply_block').first().empty(); + } + ); - $(document).on('click', '.artbox_comment_update', function() { - $(this).removeClass('artbox_comment_update'); - $(this).text('Сохранить'); - $(this).addClass('artbox_comment_update_submit'); - var container = $(this).parents('.artbox_comment_container').first(); - var comment_id = $(container).data('comment_id'); - var form_name = $(container).data('form_name'); - var text = $(container).find('.artbox_comment_text'); - var object = {}; - object[form_name] = {comment_id: comment_id}; - $.post( - '/artbox-comment/form', - object, - function(data, textStatus, jqXHR) { - $(text).hide(); - $(text).after( - '
' - + data - + '
' - ); - } - ); - }); + $(document).on( + 'click', '.artbox_comment_update', function(e) + { + e.preventDefault(); + var container = $(this).parents('.artbox_comment_container').first(); + var comment_id = $(container).data('key'); + var form_name = $(container).data('form'); + var object = {}; + object[form_name] = {comment_id : comment_id}; + $.post( + '/artbox-comment/form', object, function(data, textStatus, jqXHR) + { + $(container).empty(); + $(container).append(data.result.form); + } + ); + } + ); - $(document).on('click', '.artbox_comment_update_reply', function() { - $(this).remove(); - }); + // @TODO What is this + $(document).on( + 'click', '.artbox_comment_update_reply', function() + { + $(this).remove(); + } + ); - $(document).on('click', '.artbox_comment_update_submit', function(e) { - e.preventDefault(); - var container = $(this).parents('.artbox_comment_container').first(); - var edit = $(container).find('.artbox_comment_text_edit').first(); - $.post( - '/artbox-comment/update', - $(edit).find('form').serialize(), - function(data) { - if(!data.error) { - location.reload(true); + $(document).on( + 'click', '.artbox_comment_update_submit', function(e) + { + e.preventDefault(); + var container = $(this).parents('.artbox_comment_container').first(); + $.post( + '/artbox-comment/update', $(container).find('form').serialize(), function(data) + { + $(container).empty(); + if(!data.error) + { + $(container).append('

'+data.result.text+'

'); + $(container).append(data.result.html); + } else { + $(container).append(data.form); + } } - } - ) - }); -}); \ No newline at end of file + ) + } + ); +}); diff --git a/common/modules/comment/widgets/CommentWidget.php b/common/modules/comment/widgets/CommentWidget.php index 9c9dd6e..726bf94 100644 --- a/common/modules/comment/widgets/CommentWidget.php +++ b/common/modules/comment/widgets/CommentWidget.php @@ -1,6 +1,7 @@ 'artbox_comment_container', + 'comment_delete' => 'artbox_comment_delete', + 'comment_reply' => 'artbox_comment_reply', + 'comment_author' => 'artbox_comment_author', + 'widget_container' => 'artbox_comment_widget', + 'form_container' => 'artbox_comment_form', + 'reply_block' => 'artbox_comment_reply_block', + 'reply_author' => 'artbox_comment_reply_author', + 'comment_update' => 'artbox_comment_update', + 'comment_update_submit' => 'artbox_comment_update_submit', + ]; + + /** * @var null|\yii\web\View */ public $context = NULL; @@ -50,6 +76,7 @@ * @var bool Whether to allow one user post multiple comments */ public $allow_multiple = true; + public $allow_reply = true; /** * @var array Options sent to list part @@ -170,6 +197,11 @@ if($this->display_comment_form && $this->comment_class->checkCreate()) { $tag = ArrayHelper::remove($this->form_options, 'tag', 'div'); $view = ArrayHelper::remove($this->form_options, 'view'); + if(!empty($this->form_options['class'])) { + $this->form_options['class'] .= ' '.self::$baseClass['form_container']; + } else { + $this->form_options['class'] = self::$baseClass['form_container']; + } $this->parts[ 'form' ] = Html::tag($tag, $this->renderForm($view), $this->form_options); } } @@ -178,6 +210,11 @@ { $this->dataProvider = new \yii\data\ActiveDataProvider([ 'query' => $this->comment_class->getComments($this->model, $this->model_id), + 'sort' => new Sort([ + 'defaultOrder' => [ + 'date_add' => SORT_DESC, + ], + ]), 'pagination' => [ 'pageSize' => 10, ], @@ -189,7 +226,10 @@ if(empty( $view )) { throw new \yii\base\InvalidConfigException("list_options[view] must be set"); } - return $this->render($view, [ 'dataProvider' => $this->dataProvider ]); + return $this->render($view, [ + 'dataProvider' => $this->dataProvider, + 'commentClass' => $this->comment_class, + ]); } public function renderForm($view) @@ -197,7 +237,7 @@ if(empty( $view )) { throw new \yii\base\InvalidConfigException("form_options[view] must be set"); } - if($this->comment_class->guestComment || !empty(\Yii::$app->user->identity)) { + if($this->comment_class->guestComment || !empty( \Yii::$app->user->identity )) { return $this->render($view, [ 'model' => $this->comment_class, 'rating' => $this->rating_class, @@ -218,6 +258,11 @@ $template = preg_replace('/{list}/', ArrayHelper::remove($parts, 'list', ''), $template); $template = preg_replace('/{form}/', ArrayHelper::remove($parts, 'form', ''), $template); $tag = ArrayHelper::remove($options, 'tag', 'div'); + if(!empty($options['class'])) { + $options['class'] .= ' '.self::$baseClass['widget_container']; + } else { + $options['class'] = self::$baseClass['widget_container']; + } return Html::tag($tag, $template, $options); } @@ -233,4 +278,5 @@ } } } + } \ No newline at end of file diff --git a/common/modules/comment/widgets/views/_review_comment_view.php b/common/modules/comment/widgets/views/_review_comment_view.php index 3f1b93c..d106429 100644 --- a/common/modules/comment/widgets/views/_review_comment_view.php +++ b/common/modules/comment/widgets/views/_review_comment_view.php @@ -1,8 +1,11 @@ user; $model->buildButtons(); ?> -
name ?>
+
name ?>
@@ -37,12 +40,27 @@
buttons['delete'])) { - echo Html::a('Удалить', $model->buttons['delete'], ['data-method' => 'post', 'data-confirm' => 'Really?']); + if(!empty( $model->buttons[ 'delete' ] )) { + echo Html::a('Удалить', $model->buttons[ 'delete' ], [ 'class' => CommentWidget::$baseClass[ 'comment_delete' ] ]); + } + if(!empty( $model->buttons[ 'update' ] )) { + echo Html::a('Редактировать', $model->buttons[ 'update' ], [ 'class' => CommentWidget::$baseClass[ 'comment_update' ] ]); + } + if(!empty( $model->buttons[ 'reply' ] )) { + echo Html::a('Ответить', $model->buttons[ 'reply' ], [ 'class' => CommentWidget::$baseClass[ 'comment_reply' ] ]); } ?>
isNewRecord) { + $this->registerJs("$('div.rating').rating( + { + fx : 'full', readOnly : 'true', url : 'rating.php' + } + );"); + } +?> + diff --git a/common/modules/comment/widgets/views/form-comment-review.php b/common/modules/comment/widgets/views/form-comment-review.php index 229286c..147c598 100644 --- a/common/modules/comment/widgets/views/form-comment-review.php +++ b/common/modules/comment/widgets/views/form-comment-review.php @@ -1,20 +1,36 @@ -
-

Мнения о пользователе: totalCount ?>

+ +
+

Мнения о пользователе: totalCount ?>

+
+
field($rating, 'value') + if(!$model->isNewRecord) { + echo $form->field($model, 'comment_id') + ->hiddenInput() + ->label(false) + ->error(false); + } + echo $form->field(( !empty( $model->rating ) ? $model->rating : $rating ), 'value') ->label(false) ->radioList([ 1 => 1, @@ -43,10 +59,11 @@ ]) ->textInput(); } - - ?> -
- comment_pid )) { + echo Html::tag('div', Html::activeHiddenInput($model, 'comment_pid') . Html::tag('p', $model->parent->authorName, [ 'class' => 'artbox_comment_reply_author' ]), [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] ]); + } else { + echo Html::tag('div', '', [ 'class' => CommentWidget::$baseClass[ 'reply_block' ] ]); + } echo $form->field($model, 'text', [ 'options' => [ 'class' => 'input-blocks-comm area-comm', @@ -58,7 +75,13 @@ ->textarea(); ?>
- + isNewRecord) { + echo Html::submitButton('Добавить комментарий'); + } else { + echo Html::submitButton('Обновить комментарий', [ 'class' => CommentWidget::$baseClass[ 'comment_update_submit' ] ]); + } + ?>
end(); diff --git a/common/modules/comment/widgets/views/list-comment-review.php b/common/modules/comment/widgets/views/list-comment-review.php index 2e5eccb..0f1a1e9 100644 --- a/common/modules/comment/widgets/views/list-comment-review.php +++ b/common/modules/comment/widgets/views/list-comment-review.php @@ -1,16 +1,23 @@ $dataProvider, - 'itemView' => '_review_comment_view', - 'options' => [ - 'tag' => 'ul', - 'class' => 'proektant-comments style' - ], - 'itemOptions' => [ - 'tag' => 'li', - ], - 'layout' => "{items}\n{pager}", -]); \ No newline at end of file + use common\modules\comment\models\Comment; + use common\modules\comment\widgets\CommentWidget; + echo \yii\widgets\ListView::widget([ + 'dataProvider' => $dataProvider, + 'itemView' => '_review_comment_view', + 'options' => [ + 'tag' => 'ul', + 'class' => 'proektant-comments style', + ], + 'itemOptions' => [ + 'tag' => 'li', + 'class' => CommentWidget::$baseClass[ 'comment_container' ], + 'data' => [ + 'form' => $commentClass->formName(), + ], + ], + 'layout' => "{items}\n{pager}", + ]); \ No newline at end of file diff --git a/frontend/controllers/SiteController.php b/frontend/controllers/SiteController.php index 322272d..fe15d8b 100755 --- a/frontend/controllers/SiteController.php +++ b/frontend/controllers/SiteController.php @@ -279,15 +279,11 @@ class SiteController extends Controller $user_info->save(); - if($user->type == 2 ){ + $company_info = new CompanyInfo(); + $company_info->load(Yii::$app->request->post(), 'SignupForm'); + $company_info->user_id = $user->id; - $company_info = new CompanyInfo(); - $company_info->load(Yii::$app->request->post(),'SignupForm'); - $company_info->user_id = $user->id; - - $company_info->save(); - - } + $company_info->save(); if (Yii::$app->getUser()->login($user)) { diff --git a/server.js b/server.js new file mode 100644 index 0000000..c0aa340 --- /dev/null +++ b/server.js @@ -0,0 +1,3 @@ +/** + * Created by Ярик on 08.04.2016. + */ -- libgit2 0.21.4