'topic-form',
'options' => ['class' => 'form-horizontal', 'enctype' => 'multipart/form-data']]);
$brightness = 60;
if( trim($model->ext) != ''){
$ext = json_decode(trim($model->ext));
if( isset($ext->brightness) ){
$brightness = $ext->brightness;
}
}
?>
if($model->id){
$imageSrc = "/topic-images/".$model->id."_sizehd.jpg?r=".rand();
}else{
$imageSrc = '/img/e.gif';
}
?>
echo CropperjsWidget::widget(['image' => 'image', 'file' => 'NewsTopic[photo]', 'post' => 'cropping', 'aspectRatio' => '13 / 5']);
?>
echo $form->field($model, 'url')->textInput([
'maxlength' => true,
'class' => 'form-control js-word-count-input',
'placeholder' => 'URL'
])->label('URL часть адреса рездела');
echo $form->field($model, 'title')->textInput([
'maxlength' => true,
'class' => 'form-control js-word-count-input',
'placeholder' => 'Заголовок',
// 'id' => 'js-news-content'
])->label('Заголовок рубрики');
echo $form->field($model, 'meta_title')->textInput([
'maxlength' => true,
'class' => 'form-control js-word-count-input',
'placeholder' => 'Заголовок SEO'
])->label('Заголовок SEO');
echo $form->field($model, 'description')->textarea([
'maxlength' => true,
'class' => 'form-control js-word-count-input',
'placeholder' => 'description'
])->label('Описание раздела кратко');
echo $form->field($model, 'keywords')->textarea([
'maxlength' => true,
'class' => 'form-control js-word-count-input',
'placeholder' => 'ключевые слова'
])->label('ключевые слова через запятую');
?>
echo $form->field($model, 'active')->checkbox([
'class' => 'form-check-input',
'label' => 'Активный'
]);
//($model->show == 'Y')?true:false,
echo $form->field($model, 'show')->checkbox([
'class' => 'form-check-input',
'label' => 'Показывать везде',
'uncheck' => 'N',
'checked' => ($model->show == 'Y')?true:false
]);
?>
echo Html::submitButton('Send', ['class' => 'btn btn-success']);
?>
ActiveForm::end();