Example #1
0
?>

<div class="coa-form col-lg-6">

    <?php 
$form = ActiveForm::begin();
?>
    <div class="panel panel-primary">
        <div class="panel-heading">Chart of Account</div>
        <div class="panel-body">
            <?php 
// $form->field($model, 'coa_type')->dropDownList(Coa::getCoaType(), ['style' => 'width:180px;'])
?>

            <?php 
echo $form->field($model, 'id_coa_parent')->dropDownList(Helper::getGroupedCoaList(true));
?>
            
            <?php 
echo $form->field($model, 'cd_account')->textInput(['maxlength' => 16, 'style' => 'width:180px;']);
?>

            <?php 
echo $form->field($model, 'nm_account')->textInput(['maxlength' => 64]);
?>

            <?php 
//            $el_id = Html::getInputId($model, 'id_coa_parent');
//            $field = $form->field($model, "id_coa_parent", ['template' => "{label}\n{input}{text}\n{hint}\n{error}"]);
//            $field->labelOptions['for'] = $el_id;
//            $field->hiddenInput(['id' => 'id_coa_parent']);
Example #2
0
        </div>
    </div>
</div>
<?php 
ActiveForm::end();
Modal::begin(['id' => 'myModal', 'header' => '<h2 class="modal-title">Entri-Sheet Detail</h2>@' . $model->nm_esheet]);
$esd_model = new EntriSheetDtl();
$form2 = ActiveForm::begin();
?>
<div class="modal-body">
    <?php 
echo $form->field($esd_model, 'id_esheet')->hiddenInput(['value' => $model->id_esheet])->label(false);
?>
    <?php 
//$dcoa = new Coa;
$list = Helper::getGroupedCoaList();
//$list = ['Swedish Cars' => ['1' => 'volvo', '2' => 'Saab'], 'German Cars' => ['3' => 'Mercedes']];
//$list = ArrayHelper::map(Coa::find()->orderBy('cd_account ASC')->all(), 'id_coa', 'nm_account');
?>
    <?php 
echo $form2->field($esd_model, 'id_coa')->dropDownList($list);
?>
    <?php 
echo $form2->field($esd_model, 'nm_esheet_dtl')->textInput(['style' => 'width:160px;']);
?>
</div>    
<div class="form-group modal-footer" style="text-align: right; padding-bottom: 0px;">
    <?php 
echo Html::submitButton($esd_model->isNewRecord ? 'Create' : 'Update', ['class' => $esd_model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>