<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;

use common\modules\bids\models\Bid;
?>

<div class="subsc_blog">
    <h2 class="subsc_blog_title"><?=\Yii::t('form', 'Liked? Subscribe up for updates!')?></h2>
    <div class="subsc_blog_txt"><?=\Yii::t('form', 'We will try to publish this section only useful and unique content for the market. Subscription allow to be the first to get notification about fresh articles.')?></div>

	<?php 
    $model = new Bid;
    $model->setScenario(Bid::SCENARIO_SUBSCRIBE);
    $model->form = Bid::FORM_SUBSCRIBE;

    $form = ActiveForm::begin([
        'action' => '/bids/bid/blogAdd',
        'enableClientValidation' => false,
        'options' => [
            'class' => 'subsc_blog_form bids-form',
            'data-title' => $title,
            'data-form' => 'Подпись на обновления в блоге',
            'data-tag' => Bid::TAG_INVOLVEMENT
        ],
    ]); ?>

        <div class="message-box send_secce">Теперь вы подписаны на обновления блога.</div>

        <div class="content">
    
        	<?php echo Html::hiddenInput('scenario', $model->scenario, ['class' => 'not_clear']); ?>

            <?php echo $form->field($model, 'form', ['template' => '{input}'])->hiddenInput(['class' => 'not_clear']); ?>

            <?php echo $form->field($model, 'email', [
                'template' => '<div class="row"><div class="col-sm-4">{input}</div></div>',
                'errorOptions' => []
            ])->textInput([
                'placeholder' => 'E-mail*'
            ]); ?>

            <?php echo Html::submitButton(\Yii::t('form', 'Subscribe'), ['class' => 'save-button']); ?>

        </div>

    <?php ActiveForm::end(); ?>

</div>