• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ViewEdit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ViewEdit的典型用法代码示例。如果您正苦于以下问题:PHP ViewEdit类的具体用法?PHP ViewEdit怎么用?PHP ViewEdit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ViewEdit类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testdisplay

 public function testdisplay()
 {
     //execute the method with essential parameters set. it should return some html.
     $view = new ViewEdit();
     $view->module = 'Users';
     $view->bean = new User();
     $view->preDisplay();
     $view->ev->ss = new Sugar_Smarty();
     ob_start();
     $view->display();
     $renderedContent = ob_get_contents();
     ob_end_clean();
     $this->assertGreaterThan(0, strlen($renderedContent));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:14,代码来源:view.editTest.php


示例2: display

 public function display()
 {
     $GLOBALS['log']->info("JrMis_DepartmentsViewEdit.display");
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, bean_id: " . $this->bean->id);
     global $app_list_strings;
     $city_list = array();
     // if (!empty($this->bean->id))
     // {
     $this->bean->custom_fields->retrieve();
     $province_id = $this->bean->province_c;
     $max_id = $province_id + 9999;
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, privince_id: " . $province_id);
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, max_id: " . $max_id);
     foreach ($app_list_strings['jrmis_city_list'] as $id => $val) {
         if ($id > $province_id && $id <= $max_id) {
             $city_list[$id] = $val;
         }
     }
     // }
     // else
     // {
     //     $city_list[''] = '请选择省份';
     // }
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, city_list: " . print_r($city_list, TRUE));
     $this->ss->assign('CITY_LIST', $city_list);
     parent::display();
 }
开发者ID:jeffcao,项目名称:fzglsys_v5,代码行数:27,代码来源:view.edit.php


示例3: zd_TicketsViewEdit

 function zd_TicketsViewEdit()
 {
     parent::ViewEdit();
     if ($_REQUEST['return_module'] && $_REQUEST['return_id']) {
         $this->requesters = array();
         switch ($_REQUEST['return_module']) {
             case 'Accounts':
                 $this->referrer = new Account();
                 $this->referrer->retrieve($_REQUEST['return_id']);
                 $count = 0;
                 foreach ($this->referrer->get_contacts() as $contact) {
                     $this->requesters[$contact->email1] = $contact->name;
                 }
                 break;
             case 'Leads':
                 $this->referrer = new Lead();
                 $this->referrer->retrieve($_REQUEST['return_id']);
                 $this->requesters = array($this->referrer->email1 => $this->referrer->name);
                 break;
             case 'Contacts':
                 $this->referrer = new Contact();
                 $this->referrer->retrieve($_REQUEST['return_id']);
                 $this->requesters = array($this->referrer->email1 => $this->referrer->name);
                 break;
             case 'Opportunities':
                 $this->referrer = new Opportunity();
                 $this->referrer->retrieve($_REQUEST['return_id']);
                 $this->referrer->load_relationship('contacts');
                 $query_array = $this->referrer->contacts->getQuery(true);
                 $query_array['select'] = "SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id ";
                 $query = '';
                 foreach ($query_array as $qstring) {
                     $query .= ' ' . $qstring;
                 }
                 $temp = array('id', 'first_name', 'last_name', 'title', 'phone_work', 'opportunity_role', 'opportunity_rel_id');
                 $contacts = $this->referrer->build_related_list2($query, new Contact(), $temp);
                 foreach ($contacts as $contact) {
                     $contact->retrieve();
                     $this->requesters[$contact->email1] = $contact->name;
                 }
                 break;
         }
         if (sizeof($this->requesters) == 0) {
             $this->requesters = array($this->referrer->email1 => $this->referrer->name);
         }
     }
 }
开发者ID:nunoabc,项目名称:Web2,代码行数:47,代码来源:view.edit.php


示例4: display

 function display()
 {
     require_once 'modules/ACLRoles/ACLRole.php';
     //Get the current user's role
     $objACLRole = new ACLRole();
     $roles = $objACLRole->getUserRoles($GLOBALS['current_user']->id);
     //check if they are in the Admin or Admin Manager's role
     if (in_array('Admin', $roles) || in_array('Branch Manager - Delhi', $roles)) {
         $this->ev->ss->assign('ReadOnly', '');
     } else {
         //If not pass in a variable with the value readonly
         $this->ev->ss->assign('ReadOnly', 'readonly');
     }
     //Call the parent display function
     parent::display();
 }
开发者ID:anmoldeep,项目名称:erp,代码行数:16,代码来源:view.edit.php


示例5: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $json;
     $json = getJSONobj();
     $json_config = new json_config();
     if (isset($this->bean->json_id) && !empty($this->bean->json_id)) {
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id);
     } else {
         $this->bean->json_id = $this->bean->id;
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id);
     }
     $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
     if ($this->ev->isDuplicate) {
         $this->bean->status = $this->bean->getDefaultStatus();
     }
     //if
     $this->ss->assign('APPLIST', $GLOBALS['app_list_strings']);
     $repeatIntervals = array();
     for ($i = 1; $i <= self::MAX_REPEAT_INTERVAL; $i++) {
         $repeatIntervals[$i] = $i;
     }
     $this->ss->assign("repeat_intervals", $repeatIntervals);
     $fdow = $GLOBALS['current_user']->get_first_day_of_week();
     $dow = array();
     for ($i = $fdow; $i < $fdow + 7; $i++) {
         $dayIndex = $i % 7;
         $dow[] = array("index" => $dayIndex, "label" => $GLOBALS['app_list_strings']['dom_cal_day_short'][$dayIndex + 1]);
     }
     $this->ss->assign('dow', $dow);
     $this->ss->assign('repeatData', json_encode($this->view_object_map['repeatData']));
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:35,代码来源:view.edit.php


示例6: display

 public function display()
 {
     global $mod_strings;
     if ($_REQUEST['return_module'] == 'Project') {
         $project = new Project();
         $project->retrieve($_REQUEST['return_id']);
         //Get project resources (users & contacts)
         $resources1 = $project->get_linked_beans('project_users_1', 'User');
         $resources2 = $project->get_linked_beans('project_contacts_1', 'Contact');
         //sort into descending order
         ksort($resources1);
         ksort($resources2);
         echo "<script type='text/javascript'>";
         echo "var users = [];";
         echo "var contacts = [];";
         foreach ($resources1 as $user) {
             echo "var user = ['" . $user->id . "', '" . $user->name . "', 'User'];";
             echo "users.push(user);";
         }
         foreach ($resources2 as $contact) {
             echo "var user = ['" . $contact->id . "', '" . $contact->name . "', 'Contact'];";
             echo "contacts.push(user);";
         }
         echo "</script>";
     }
     parent::display();
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:27,代码来源:view.edit.php


示例7: display

 function display()
 {
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     global $current_user, $app_list_strings;
     /********************************************************************************************************/
     /*                                                   dynamic dd                                         */
     /********************************************************************************************************/
     $list = new loadDynamicLists();
     $domaine_c = $this->bean->domaine_c;
     $domaine_c = str_replace('^', '', $domaine_c);
     $selected = explode(',', $domaine_c);
     $dynamic_dd_fileds = array("pays_text_c" => array("tblname" => "ref_pays", "listname" => "pays_text_list", "field" => "nom"), "pays_iso2_c" => array("tblname" => "ref_pays", "listname" => "pays_iso2_c_list", "field" => "code"), "id_region_a_c" => array("tblname" => "ref_region", "listname" => "id_region_a_c_list", "field" => "nom"));
     ////special multi enum
     $dynamic_dd_fileds2 = array("domaine_c" => array("tblname" => "ref_discip", "listname" => "domaines_section_c_list", "field" => "Domaine", "field2" => "Discipline"));
     foreach ($dynamic_dd_fileds2 as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $edit_enum = $list->populate_list2($v['tblname'], $v['field'], $v['field2'], $selected);
     }
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field'], $v['pay']);
     }
     /********************************************************************************************************/
     /*                                                   Javascript                                         */
     /********************************************************************************************************/
     //echo $edit_enum['list_edit'];
     //if the orginisme is type_etablissement_c==faculte
     echo "\r\n\r\n\t\t\t<script>\r\n\t\t\t\t\r\n\t\t\t\t\$(document).ready(function()\r\n\t\t\t\t{     render();//init\r\n\t\t\t\t\t\$('#domaine_c').html('" . $edit_enum['list_edit'] . "');\r\n\r\n\t\t\t\t\t\$( '#type_etablissement_c' ).change(function() {                \r\n                      \r\n                      render();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t  });\t\r\n\t\t\t\t});\r\n\r\n            //custom function\r\n            render = function(){\r\n\r\n            \tvar remove_fields =    \t['coda_name_c','coda_sname_c','prive_c','id_etat_c','date_effectif_c','date_maj_c','statut_c','commentaire2_c','code_hier_c','qualite_c','adhesion_c','sigle_c','historique','nb_etud_c','nb_ens_c','nb_cherch_c','rub_c','commentaire2_c','nb_etud_annee_obs_c','nb_ens_annee_obs_c','nb_cherch_annee_obs_c','chiffres_c'];//you can add the fields you want to hide here\r\n                       \r\n\r\n\t\t\t\t\t\t\$.each( remove_fields, function( key, value ) {\r\n                        var dd_val =\$( '#type_etablissement_c' ).val();\r\n\t\t                if(dd_val=='faculte'){\r\n\t\t                \t\$('#' + value ).hide();\r\n\t\t                \t\$('#' + value +'_label' ).css( 'color','white' );\r\n\t\t                \t\$('#date_effectif_c_date').parent().parent().hide();\r\n\t\t                \t\$('#date_maj_c_date').parent().parent().hide();\r\n\t\t                \t\$('#adhesion_c_date').parent().parent().hide();\r\n\t\t                \t\r\n\t\t                \t\r\n\t\t                \t\r\n\t\t                }\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\$('#' + value  ).show();\r\n\t\t\t\t\t\t\t\$('#' + value +'_label' ).show();\r\n\t\t\t\t\t\t\t\$('#' + value +'_label' ).css( 'color','black' );\r\n\t\t\t\t\t\t\t\$('#date_effectif_c_date').parent().parent().show();\r\n\t\t                \t\$('#date_maj_c_date').parent().parent().show();\r\n\t\t                \t\$('#adhesion_c_date').parent().parent().show();\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t});\r\n            }\r\n\r\n\t\t\t</script>";
     $this->ev->process();
     parent::display();
 }
