diff --git a/views/artbox_comment_form.php b/views/artbox_comment_form.php index 46b8132..108e3fd 100755 --- a/views/artbox_comment_form.php +++ b/views/artbox_comment_form.php @@ -14,6 +14,7 @@ * @var string $formId * @var View $this * @var RatingModel|NULL $rating_model + * @var string $buttonClass */ $form = ActiveForm::begin( [ @@ -59,9 +60,10 @@ echo Html::tag( 'div', Html::submitButton( - Yii::t('app', 'Submit comment') + Yii::t('app', 'Submit comment'), + (!empty($buttonClass) ? ['class' => $buttonClass] : []) ), - [ 'class' => 'input_bl submit_btn' ] + [ 'class' => 'input_bl submit_btn' ] ); ?> diff --git a/widgets/CommentWidget.php b/widgets/CommentWidget.php index 0c47bd6..c12cd3f 100755 --- a/widgets/CommentWidget.php +++ b/widgets/CommentWidget.php @@ -215,6 +215,12 @@ /** * Initializes the widget params. */ + + /** + * Class for button + * @var string + */ + public $buttonClass = ''; public function init() { // Module init @@ -384,6 +390,7 @@ 'model' => $this->getModel(), 'formId' => $this->formId, 'rating_model' => $ratingModel, + 'buttonClass' => $this->buttonClass ] ), -- libgit2 0.21.4