예제 #1
0
use yii\widgets\ActiveForm;
use common\models\dota\DotaEvent;
/* @var $this yii\web\View */
/* @var $model common\models\dota\DotaFantasy */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="dota-fantasy-form">

    <?php 
$form = ActiveForm::begin();
?>
    
    <div class="row">
        <div class="col-lg-4"><?php 
echo $form->field($model, 'event_id')->dropDownList(DotaEvent::getEventsListDropDown(), [$model->event_id]);
?>
</div>
        <div class="col-lg-4"><?php 
echo $form->field($model, 'finished')->dropDownList($model->finishedValues, [$model->finished]);
?>
</div>
        <div class="col-lg-4"></div>
    </div>

    <div class="row">
        <div class="col-lg-4"><?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
</div>
        <div class="col-lg-4"><?php 
예제 #2
0
 public function getEventsList()
 {
     return DotaEvent::getEventsListDropDown();
 }