开发者ID:auf,项目名称:crm_auf_org,代码行数:33,代码来源:view.edit.php


示例8: display

 public function display()
 {
     // Disable VCR Control
     $this->ev->showVCRControl = false;
     // Default Team as Global
     if (empty($this->bean->id) && !$this->ev->isDuplicate) {
         $this->bean->team_id = 1;
         $this->bean->team_set_id = 1;
     }
     // Load TinyMCE
     require_once 'include/SugarTinyMCE.php';
     $tiny = new SugarTinyMCE();
     $tiny->defaultConfig['apply_source_formatting'] = true;
     $tiny->defaultConfig['cleanup_on_startup'] = true;
     $tiny->defaultConfig['relative_urls'] = false;
     $tiny->defaultConfig['convert_urls'] = false;
     $ed = $tiny->getInstance('body_html');
     $this->ss->assign('tiny_script', $ed);
     // Load Fields for main module
     if (empty($this->bean->base_module)) {
         $modulesList = PdfManagerHelper::getAvailableModules();
         $this->bean->base_module = key($modulesList);
     }
     $fieldsForSelectedModule = PdfManagerHelper::getFields($this->bean->base_module, true);
     $this->ss->assign('fieldsForSelectedModule', $fieldsForSelectedModule);
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:view.edit.php


示例9: display

    function display()
    {
        global $app_list_strings;
        $json = getJSONobj();
        $prob_array = $json->encode($app_list_strings['sales_probability_dom']);
        $prePopProb = '';
        if (empty($this->bean->id) && empty($_REQUEST['probability'])) {
            $prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
        }
        $probability_script = <<<EOQ
\t<script>
\tprob_array = {$prob_array};
\tdocument.getElementsByName('sales_stage')[0].onchange = function() {
\t\t\tif(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]
\t\t\t&& typeof(document.getElementsByName('probability')[0]) != "undefined"
\t\t\t) {
\t\t\t\tdocument.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
\t\t\t\tSUGAR.util.callOnChangeListers(document.getElementsByName('probability')[0]);

\t\t\t} 
\t\t};
\t{$prePopProb}
\t</script>
EOQ;
        $this->ss->assign('PROBABILITY_SCRIPT', $probability_script);
        parent::display();
    }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:27,代码来源:view.edit.php


示例10: display

    function display()
    {
        parent::display();
        ?>
        <script>
            function update_parent_display(){
                var name_elem = document.getElementById("parent_category_name");
                var id_elem = document.getElementById("parent_category_id");
                var btn_elem = document.getElementById("btn_parent_category_name");
                var disable = document.getElementById("is_parent") && document.getElementById("is_parent").checked;
                if(name_elem){
                    name_elem.disabled = disable;
                }
                if(id_elem){
                    id_elem.disabled = disable;
                }
                if(btn_elem){
                    btn_elem.disabled = disable;
                }
                if(disable){
                    SUGAR.clearRelateField(this.form, 'parent_category_name', 'parent_category_id');
                }
            }
            document.getElementById("is_parent").onchange = update_parent_display;
            document.getElementById("is_parent").onchange();
        </script>

        <?php 
    }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:29,代码来源:view.edit.php


示例11: display

 function display()
 {
     $this->displayJSInclude();
     $this->setFields();
     parent::display();
     $this->displayJS();
 }
开发者ID:santara12,项目名称:advanced-opensales,代码行数:7,代码来源:view.edit.php


