当前位置: 首页>>代码示例>>PHP>>正文


PHP QuickCreate类代码示例

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


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

示例1: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Contracts');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"contractsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"contracts\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_contracts\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('contractsQuickCreate');
     $focus = BeanFactory::getBean('Contracts');
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $status_options = isset($focus->status) ? get_select_options_with_id($app_list_strings['contract_status_dom'], $focus->status) : get_select_options_with_id($app_list_strings['contract_status_dom'], '');
     $this->ss->assign('STATUS_OPTIONS', $status_options);
     $json = getJSONobj();
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'contractsQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'contractsQuickCreate', 'field_to_name_array' => array('id' => 'team_id', 'name' => 'team_name'));
     $this->ss->assign('encoded_team_popup_request_data', $json->encode($popup_request_data));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:26,代码来源:ContractsQuickCreate.php

示例2: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'ProjectTask');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"projectTaskQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"projecttask\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_projecttask\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('projectTaskQuickCreate');
     $focus = new ProjectTask();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_task_status_options'], $focus->status));
     $json = getJSONobj();
     ///////////////////////////////////////
     ///
     /// SETUP PARENT POPUP
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTypeQuickCreate', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name'));
     $encoded_parent_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTaskQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:29,代码来源:ProjectTaskQuickCreate.php

示例3: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Opportunities');
     $json = getJSONobj();
     parent::process();
     list($num_grp_sep, $dec_sep) = get_number_seperators();
     $this->ss->assign('NUM_GRP_SEP', $num_grp_sep);
     $this->ss->assign('DEC_SEP', $dec_sep);
     $this->ss->assign('CURRENCY_ID', $current_user->getPreference('currency'));
     $this->ss->assign("SALES_STAGE_OPTIONS", get_select_options_with_id($app_list_strings['sales_stage_dom'], ''));
     $this->ss->assign("LEAD_SOURCE_OPTIONS", get_select_options_with_id($app_list_strings['lead_source_dom'], ''));
     $this->ss->assign('prob_array', $json->encode($app_list_strings['sales_probability_dom']));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"opportunitiesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"opportunities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_opportunities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('opportunitiesQuickCreate');
     $focus = new Opportunity();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:26,代码来源:OpportunitiesQuickCreate.php

