<?php use yii\helpers\Html; use app\models\Preferences; use yii\widgets\ActiveForm; ?> <div class="preferences"> <?php echo $form->field($model, 'durations')->checkboxlist(Preferences::getDurationsList()); ?> <?php echo $form->field($model, 'workTypes')->checkboxlist(Preferences::getWorkTypesList()); ?> <?php echo !$no_courses ? $form->field($model, 'courses')->checkboxlist(Preferences::getCoursesList()) : ""; ?> </div>
<?php use yii\helpers\Html; use app\controllers\extensions\RoleBasedActiveForm; use app\models\Preferences; /* @var $this yii\web\View */ /* @var $preferences app\models\Preferences */ /* @var $form app\controllers\extensions\RoleBasedActiveForm */ ?> <?php $form = RoleBasedActiveForm::begin(); ?> <?php echo $form->field($preferences, 'courses')->checkboxlist(Preferences::getCoursesList()); ?> <?php echo $form->field($preferences, 'workTypes')->checkboxlist(Preferences::getWorkTypesList()); ?> <?php echo $form->field($preferences, 'durations')->checkboxlist(Preferences::getDurationsList()); ?> <style> .form-group { float: left;