</span> </div> <div class="widget-body"> <?php echo $form->textFieldRow($model, 'NRO_COMPROBANTE', array('maxlength' => 20)); ?> <?php echo $form->textFieldRow($model, 'VALOR', array('maxlength' => 10)); ?> <?php echo $form->dropDownListRow($model, 'BANCO_ID', array('' => ' -- Seleccione -- ') + CHtml::listData(Banco::model()->findAll(), 'ID', Banco::representingColumn())); ?> <?php echo $form->dropDownListRow($model, 'CURSO_EDICION_ID', array('' => ' -- Seleccione -- ') + CHtml::listData(CursoEdicion::model()->findAll(), 'ID', CursoEdicion::representingColumn())); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'success', 'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'))); ?> <?php $this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('AweCrud.app', 'Cancel'), 'htmlOptions' => array('onclick' => 'javascript:history.go(-1)'))); ?> </div> </div> </div>
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id, $modelClass = __CLASS__) { $model = Banco::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
?> <div id="flashMsg" class="flash-messages"> </div> <div class="widget blue"> <div class="widget-title"> <h4> <i class="icon-fire-extinguisher"></i> <?php echo Yii::t('AweCrud.app', 'Manage'); ?> <?php echo BancoDeposito::label(2); ?> </h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <!--a href="javascript:;" class="icon-remove"></a--> </span> </div> <div class="widget-body"> <?php $this->widget('bootstrap.widgets.TbGridView', array('id' => 'banco-deposito-grid', 'type' => 'striped bordered hover advance', 'dataProvider' => $model->search(), 'columns' => array('NRO_COMPROBANTE', 'VALOR', array('name' => 'BANCO_ID', 'value' => 'isset($data->bANCO) ? $data->bANCO : null', 'filter' => CHtml::listData(Banco::model()->findAll(), 'ID', Banco::representingColumn())), array('name' => 'CURSO_EDICION_ID', 'value' => 'isset($data->cURSOEDICION) ? $data->cURSOEDICION : null', 'filter' => CHtml::listData(CursoEdicion::model()->findAll(), 'ID', CursoEdicion::representingColumn())), array('class' => 'CButtonColumn', 'template' => '{update} {delete}', 'afterDelete' => 'function(link,success,data){ if(success) { $("#flashMsg").empty(); $("#flashMsg").css("display",""); $("#flashMsg").html(data).animate({opacity: 1.0}, 5500).fadeOut("slow"); } }', 'buttons' => array('update' => array('label' => '<button class="btn btn-primary"><i class="icon-pencil"></i></button>', 'options' => array('title' => 'Actualizar'), 'imageUrl' => false), 'delete' => array('label' => '<button class="btn btn-danger"><i class="icon-trash"></i></button>', 'options' => array('title' => 'Eliminar'), 'imageUrl' => false)), 'htmlOptions' => array('width' => '80px'))))); ?> </div> </div>