示例4: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'ProductComponents');
     $format = new Format();
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"productComponentsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"productcomponents\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_productcomponents\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('productComponentsQuickCreate');
     $focus = new ProductComponents();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $app_list_strings['products_format_options'] = $format->Get_Dropdown_Data();
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     $this->ss->assign('run_style_options', get_select_options_with_id($app_list_strings['layout_type_options'], ''));
     $this->ss->assign('type_options', get_select_options_with_id($app_list_strings['type_options'], $focus->type));
     $this->ss->assign('color_side_a', get_select_options_with_id($app_list_strings['color_side_a'], $focus->color_side_a));
     $this->ss->assign('color_side_b', get_select_options_with_id($app_list_strings['color_side_b'], $focus->color_side_b));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_task_status_options'], $focus->status));
     $this->ss->assign("FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $this->ss->assign("RUN_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $this->ss->assign("BLEED_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
     $ppref = 'PRD';
     $pnumber = $focus->get_pnum();
     $number_suf = $focus->generate_number();
     $this->ss->assign('number_pref', $ppref);
     $this->ss->assign('pnum', $pnumber);
     $this->ss->assign('number_suf', $number_suf);
     $this->ss->assign("LAYOUTROWS", $focus->getLayoutRow(new Layoutline(), 0, true, true));
     //$this->ss->parse("main.row1");
     $json = getJSONobj();
     ///////////////////////////////////////
     ///
     /// SETUP PARENT POPUP
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectTypeQuickCreate', 'field_to_name_array' => array('id' => 'parent_id', 'name' => 'parent_name'));
     $encoded_parent_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_parent_popup_request_data', $encoded_parent_popup_request_data);
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'productComponentsQuickCreate', 'field_to_name_array' => array('id' => 'paperid', 'pname' => 'paper'));
     $this->ss->assign('encoded_paper_popup_request_data', $json->encode($popup_request_data));
     //machines popup
     /*	$popup_request_data = array(
     			'call_back_function' => 'set_return',
     			'form_name' => 'productComponentsQuickCreate',
     			'field_to_name_array' => array(
     				'id' => 'machine_id',
     				'name' => 'machine',
     			),
     		);
     	
     		$encoded_popup_request_data = $json->encode($popup_request_data);
     		$this->ss->assign('encoded_machine_popup_request_data', $encoded_popup_request_data);        
     		*/
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:58,代码来源:ProductComponentsQuickCreate.php

示例5: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings, $app_strings;
     $mod_strings = return_module_language($current_language, 'GroupPrograms');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"toursQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"tours\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_groupprograms\")';");
         //$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_tours\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->ss->assign('APP', $app_strings);
     $this->javascript = new javascript();
     $this->javascript->setFormName('MadeTourQuickCreate');
     $focus = new GroupProgram();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $json = getJSONobj();
     if (!empty($focus->status)) {
         $this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], $focus->status));
     } else {
         $this->ss->assign('STATUS_DOM', get_select_options($app_list_strings['groupprogram_status_dom'], ''));
     }
     $git_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'group_id', 'name' => 'group_name'));
     $this->ss->assign('gits_popup_request_data', json_encode($git_popup_request_data));
     // worksheet popup request data
     $worksheet_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'worksheet_id', 'name' => 'worksheet'));
     $this->ss->assign('worksheet_popup_request_data', json_encode($worksheet_popup_request_data));
     // pick up airport guide
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_pick_up_at_airport_id', 'name' => 'guide_pick_up_at_airport', 'phone' => 'pick_up_phone'));
     $this->ss->assign('pick_up_airport', json_encode($popup_request_data));
     // insurance_popup_request_data
     $insurance_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'insurance_id', 'name' => 'insurance'));
     $this->ss->assign('insurance_popup_request_data', json_encode($insurance_popup_request_data));
     // airlines_tickets_popup_request_data
     $airlines_tickets_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'airlines_tickets_id', 'name' => 'airlines_tickets'));
     $this->ss->assign('airlines_tickets_popup_request_data', json_encode($airlines_tickets_popup_request_data));
     // operator
     $popup_operator_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'operator', 'phone_mobile' => 'operator_phone'));
     $this->ss->assign('operator_users', json_encode($popup_operator_request_data));
     $popup_giude_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'guide_id', 'name' => 'guide', 'phone' => 'guide_phone'));
     $this->ss->assign('guide_users', json_encode($popup_giude_request_data));
     // leader popup request data
     $leader_popup_data_request = array("call_back_function" => "set_return", "form_name" => "MadeTourQuickCreate", 'field_to_name_array' => array('id' => 'leader_id', 'name' => 'team_leader', 'phone' => 'leader_phone'));
     $this->ss->assign('leader_popup_request_data', json_encode($leader_popup_data_request));
     // tour popup
     $tour_popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'MadeTourQuickCreate', 'field_to_name_array' => array('id' => 'tour_id', 'name' => 'tour_name', 'start_date' => 'start_date_group', 'end_date' => 'end_date_group'));
     $this->ss->assign('tour_popup_request_data', $json->encode($tour_popup_request_data));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:51,代码来源:GroupProgramsQuickCreate.php

示例6: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Accounts');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"accountsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"accounts\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_accounts\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('accountsQuickCreate');
     $focus = BeanFactory::getBean('Accounts');
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:AccountsQuickCreate.php

示例7: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Tasks');
     parent::process();
     $this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['task_priority_dom'], $app_list_strings['task_priority_default']));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['task_status_dom'], $app_list_strings['task_status_default']));
     $this->ss->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')');
     $focus = new Task();
     $time_start_hour = intval(substr($focus->time_start, 0, 2));
     $time_start_minutes = substr($focus->time_start, 3, 5);
     if ($time_start_minutes > 45) {
         $time_start_hour += 1;
     }
     $time_pref = $timedate->get_time_format();
     if (strpos($time_pref, 'a')) {
         if (!isset($focus->meridiem_am_values)) {
             $focus->meridiem_am_values = array('am' => 'am', 'pm' => 'pm');
         }
         $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_am_values, $time_start_hour < 12 ? 'am' : 'pm'));
     } else {
         if (strpos($time_pref, 'A')) {
             if (!isset($focus->meridiem_AM_values)) {
                 $focus->meridiem_AM_values = array('AM' => 'AM', 'PM' => 'PM');
             }
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_AM_values, $time_start_hour < 12 ? 'AM' : 'PM'));
         }
     }
     //if-else
     $this->ss->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
     $this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"tasksQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('tasksQuickCreate');
     $focus = new Task();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:44,代码来源:TasksQuickCreate.php

示例8: process

 function process()
 {
     global $current_user, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Quotes');
     parent::process();
     $this->ss->assign("STAGE_OPTIONS", get_select_options_with_id($app_list_strings['quote_stage_dom'], ''));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"quotesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"quotes\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_quotes\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('quotesQuickCreate');
     $focus = new Quote();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:19,代码来源:QuotesQuickCreate.php

示例9: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Bugs');
     parent::process();
     $this->ss->assign("PRIORITY_OPTIONS", get_select_options_with_id($app_list_strings['bug_priority_dom'], $app_list_strings['bug_priority_default_key']));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['bug_status_dom'], $app_list_strings['bug_status_default_key']));
     $this->ss->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['bug_type_dom'], $app_list_strings['bug_type_default_key']));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"bugsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"bugs\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_bugs\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('bugsQuickCreate');
     $focus = new Bug();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:21,代码来源:BugsQuickCreate.php

示例10: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Prices');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"pricesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"prices\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_prices\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('pricesQuickCreate');
     $focus = new Price();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     //$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     //$this->ss->assign('CURRENCY_ID', $current_user->getPreference('currency'));
     $this->ss->assign('ISVALID_OPTIONS', get_select_options_with_id($app_list_strings['isvalid_options'], $focus->isvalid));
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:21,代码来源:PricesQuickCreate.php

示例11: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Leads');
     parent::process();
     $this->ss->assign("SALUTATION_OPTIONS", get_select_options_with_id($app_list_strings['salutation_dom'], ''));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['lead_status_dom'], ''));
     $this->ss->assign("LEAD_SOURCE_OPTIONS", get_select_options_with_id($app_list_strings['lead_source_dom'], ''));
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"leadsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"leads\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_leads\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('leadsQuickCreate');
     $focus = BeanFactory::getBean('Leads');
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:21,代码来源:LeadsQuickCreate.php

示例12: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings, $db;
     $mod_strings = return_module_language($current_language, 'ProductOperations');
     parent::process();
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"productoperationsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"productoperations\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_productoperations\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('productoperationsQuickCreate');
     $focus = new ProductOperation();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     $component_id = $_REQUEST['return_id'];
     $query = 'SELECT parent_id';
     $query .= ' FROM products_components';
     $query .= " WHERE deleted=0";
     $query .= " AND id='{$component_id}' ";
     $result = $focus->db->query($query, true, " Error filling in additional detail fields: ");
     $product_id = $focus->db->fetchByAssoc($result);
     $this->ss->assign('product_id_value', $product_id['parent_id']);
     //$this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['project_status_dom'], $focus->status));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
     $json = getJSONobj();
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'projectsQuickCreate', 'field_to_name_array' => array('id' => 'account_id', 'name' => 'account_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
     //machines popup
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'productoperationsQuickCreate', 'field_to_name_array' => array('id' => 'machine_id', 'name' => 'machine_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_machine_popup_request_data', $encoded_popup_request_data);
     //Operation popup
     $popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'productoperationsQuickCreate', 'field_to_name_array' => array('id' => 'operation_id', 'name' => 'operation_name'));
     $encoded_popup_request_data = $json->encode($popup_request_data);
     $this->ss->assign('encoded_operations_popup_request_data', $encoded_popup_request_data);
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:39,代码来源:ProductOperationsQuickCreate.php

示例13: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
     $mod_strings = return_module_language($current_language, 'Calls');
     parent::process();
     $this->ss->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')');
     $this->ss->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
     $this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"callsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('callsQuickCreate');
     $focus = new Call();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     if (is_null($focus->date_start)) {
         $focus->date_start = $timedate->nowDate();
     }
     if (is_null($focus->time_start)) {
         $focus->time_start = $timedate->asUserTime($timedate->getNow(), true);
     }
     if (!isset($focus->duration_hours)) {
         $focus->duration_hours = "1";
     }
     $this->ss->assign("DATE_START", $focus->date_start);
     $this->ss->assign("TIME_START", substr($focus->time_start, 0, 5));
     $time_start_hour = intval(substr($focus->time_start, 0, 2));
     $time_start_minutes = substr($focus->time_start, 3, 5);
     if ($time_start_minutes > 0 && $time_start_minutes < 15) {
         $time_start_minutes = "15";
     } else {
         if ($time_start_minutes > 15 && $time_start_minutes < 30) {
             $time_start_minutes = "30";
         } else {
             if ($time_start_minutes > 30 && $time_start_minutes < 45) {
                 $time_start_minutes = "45";
             } else {
                 if ($time_start_minutes > 45) {
                     $time_start_hour += 1;
                     $time_start_minutes = "00";
                 }
             }
         }
     }
     // We default the to assume that the time preference is set to 11:00 (i.e. without meridiem)
     $hours_arr = array();
     $num_of_hours = 24;
     $start_at = 0;
     $time_pref = $timedate->get_time_format();
     if (strpos($time_pref, 'a') || strpos($time_pref, 'A')) {
         $num_of_hours = 13;
         $start_at = 1;
         // It's important to do this block first before we recalculate $time_start_hour
         $options = strpos($time_pref, 'a') ? $app_list_strings['dom_meridiem_lowercase'] : $app_list_strings['dom_meridiem_uppercase'];
         if (strpos($time_pref, 'a')) {
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start, 'a') ? 'am' : 'pm'));
         } else {
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($options, strpos($focus->time_start, 'A') ? 'AM' : 'PM'));
         }
         // the $num_of_hours array is keyed by values 01, 02, ... 12 for meridiem times
         $time_start_hour = $time_start_hour < 10 ? '0' . $time_start_hour : $time_start_hour;
     }
     for ($i = $start_at; $i < $num_of_hours; $i++) {
         $i = $i . "";
         if (strlen($i) == 1) {
             $i = "0" . $i;
         }
         $hours_arr[$i] = $i;
     }
     $this->ss->assign("TIME_START_HOUR_OPTIONS", get_select_options_with_id($hours_arr, $time_start_hour));
     $this->ss->assign("TIME_START_MINUTE_OPTIONS", get_select_options_with_id($focus->minutes_values, $time_start_minutes));
     $this->ss->assign("DURATION_HOURS", $focus->duration_hours);
     $this->ss->assign("DURATION_MINUTES_OPTIONS", get_select_options_with_id($focus->minutes_values, $focus->duration_minutes));
     $focus->direction = isset($app_list_strings['call_direction_dom']['Outbound']) ? 'Outbound' : $focus->direction;
     $focus->status = isset($app_list_strings['call_status_dom']['Planned']) ? 'Outbound' : $focus->status;
     $this->ss->assign("DIRECTION_OPTIONS", get_select_options_with_id($app_list_strings['call_direction_dom'], $focus->direction));
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['call_status_dom'], $focus->status));
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:83,代码来源:CallsQuickCreate.php

示例14: clean_string

 *
 * All copies of the Covered Code must include on each user interface screen:
 *    (i) the "Powered by SugarCRM" logo and
 *    (ii) the SugarCRM copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * The Original Code is: SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 ********************************************************************************/
clean_string($_REQUEST['target_module'], "STANDARD");
clean_string($_REQUEST['tpl'], "STANDARD");
$target_module = $_REQUEST['target_module'];
// target class
if (is_file('modules/' . $target_module . '/' . $target_module . 'QuickCreate.php')) {
    // if there is a quickcreate override
    require_once 'modules/' . $target_module . '/' . $target_module . 'QuickCreate.php';
    $editviewClass = $target_module . 'QuickCreate';
    // eg. OpportunitiesQuickCreate
    $editview = new $editviewClass($target_module, 'modules/' . $target_module . '/tpls/' . $_REQUEST['tpl']);
    $editview->viaAJAX = true;
} else {
    // else use base class
    require_once 'include/EditView/QuickCreate.php';
    $editview = new QuickCreate($target_module, 'modules/' . $target_module . '/tpls/' . $_REQUEST['tpl']);
}
$editview->process();
echo $editview->display();
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:SubpanelCreates.php

