?> <?php //echo $form->HiddenField($model, 'order_id', array('size' => 10, 'maxlength' => 10, 'value' => $_GET['id'], 'disabled' => true)); ?> <?php echo $form->error($model, 'order_id'); ?> </div> <br> <div class="row"> <?php echo $form->labelEx($model, 'activity_guarantee_id'); ?> <?php echo $form->dropDownList($model, 'activity_guarantee_id', Chtml::listData(ActivityGuarantee::model()->findAll(array('condition' => 'active = 1', 'order' => 'description')), 'id', 'description'), array('prompt' => 'Seleccionar')); ?> <?php // echo $form->textField($model,'activity_guarantee_id',array('size'=>10,'maxlength'=>10)); ?> <?php echo $form->error($model, 'activity_guarantee_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'date_hour'); ?> <?php $this->widget('CJuiDateTimePicker', array('model' => $model, 'attribute' => 'date_hour', 'options' => array('dateFormat' => 'yy-mm-dd', 'timeFormat' => 'hh:mm:ss', 'pickerTimeFormat' => 'hh:mm:ss', 'showSecond' => true))); ?>
<?php /* @var $this ActivityGuaranteeController */ /* @var $model ActivityGuarantee */ $this->breadcrumbs = array('Actividad de Garantía' => array('index'), $model->id); $this->menu = array(array('label' => 'Listar Actividades de Garantía', 'url' => array('index')), array('label' => 'Crear Actividad de Garantía', 'url' => array('create')), array('label' => 'Actualizar Actividad de Garantía', 'url' => array('update', 'id' => $model->id)), array('label' => 'Desactivar Actividad de Garantía', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => '¿Esta seguro que desea desactivar esta actividad?'), 'visible' => $model->active == 1), array('label' => 'Activar Actividad de Garantía', 'url' => '#', 'linkOptions' => array('submit' => array('activate', 'id' => $model->id), 'confirm' => '¿Esta seguro que desea activar este actividad?'), 'visible' => $model->active == 0), array('label' => 'Administrar Actividades de Garantía', 'url' => array('admin'))); ?> <h1>Actividad de Garantía: <?php echo $model->description; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'description', array('name' => 'active', 'value' => ActivityGuarantee::getActive($model->active)))));
/** * 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 $id the ID of the model to be loaded * @return ActivityGuarantee the loaded model * @throws CHttpException */ public function loadModel($id) { $model = ActivityGuarantee::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }