/** * Displays the creation form */ public function newAction() { //SELECT2 $this->importarSelect2(); $select = new \Phalcon\Forms\Element\Select('linea_clienteId', Cliente::find(array('cliente_habilitado=1', 'order' => 'cliente_nombre DESC')), array('using' => array('cliente_id', 'cliente_nombre'), 'useEmpty' => true, 'emptyText' => 'SELECCIONE UN CLIENTE', 'emptyValue' => '', 'class' => 'form-control autocompletar', 'style' => 'width:100%', 'required' => '')); $select->clear(); $this->view->cliente = $select; }
/** * Muestra todas las cabeceras disponibles, para luego buscar sus columnas en obtenerColumnasNombreId. * @param null $planilla_id */ public function editarAction($planilla_id = null) { if ($planilla_id != null) { $this->tag->setDefault('planilla_id', $planilla_id); } $this->assets->collection("headerCss")->addCss('plugins/iCheck/all.css'); $this->assets->collection('headerJs')->addJs('plugins/iCheck/icheck.min.js'); //SELECT2 $this->importarSelect2(); $select = new \Phalcon\Forms\Element\Select('cabecera_id', Cabecera::find(array('cabecera_habilitado=1', 'order' => 'cabecera_id DESC')), array('using' => array('cabecera_id', 'cabecera_nombre'), 'useEmpty' => true, 'emptyText' => 'Seleccione una cabecera', 'emptyValue' => '', 'class' => 'form-control autocompletar', 'style' => 'width:100%', 'required' => '')); $select->clear(); $this->view->formulario = $select; }