示例15: process

 function process()
 {
     global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings, $timeMeridiem;
     $mod_strings = return_module_language($current_language, 'Meetings');
     parent::process();
     $this->ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['meeting_status_dom'], $app_list_strings['meeting_status_default']));
     $this->ss->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
     $this->ss->assign("TIME_FORMAT", '(' . $timedate->get_user_time_format() . ')');
     $this->ss->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
     if ($this->viaAJAX) {
         // override for ajax call
         $this->ss->assign('saveOnclick', "onclick='if(check_form(\"meetingsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"activities\"); else return false;'");
         $this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_activities\")';");
     }
     $this->ss->assign('viaAJAX', $this->viaAJAX);
     $this->javascript = new javascript();
     $this->javascript->setFormName('meetingsQuickCreate');
     $focus = new Meeting();
     $this->javascript->setSugarBean($focus);
     $this->javascript->addAllFields('');
     if (is_null($focus->date_start)) {
         $focus->date_start = $timedate->to_display_date(gmdate($GLOBALS['timedate']->get_db_date_time_format()));
     }
     if (is_null($focus->time_start)) {
         $focus->time_start = $timedate->to_display_time(gmdate($GLOBALS['timedate']->get_db_date_time_format()), true);
     }
     if (!isset($focus->duration_hours)) {
         $focus->duration_hours = "1";
     }
     $date_start_array = split(" ", trim($focus->date_start));
     if (count($date_start_array) == 2) {
         $focus->time_start = $timedate->to_db_time($date_start_array[1], false);
         //$focus->date_start = $date_start_array[0];
     }
     $this->ss->assign("DATE_START", $focus->date_start);
     $this->ss->assign("TIME_START", substr($focus->time_start, 0, 5));
     $time_start_hour = intval(substr($focus->time_start, 0, 2));
     $time_start_minutes = substr($focus->time_start, 3, 5);
     if ($time_start_minutes > 0 && $time_start_minutes < 15) {
         $time_start_minutes = "15";
     } else {
         if ($time_start_minutes > 15 && $time_start_minutes < 30) {
             $time_start_minutes = "30";
         } else {
             if ($time_start_minutes > 30 && $time_start_minutes < 45) {
                 $time_start_minutes = "45";
             } else {
                 if ($time_start_minutes > 45) {
                     $time_start_hour += 1;
                     $time_start_minutes = "00";
                 }
             }
         }
     }
     // We default the to assume that the time preference is set to 11:00 (i.e. without meridiem)
     $hours_arr = array();
     $num_of_hours = 24;
     $start_at = 0;
     $time_pref = $timedate->get_time_format();
     if (strpos($time_pref, 'a') || strpos($time_pref, 'A')) {
         $num_of_hours = 13;
         $start_at = 1;
     }
     /*
     // Seems to be problematic... $time_meridiem is always empty
     if (empty ($time_meridiem)) {
     	$num_of_hours = 24;
     	$start_at = 0;
     }
     */
     for ($i = $start_at; $i < $num_of_hours; $i++) {
         $i = $i . "";
         if (strlen($i) == 1) {
             $i = "0" . $i;
         }
         $hours_arr[$i] = $i;
     }
     $this->ss->assign("TIME_START_HOUR_OPTIONS", get_select_options_with_id($hours_arr, $time_start_hour));
     $this->ss->assign("TIME_START_MINUTE_OPTIONS", get_select_options_with_id($focus->minutes_values, $time_start_minutes));
     $this->ss->assign("DURATION_HOURS", $focus->duration_hours);
     $this->ss->assign("DURATION_MINUTES_OPTIONS", get_select_options_with_id($focus->minutes_values, $focus->duration_minutes));
     // Test to see if time format is 11:00am; otherwise it's 11:00AM
     if ($num_of_hours == 13) {
         if (strpos($time_pref, 'a')) {
             if (!isset($focus->meridiem_am_values)) {
                 $focus->meridiem_am_values = array('am' => 'am', 'pm' => 'pm');
             }
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_am_values, $time_start_hour < 12 ? 'am' : 'pm'));
         } else {
             if (!isset($focus->meridiem_AM_values)) {
                 $focus->meridiem_AM_values = array('AM' => 'AM', 'PM' => 'PM');
             }
             $this->ss->assign("TIME_MERIDIEM", get_select_options_with_id($focus->meridiem_AM_values, $time_start_hour < 12 ? 'AM' : 'PM'));
         }
         //if-else
     }
     $this->ss->assign('additionalScripts', $this->javascript->getScript(false));
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:98,代码来源:MeetingsQuickCreate.php


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