示例12: preDisplay

 public function preDisplay()
 {
     global $app_list_strings;
     echo "<style type='text/css'>";
     //readfile('modules/AOR_Reports/css/edit.css');
     readfile('modules/AOR_Reports/js/jqtree/jqtree.css');
     echo "</style>";
     if (!is_file('cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Fields', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Fields/' . $GLOBALS['current_language'] . '.js"></script>';
     if (!is_file('cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('AOR_Conditions', $GLOBALS['current_language']);
     }
     echo '<script src="cache/jsLanguage/AOR_Conditions/' . $GLOBALS['current_language'] . '.js"></script>';
     echo '<script src="include/javascript/yui3/build/yui/yui-min.js"></script>';
     echo "<script>";
     echo "sort_by_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_sort_operator'], ''))) . "\";";
     echo "total_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_total_options'], ''))) . "\";";
     echo "format_values = \"" . trim(preg_replace('/\\s+/', ' ', get_select_options_with_id($app_list_strings['aor_format_options'], ''))) . "\";";
     echo "</script>";
     $fields = $this->getFieldLines();
     echo "<script>var fieldLines = " . json_encode($fields) . "</script>";
     $conditions = $this->getConditionLines();
     echo "<script>var conditionLines = " . json_encode($conditions) . "</script>";
     $charts = $this->getChartLines();
     echo "<script>var chartLines = " . json_encode($charts) . ";</script>";
     parent::preDisplay();
 }
开发者ID:switcode,项目名称:SuiteCRM,代码行数:31,代码来源:view.edit.php


示例13: display

 function display()
 {
     $this->bean->is_template = 1;
     $this->ev->ss->assign("is_template", 1);
     $this->ev->setModuleTitleKey('LBL_PROJECT_TEMPLATE');
     parent::display();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:7,代码来源:view.templatesedit.php


示例14: preDisplay

 function preDisplay()
 {
     if (file_exists("cache/modules/OfficeReportsVariables/EditView.tpl")) {
         unlink("cache/modules/OfficeReportsVariables/EditView.tpl");
     }
     parent::preDisplay();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:7,代码来源:view.edit.php


示例15: display

 public function display()
 {
     global $current_user, $current_language, $sugar_flavor, $sugar_config;
     if (!$current_user->is_admin) {
         sugar_die(translate("LBL_MUST_BE_ADMIN"));
     }
     //RemoveTabSave: let dashboard pass since we are still altering it
     if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'RemoveTabSave') {
         if (isset($_REQUEST['TabToRemove'])) {
             $dashboardManager = BeanFactory::newBean("dash_DashboardManager");
             $dashboardManager->temp_unencoded_pages = $dashboardManager->deletePageByKey($_REQUEST['TabToRemove'], $current_user->getPreference('pages', 'Home'));
             $dashboardManager->temp_unencoded_dashlets = $current_user->getPreference('dashlets', 'Home');
             $dashboardManager->setDashboardForUser($current_user);
             $current_user->getPreference('pages', 'Home');
             $current_user->getPreference('dashlets', 'Home');
         }
     } elseif (isset($this->bean->fetched_row['id'])) {
         //set this dashboard for current user
         $this->bean->setDashboardForUser($current_user);
     } else {
         //set dashboard back to clean template
         $current_user->resetPreferences('Home');
     }
     parent::display();
     //get language for dashboard
     $mod_strings = return_module_language($current_language, 'Home');
     //render dashboard
     $lock_homepage = $sugar_config['lock_homepage'];
     $sugar_config['lock_homepage'] = false;
     require_once "modules/Home/index.php";
     $sugar_config['lock_homepage'] = $lock_homepage;
 }
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:32,代码来源:view.edit.php


示例16: display

 function display()
 {
     if (is_admin($GLOBALS['current_user'])) {
         $this->ss->assign('EDIT_REPORTS_TO', true);
     }
     parent::display();
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:7,代码来源:view.edit.php


示例17: display

 function display()
 {
     $admin = Administration::getSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ev->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:view.edit.php


示例18: display

 function display()
 {
     $this->populateCurrency();
     $this->populateQuoteTemplates();
     $this->populateLineItems();
     parent::display();
     $this->displayJS();
 }
开发者ID:santara12,项目名称:advanced-opensales,代码行数:8,代码来源:view.edit.php


示例19: process

 public function process()
 {
     if (isset($this->errors['company_logo'])) {
         $this->configurator->errors['company_logo'] = $this->errors['company_logo'];
         unset($this->errors['company_logo']);
     }
     return parent::process();
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:8,代码来源:view.edit.php


示例20: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     if ($this->ev->isDuplicate) {
         $this->bean->status = $this->bean->getDefaultStatus();
     }
     //if
     parent::display();
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:11,代码来源:view.edit.php



注:本文中的ViewEdit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ViewFactory类代码示例发布时间:2022-05-23
下一篇:
PHP ViewDetail类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap