Commit 73983f4d36e7c53a0530a201a79e6fd8ce288c99

Authored by Anastasia
1 parent 295dcf32

class for comment button

Showing 2 changed files with 11 additions and 2 deletions   Show diff stats
views/artbox_comment_form.php
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 * @var string $formId 14 * @var string $formId
15 * @var View $this 15 * @var View $this
16 * @var RatingModel|NULL $rating_model 16 * @var RatingModel|NULL $rating_model
  17 + * @var string $buttonClass
17 */ 18 */
18 $form = ActiveForm::begin( 19 $form = ActiveForm::begin(
19 [ 20 [
@@ -59,9 +60,10 @@ @@ -59,9 +60,10 @@
59 echo Html::tag( 60 echo Html::tag(
60 'div', 61 'div',
61 Html::submitButton( 62 Html::submitButton(
62 - Yii::t('app', 'Submit comment') 63 + Yii::t('app', 'Submit comment'),
  64 + (!empty($buttonClass) ? ['class' => $buttonClass] : [])
63 ), 65 ),
64 - [ 'class' => 'input_bl submit_btn' ] 66 + [ 'class' => 'input_bl submit_btn' ]
65 ); 67 );
66 ?> 68 ?>
67 </div> 69 </div>
widgets/CommentWidget.php
@@ -215,6 +215,12 @@ @@ -215,6 +215,12 @@
215 /** 215 /**
216 * Initializes the widget params. 216 * Initializes the widget params.
217 */ 217 */
  218 +
  219 + /**
  220 + * Class for button
  221 + * @var string
  222 + */
  223 + public $buttonClass = '';
218 public function init() 224 public function init()
219 { 225 {
220 // Module init 226 // Module init
@@ -384,6 +390,7 @@ @@ -384,6 +390,7 @@
384 'model' => $this->getModel(), 390 'model' => $this->getModel(),
385 'formId' => $this->formId, 391 'formId' => $this->formId,
386 'rating_model' => $ratingModel, 392 'rating_model' => $ratingModel,
  393 + 'buttonClass' => $this->buttonClass
387 394
388 ] 395 ]
389 ), 396 ),