/** *@package AppForm *@since v0.1 beta *@method PrintSearch() *@desc Returns the search Form * */ private function PrintSeach() { //$fx_find = new ajax('submit', 'pannel-srch-res-'.$this-> IdObject, 'args:op='.encode('search-results').';form:fsrch-'.$this-> IdObject.';url:'.$this->CurrentPage); $fx_find = new ajax_submit(); $fx_find->Args('op=' . encode('search-results')); $fx_find->Form('fsrch-' . $this->IdObject); $fx_find->ResponseLocation('pannel-srch-res-' . $this->IdObject); $fx_find->Url($this->CurrentPage); $arrayFields = array(); foreach ($this->DbRecord->form_fields as $f) { if (!isset($this->Labels[$f['Field']])) { $this->Labels[$f['Field']] = ucwords(strtolower(strtr($f['Field'], '_', ' '))); } $arrayFields[$f['Field']] = $this->Labels[$f['Field']]; } //Si hay utilizar la lista existente //si no hay SearchByList utilizar el default if (count($this->SearchByList) == 0) { $this->SearchByList = $arrayFields; } $sFrm = '<fieldset style="background:#fff;"> <legend> Búsqueda </legend> <form id="fsrch-' . $this->IdObject . '" name="fsrch-' . $this->IdObject . '" action="' . $this->CurrentPage . '" method="POST" > <table border="0" > <tbody> <tr> <th scope="row">Por:</th> <td> <select name="srch-by-field" id="src-field"> <option value="0"> Cualquier campo </option> ' . fk_select_options_r($this->SearchByList) . ' </select> </td> <td><input id="srcwrd-' . $this->IdObject . '" name="srch-word" type="text"></td> <td><input name="srch-btn" type="submit" value="Ir »" class="btn" > <a href="javascript:void(0)" onclick="$(' . $this->IdObject . ').show();$(\'#pannel-srch-' . $this->IdObject . '\').html(\'\')">Cancelar</a></td> </tr> </tbody> </table> </form> <div id="pannel-srch-res-' . $this->IdObject . '"></div> </fieldset><script> $("#srcwrd-' . $this->IdObject . '").focus(); $(' . $this->IdObject . ').hide();</script>' . $fx_find->Render(); return $sFrm; }