public function renderKategoriOpt($rakId)
 {
     $kategori = CetakStockOpnameForm::getKategoriRak($rakId);
     /* fixme: pindahkan ke view */
     echo '<option>[Semua Kategori]</option>';
     foreach ($kategori as $key => $value) {
         echo '<option value="' . $key . '">' . $value . '</option>';
     }
 }
Exemple #2
0
<div class="row">
    <div class="small-12 large-6 columns">
        <div class="row collapse">
            <label>Rak</label>
            <div class="small-9 columns">
                <?php echo CHtml::textField('rak', empty($model->rakId) ? '' : $model->namaRak, ['size' => 60, 'maxlength' => 500, 'disabled' => 'disabled']); ?>
            </div>
            <div class="small-3 columns">
                <a class="tiny bigfont button postfix" id="tombol-browse-rak" accesskey="h">Pili<span class="ak">h</span>..</a>
            </div>
        </div>   
        <?php echo $form->error($model, 'rakId', array('class' => 'error')); ?>     
    </div>
    <div class="small-12 large-6 columns">
        <?php echo $form->labelEx($model, 'kategoriId'); ?>
        <?php echo $form->dropDownList($model, 'kategoriId', empty($model->rakId) ? [] : CetakStockOpnameForm::getKategoriRak($model->rakId)); ?>
        <?php echo $form->error($model, 'kategoriId', ['class' => 'error']); ?>
    </div>
    <div class="small-12 large-6 columns">
        <?php echo $form->labelEx($model, 'sortBy'); ?>
        <?php echo $form->dropDownList($model, 'sortBy', CetakStockOpnameForm::listOfSortBy()); ?>
        <?php echo $form->error($model, 'sortBy', ['class' => 'error']); ?>
    </div>
    <div class="small-12 large-6 columns">
        <?php echo $form->labelEx($model, 'kertas'); ?>
        <?php echo $form->dropDownList($model, 'kertas', CetakStockOpnameForm::listKertas()); ?>
        <?php echo $form->error($model, 'kertas', ['class' => 'error']); ?>
    </div>
</div>

<div class="row">