Exemplo n.º 1
0
            <div class="">
                <?php 
$this->beginBlock('main');
?>


                <p></p>
                <?php 
echo $form->field($model, 'parent_id')->dropDownList((new \app\models\BudgetItem())->getTabList(), ['prompt' => Yii::t('app', 'Select')]);
?>
                <?php 
echo $form->field($model, 'currency_id')->dropDownList(app\models\Currency::getActiveCurrency(), ['prompt' => Yii::t('app', 'Select')]);
?>
                <?php 
echo $form->field($model, 'type_budget_item_id')->dropDownList(\yii\helpers\ArrayHelper::map(app\models\TypeBudgetItem::find()->all(), 'id', 'type'), ['prompt' => Yii::t('app', 'Select')]);
?>
                <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
                <?php 
echo $form->field($model, 'ammount')->textInput();
?>
                <div class="form-group">
                    <label class="control-label col-sm-3" for="budgetitem-date">Планируемая дата</label>
                    <div class="col-sm-6">
                        <?php 
echo kartik\date\DatePicker::widget(['model' => $model, 'attribute' => 'date', 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'col-sm-6']]);
?>
                    </div>
                </div>
Exemplo n.º 2
0
            <div class="">
                <?php 
$this->beginBlock('main');
?>


                <p></p>
                <?php 
echo $form->field($model, 'budget_id')->dropDownList(ArrayHelper::map(\app\models\Budget::baseQuery()->all(), 'id', 'title'), ['prompt' => Yii::t('app', 'Select')]);
?>
                <?php 
echo $form->field($model, 'currency_id')->dropDownList(app\models\Currency::getActiveCurrency(), ['prompt' => Yii::t('app', 'Select')]);
?>
                <?php 
echo $form->field($model, 'type_id')->dropDownList(ArrayHelper::merge([0 => 'Все операции'], ArrayHelper::map(app\models\TypeBudgetItem::find()->all(), 'id', 'type')), ['prompt' => Yii::t('app', 'Select')]);
?>
                <div class="form-group">
                    <label class="control-label col-sm-3" for="budgetitem-date">Период</label>
                    <div class="col-sm-6">
                        <?php 
echo DatePicker::widget(['model' => $model, 'name' => 'Report[date_from]', 'type' => DatePicker::TYPE_RANGE, 'name2' => 'Report[date_to]', 'separator' => '-', 'pluginOptions' => ['format' => 'dd.mm.yyyy', 'class' => 'col-sm-6']]);
?>
                    </div>
                </div>


                <?php 
$this->endBlock();
?>