<?php echo $form->field($model, 'name')->textInput(['maxlength' => true]); ?> <?php //= $form->field($model, 'slug')->textInput(['maxlength' => true]) ?> <?php echo $form->field($model, 'prev_img')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'status')->widget(Switchery::classname(), ['name' => 'status', 'clientOptions' => ['color' => '#64bd63', 'secondaryColor' => '#dfdfdf', 'jackColor' => '#fff', 'jackSecondaryColor' => null, 'className' => 'switchery js-switch', 'disabled' => false, 'disabledOpacity' => 0.5, 'speed' => '0.3s', 'size' => 'default']])->label(false); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
</div> <div class="col-md-12"> <?= $form->field($model, 'image[]')->widget(BootstrapFileInput::className(), [ 'options' => ['accept' => 'image/*', 'multiple' => true], 'clientOptions' => [ 'previewFileType' => 'text', 'browseClass' => 'btn btn-success', 'uploadClass' => 'btn btn-info', 'removeClass' => 'btn btn-danger', 'removeIcon' => '<i class="glyphicon glyphicon-trash"></i> ' ] ]);?> <?=$form->field($model, 'status')->widget(Switchery::classname(), [ 'clientOptions' => [ 'color' => '#64bd63', 'secondaryColor' => '#dfdfdf', 'jackColor' => '#fff', 'jackSecondaryColor' => null, 'className' => 'switchery js-switch', 'disabled' => false, 'disabledOpacity' => 0.5, 'speed' => '0.3s', 'size' => 'default', ], ])->label(false);?>
echo $form->field($model, 'value')->textarea(['rows' => 6]); ?> </div> </div> <!-- /.box --> </div> </div> <!-- --><?php /*= $form->field($model, 'active')->textInput() */ ?> <?php echo $form->field($model, 'active')->widget(Switchery::classname(), ['name' => 'active', 'clientOptions' => ['color' => '#64bd63', 'secondaryColor' => '#dfdfdf', 'jackColor' => '#fff', 'jackSecondaryColor' => null, 'className' => 'switchery js-switch', 'disabled' => false, 'disabledOpacity' => 0.5, 'speed' => '0.3s', 'size' => 'default'], 'clientChangeEvent' => new JsExpression('function() { alert("checked: " + this.checked); }')])->label(false); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>