public function getFormAgrUsr($user_id = '') { $ess_profiles = new ess_profiles(); $profilesArray = array(); foreach ($ess_profiles->find() as $profile) { $profilesArray[$profile->id] = $profile->name; } $ess_system_users = new ess_system_users(); $myForm = new OPF_myForm('getFormAgrUsr'); if ($user_id) { $ess_system_users->find($user_id); $myForm->addDisabled('user_name'); } $myForm->styleClassForm = ''; $myForm->addText(OPF_myLang::getPhrase('OPF_ADMUSR_1'), 'user_name', $ess_system_users->user_name, 15); $myForm->addText(OPF_myLang::getPhrase('OPF_ADMUSR_2'), 'name', $ess_system_users->name, 15); $myForm->addText(OPF_myLang::getPhrase('OPF_ADMUSR_3'), 'lastname', $ess_system_users->lastname, 15); $myForm->addPassword(OPF_myLang::getPhrase('OPF_ADMUSR_4'), 'passwd1', $ess_system_users->passwd, 15); $myForm->addPassword(OPF_myLang::getPhrase('OPF_ADMUSR_5'), 'passwd', $ess_system_users->passwd, 15); $myForm->addSelect(OPF_myLang::getPhrase('OPF_ADMUSR_6'), 'profile_id', $profilesArray, $ess_system_users->profile_id); $status = false; if ($ess_system_users->status == 1) { $status = true; } $myForm->addCheckBox(OPF_myLang::getPhrase('OPF_ADMUSR_7'), 'status', $status); $myForm->addButton('btnsave', OPF_myLang::getPhrase('LABEL_BTN_SAVE'), 'save.gif'); $myForm->addEvent('btnsave', 'onclick', 'onClickSaveRecord', $user_id); return $myForm->getForm(1); }
public function getFormAddModRecord($id = '') { $ess_menu = new ess_menu(); if ($id) { $ess_menu->find($id); } $arrIcons = array(array('img/imgfolder.gif', 'imgfolder', 'Image folder'), array('img/musicfolder.gif', 'musicfolder', 'Music folder'), array('img/page.gif', 'page', 'Page'), array('img/cd.gif', 'cd', 'Cd'), array('img/base.gif', 'osezno', 'Osezno PHP Framefork logo'), array('img/globe.gif', 'globe', 'Globe'), array('img/question.gif', 'question', 'Question'), array('img/trash.gif', 'trash', 'Trash')); $myForm = new OPF_myForm('FormAddModRecord'); $htmlInconsel = '<select name="icon" id="icon" class="' . $myForm->styleClassFields . '">'; $htmlInconsel .= '<option>' . OPF_myLang::getPhrase('LABEL_FIRST_OPT_SELECT_FIELD') . '</option>'; foreach ($arrIcons as $icon) { $sel = ''; if ($ess_menu->icon == $icon[0] && $ess_menu->icon) { $sel = 'selected'; } $htmlInconsel .= '<option ' . $sel . ' value="' . $icon[0] . '" id="' . $icon[1] . '">' . $icon[2] . '</option>'; } $htmlInconsel .= '</select>'; $myForm->styleClassForm = ''; $myForm->addText(OPF_myLang::getPhrase('OPF_MENU_4'), 'description:2', $ess_menu->description, 15, 50); $myForm->selectStringFirstLabelOption = '/'; $myForm->addSelect(OPF_myLang::getPhrase('OPF_MENU_5'), 'menu_id:2', $this->arrOpt, $ess_menu->menu_id); $myForm->addText(OPF_myLang::getPhrase('OPF_MENU_6'), 'ord:2', $ess_menu->ord, 2, 3, true); $myForm->addFreeObject('fo1:2', 'Icono:', $htmlInconsel); $myForm->addTextArea(OPF_myLang::getPhrase('OPF_MENU_7'), 'url:2', $ess_menu->url, 50, 2); $myForm->addButton('btn_dir', OPF_myLang::getPhrase('OPF_MENU_8'), 'find.gif'); $myForm->addButton('btn_save', OPF_myLang::getPhrase('LABEL_BTN_SAVE'), 'save.gif'); $myForm->addEvent('btn_save', 'onclick', 'onClickSave', $id); $myForm->addEvent('btn_dir', 'onclick', 'onClickFindMod'); return $myForm->getForm(2); }
public function default_event() { $myForm = new OPF_myForm('new_form'); $myForm->addText('Nombre:', 'nombre'); $myForm->addButton('btn1', 'Enviar'); $myForm->addEvent('btn1', 'onclick', 'getData'); $this->formulario = $myForm->getForm(2); }
public function getFormChngPasswd() { $myForm = new OPF_myForm('ChngPasswd'); $myForm->addText(OPF_myLang::getPhrase('OPF_PASSWD_4'), 'user_name'); $myForm->addPassword(OPF_myLang::getPhrase('OPF_PASSWD_5'), 'passwd'); $myForm->addPassword(OPF_myLang::getPhrase('OPF_PASSWD_6'), 'passwd1'); $myForm->addPassword(OPF_myLang::getPhrase('OPF_PASSWD_7'), 'passwd2'); $myForm->addButton('btn_save', OPF_myLang::getPhrase('LABEL_BTN_SAVE'), 'save.gif'); $myForm->addEvent('btn_save', 'onclick', 'onClikSavePasswd'); return $myForm->getForm(1); }
public static function formNewScaffStep1() { $myForm = new OPF_myForm('formNewScaffStep1'); $myForm->addComment('cm1:3', ''); $myForm->addComment('cm2:3', ''); $myForm->addComment('cm3:3', ''); $myForm->addComment('cm4:3', ''); $myForm->addComment('cm5:3', ''); $myForm->addComment('cm6:3', ''); $myForm->addComment('cm7:3', ''); $table = ''; if (isset($_SESSION['temp_scaff_info']['table_name'])) { $table = $_SESSION['temp_scaff_info']['table_name']; } $myForm->addHelp('table_name', OPF_myLang::getPhrase('OPF_SCAFF_39')); $myForm->addText(OPF_myLang::getPhrase('OPF_SCAFF_38'), 'table_name:3', $table); $myForm->addComment('cm8:3', ''); $myForm->addComment('cm9:3', ''); $myForm->addComment('cm10:3', ''); $myForm->addComment('cm11:3', ''); $myForm->addComment('cm12:3', ''); $myForm->addComment('cm13:3', ''); $myForm->addComment('cm14:3', ''); $myForm->addComment('cm15', ''); $myForm->addComment('cm16', ''); $myForm->addButton('btn1', OPF_myLang::getPhrase('OPF_SCAFF_14'), 'next.gif'); $myForm->addEvent('btn1', 'onclick', 'toScaffStep2'); return $myForm->getForm(3); }
/** * Construye el Html del formulario de consulta * @return string */ private function buildQueryForm($showFirstRule) { $arFields = array(); $objMyForm = new OPF_myForm($nomForm = $this->idList . 'QueryForm'); $objMyForm->width = '98%'; $objMyForm->border = 0; $objMyForm->styleClassTags = 'texto_formularios'; $objMyForm->styleClassForm = 'form_cont_filter'; $htble = ''; /** * Helps */ $objMyForm->styleTypeHelp = 2; $objMyForm->addDisabled('cancel_query_' . $this->idList); $objMyForm->addDisabled('save_query_' . $this->idList); $htble .= '<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>'; $anyBut = false; $objMyForm->addHelp('pdf_' . $this->idList, LABEL_HELP_PDF_BUTTON_FORM); if (!$this->arrayDataTypeExport['pdf']) { $objMyForm->addDisabled('pdf_' . $this->idList); } else { $anyBut = true; } $objMyForm->addEvent('pdf_' . $this->idList, 'onclick', 'MYLIST_exportData', 'pdf', $this->idList); $htble .= '<td width="10%" align="left">' . $objMyForm->getButton('pdf_' . $this->idList, '', 'pdf.gif') . '</td>'; $objMyForm->addHelp('xls_' . $this->idList, LABEL_HELP_EXCEL_BUTTON_FORM); if (!$this->arrayDataTypeExport['xls']) { $objMyForm->addDisabled('xls_' . $this->idList); } else { $anyBut = true; } $objMyForm->addEvent('xls_' . $this->idList, 'onclick', 'MYLIST_exportData', 'xls', $this->idList); $htble .= '<td width="10%" align="left">' . $objMyForm->getButton('xls_' . $this->idList, '', 'excel.gif') . '</td>'; $objMyForm->addHelp('html_' . $this->idList, LABEL_HELP_HTML_BUTTON_FORM); if (!$this->arrayDataTypeExport['html']) { $objMyForm->addDisabled('html_' . $this->idList); } else { $anyBut = true; } $objMyForm->addEvent('html_' . $this->idList, 'onclick', 'MYLIST_exportData', 'html', $this->idList); $htble .= '<td width="10%" align="left">' . $objMyForm->getButton('html_' . $this->idList, '', 'html.gif') . '</td>'; if (!$anyBut) { $objMyForm->addDisabled('not_pg_' . $this->idList); } $htble .= '<td width="10%"> </td>'; $htble .= '<td width="10%"> </td>'; $htble .= '<td width="10%"> </td>'; $objMyForm->addEvent('help_' . $this->idList, 'onclick', 'MYLIST_help'); $objMyForm->addHelp('help_' . $this->idList, TITLE_WINDOW_HELP_MYLIST); $htble .= '<td width="10%" align="right">' . $objMyForm->getButton('help_' . $this->idList, '', 'help.gif') . '</td>'; $objMyForm->addHelp($this->idList . '_reload_list', LABEL_HELP_RELOAD_LIST_FORM); $objMyForm->addEvent($this->idList . '_reload_list', 'onclick', 'MYLIST_reload', $this->idList); $htble .= '<td width="10%" align="right">' . $objMyForm->getButton($this->idList . '_reload_list', NULL, 'reload.gif') . '</td>'; $objMyForm->addHelp($this->idList . '_apply_rule', LABEL_HELP_APPLY_RULE_FORM); $objMyForm->addEvent($this->idList . '_apply_rule', 'onclick', 'MYLIST_applyRuleQuery', $this->idList); $htble .= '<td width="10%" align="right">' . $objMyForm->getButton($this->idList . '_apply_rule', NULL, 'ok.gif') . '</td>'; $objMyForm->addHelp('add_rule_' . $this->idList, LABEL_HELP_ADD_RULE_QUERY_BUTTON_FORM); $objMyForm->addEvent('add_rule_' . $this->idList, 'onclick', 'MYLIST_addRuleQuery', $this->idList, $showFirstRule); $htble .= '<td width="10%" align="right">' . $objMyForm->getButton('add_rule_' . $this->idList, '', 'find.gif') . '</td>'; $htble .= '</tr></table>'; $objMyForm->addComment('options', $htble); $htmFirstRule = ''; if ($showFirstRule) { $htmFirstRule = $this->getFirstRuleOnQueryForm(); } $objMyForm->addComment('rule_for', '<div class="form_rule_for_list" id="rule_for_' . $this->idList . '">' . $htmFirstRule . '</div>'); return $objMyForm->getForm(1); }
/** * Cuarda el resultado de la consulta de una lista dinamica segun el filtro aplicado al disco * @ignore * @param $datForm Datos de form * @param $format Formato * @param $idList Id lista */ public function MYLIST_exportData($datForm, $format, $idList) { $arrFields = array(); $arrSelects = array(); $this->notificationWindow(MSG_SELECT_FIELD_TO_SHOW, 8, 'ok'); $myForm = new OPF_myForm('export_data_select_fields_' . $idList); $myForm->selectUseFirstValue = false; $myList = new OPF_myList($idList); $arFldOnQry = $myList->getVar('arrayFieldsOnQuery'); $arEvnOnQry = $myList->getVar('arrayEventOnColumn'); $nomImg = ''; switch ($format) { case 'xls': $nomImg = 'excel'; break; case 'pdf': $nomImg = 'pdf'; break; case 'html': $nomImg = 'html'; break; } $i = 1; foreach ($arFldOnQry as $field) { if (!isset($arEvnOnQry[$field])) { $arrFields['field_' . $i] = $field; $arrSelects[] = 'field_' . $i; } ++$i; } $myForm->border = 0; $myForm->styleTypeHelp = 2; $myForm->styleClassFields = 'select_fields_to_show'; $myForm->addHelp('fields_export', LABEL_HELP_SELECT_FILEDS_TOSHOW); $myForm->addComment('cm1:2', '<div align="center">' . $myForm->getSelect('fields_export', $arrFields, $arrSelects, 8, 0, true) . '</center>'); $myForm->styleClassFields = 'caja'; $myForm->addHelp('not_pg_' . $idList, LABEL_HELP_USELIMIT_RULE_FORM); $myForm->addCheckBox(LABEL_USELIMIT_RULE_FORM . ':', 'not_pg_' . $idList, true); $myForm->addButton('button_export_data', LABEL_BUTTON_DOWNLOAD_FILE_EXPORT, $nomImg . '.gif'); $myForm->addEvent('button_export_data', 'onclick', 'MYLIST_exportDataOk', $format, $idList, $i); $this->modalWindow($myForm->getForm(2), TITLE_MWINDOW_FILEDS_TO_SHOW, 220, 222, 2); return $this->response; }
public function getFormLogin() { $myForm = new OPF_myForm('frm_login'); $myForm->setAutoComplete('user_opf_ess', false); $user_opf_ess = ''; $mark = false; if (isset($_COOKIE['user_opf_ess'])) { $user_opf_ess = $_COOKIE['user_opf_ess']; $mark = true; } $myForm->addText(OPF_myLang::getPhrase('OPF_LOGIN_2'), 'user_opf_ess', $user_opf_ess); $myForm->addPassword(OPF_myLang::getPhrase('OPF_LOGIN_3'), 'passwd_opf_ess'); $myForm->addCheckBox(OPF_myLang::getPhrase('OPF_LOGIN_5'), 'rem_usr', $mark); $myForm->addButton('btn_log', OPF_myLang::getPhrase('OPF_LOGIN_4'), 'ok.gif'); $myForm->addEvent('btn_log', 'onclick', 'onClickLogIn'); return $myForm->getForm(1); }
public function getFormAdmItemTable_register($detail_id = '') { $ess_master_tables_detail = new ess_master_tables_detail(); if ($detail_id) { $ess_master_tables_detail->find($detail_id); } $myForm = new OPF_myForm('FormAdmItemTable_register'); $myForm->styleClassForm = ''; $myForm->addText(OPF_myLang::getPhrase('OPF_ADMTABLAS_3'), 'item_cod', $ess_master_tables_detail->item_cod); $myForm->addText(OPF_myLang::getPhrase('OPF_ADMTABLAS_2'), 'item_desc', $ess_master_tables_detail->item_desc); $myForm->addButton('btn_save_detail', OPF_myLang::getPhrase('LABEL_BTN_SAVE'), 'save.gif'); $myForm->addEvent('btn_save_detail', 'onclick', 'onClickSaveItemTable', $this->table_id, $detail_id); return $myForm->getForm(1); }
public function getFormAddModProfile($id = '') { $myForm = new OPF_myForm('FormAddModProfile'); $ess_profiles = new ess_profiles(); if ($id) { $ess_profiles->find($id); } $myForm->styleClassForm = ''; $myForm->addText(OPF_myLang::getPhrase('OPF_PROFILES_5'), 'name', $ess_profiles->name, 20, 50); $myForm->addTextArea(OPF_myLang::getPhrase('OPF_PROFILES_6'), 'description', $ess_profiles->description, 40, 6); $myForm->addButton('btn_save', OPF_myLang::getPhrase('LABEL_BTN_SAVE'), 'save.gif'); $myForm->addEvent('btn_save', 'onclick', 'onClickSave', $id); return $myForm->getForm(1); }