[Vtigercrm-commits] [vtiger-commits] r5158 - /vtigercrm/trunk/modules/Leads/ConvertLead.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 17 11:29:26 EDT 2006
Author: saraj
Date: Mon Apr 17 09:29:22 2006
New Revision: 5158
Log:
new UI has been integrated for ConvertLead
Modified:
vtigercrm/trunk/modules/Leads/ConvertLead.php
Modified: vtigercrm/trunk/modules/Leads/ConvertLead.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ConvertLead.php (original)
+++ vtigercrm/trunk/modules/Leads/ConvertLead.php Mon Apr 17 09:29:22 2006
@@ -9,19 +9,20 @@
*
********************************************************************************/
-require_once('XTemplate/xtpl.php');
require_once('data/Tracker.php');
require_once('include/utils/utils.php');
require_once('include/database/PearDatabase.php');
-global $mod_strings;
-global $app_strings;
-global $app_list_strings;
+global $mod_strings,$app_strings,$log,$current_user,$theme;
-global $log;
-if(isset($_REQUEST['record'])) {
- $id = $_REQUEST['record'];
-$log->debug(" the id is ".$id);
+$theme_path="themes/".$theme."/";
+$image_path=$theme_path."images/";
+require_once($theme_path.'layout_utils.php');
+
+if(isset($_REQUEST['record']))
+{
+ $id = $_REQUEST['record'];
+ $log->debug(" the id is ".$id);
}
//Retreive lead details from database
@@ -45,40 +46,10 @@
$log->debug(" the potentialname is ".$potentialname);
//Retreiving the current user id
-global $current_user;
$modified_user_id = $current_user->id;
-
-
-global $theme;
-$theme_path="themes/".$theme."/";
-$image_path=$theme_path."images/";
-require_once($theme_path.'layout_utils.php');
-
$log->info("Convert Lead view");
-$xtpl=new XTemplate ('modules/Leads/ConvertLead.html');
-$xtpl->assign("MOD", $mod_strings);
-$xtpl->assign("APP", $app_strings);
$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
-
-$xtpl->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
-$xtpl->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
-$xtpl->assign("DATEFORMAT", $current_user->date_format);
-$xtpl->assign("THEME", $theme);
-$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "phprint.php?jt=".session_id());
-$xtpl->assign("FIRST_NAME",$firstname);
-$xtpl->assign("LAST_NAME",$lastname);
-$xtpl->assign("ID", $id);
-$xtpl->assign("CURRENT_USER_ID", $modified_user_id);
-$xtpl->assign("RETURN_ACTION","DetailView");
-$xtpl->assign("RETURN_MODULE","Leads");
-$xtpl->assign("RETURN_ID",$id);
-$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(), $userid));
-$xtpl->assign("ACCOUNT_NAME",$company);
-$xtpl->assign("CREATE_POTENTIAL","yes");
-$xtpl->assign("POTENTIAL_NAME", $potentialname);
-$xtpl->assign("DATE_CLOSED", $focus->closedate);
-$xtpl->assign("POTENTIAL_AMOUNT", $potential_amount);
$sales_stage_query="select * from sales_stage";
$sales_stage_result = $adb->query($sales_stage_query);
@@ -86,23 +57,98 @@
$sales_stage_fld = '';
for($j = 0; $j < $noofsalesRows; $j++)
{
+
+ $sales_stageValue=$adb->query_result($sales_stage_result,$j,strtolower(sales_stage));
+
+ if($value == $sales_stageValue)
+ {
+ $chk_val = "selected";
+ }
+ else
+ {
+ $chk_val = '';
+ }
+
+ $sales_stage_fld.= '<OPTION value="'.$sales_stageValue.'" '.$chk_val.'>'.$sales_stageValue.'</OPTION>';
+}
+$convertlead = '<link rel="stylesheet" type="text/css" media="all" href="jscalendar/calendar-win2k-cold-1.css">
+ <script type="text/javascript" src="jscalendar/calendar.js"></script>
+ <script type="text/javascript" src="jscalendar/lang/calendar-'.$app_strings['LBL_JSCALENDAR_LANG'].'.js"></script>
+ <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
+ <script language="JavaScript" type="text/javascript" src="include/js/dtlviewajax.js"></script>
+ <form name="ConvertLead" method="POST" action="index.php">
+ <input type="hidden" name="module" value="Leads">
+ <input type="hidden" name="record" value="'.$id.'">
+ <input type="hidden" name="action">
+ <input type="hidden" name="current_user_id" value="'.$modified_user_id.'">
- $sales_stageValue=$adb->query_result($sales_stage_result,$j,strtolower(sales_stage));
+ <div id="orgLay">
+ <table width="100%" border="0" cellpadding="5" cellspacing="0">
+ <tr>
+ <td class="genHeaderSmall" align="left"><IMG src="'.$image_path.'Leads.gif">'.$mod_strings['LBL_CONVERT_LEAD'].' '.$firstname.' '.$lastname.'</td>
+ <td align="right"><a href="javascript:fninvsh(\'orgLay\');"><img src="'.$image_path.'close.gif" align="absmiddle" border="0"></a></td>
+ </tr>
+ <tr><td colspan="2"><hr></td></tr>
+ <tr>
+ <td colspan="2" class="detailedViewHeader"><b>'.$mod_strings['LBL_CONVERT_LEAD_INFORMATION'].'</b></td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel" width="50%">'.$app_strings['LBL_ASSIGNED_TO'].'</td>
+ <td class="dvtCellInfo" width="50%">
+ <select name="assigned_user_id" class="detailedViewTextBox">'.get_select_options_with_id(get_user_array(), $userid).'</select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel">'.$mod_strings['LBL_ACCOUNT_NAME'].'</td>
+ <td class="dvtCellInfo"><input type="text" name="account_name" class="detailedViewTextBox" value="'.$company.'"></td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel">'.$mod_strings['LBL_DO_NOT_CREATE_NEW_POTENTIAL'].'</td>
+ <td class="dvtCellInfo"><input type="checkbox" name="createpotential" onClick="fnSlide2(\'ch\',\'cc\')"></td>
+ </tr>
+ <tr>
+ <td colspan="2" id="ch" height="100" >
+ <div style="display:block;" id="cc" >
+ <table width="100%" border="0" cellpadding="5" cellspacing="0" >
+ <tr>
+ <td align="right" class="dvtCellLabel" width="50%"><font color="red">*</font>'.$mod_strings['LBL_POTENTIAL_NAME'].'</td>
+ <td class="dvtCellInfo" width="50%">
+ <input name="potential_name" value="'.$potentialname.'" tabindex="3">
+ </td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel"><font color="red">*</font>'.$mod_strings['LBL_POTENTIAL_CLOSE_DATE'].'</td>
+ <td class="dvtCellInfo">
+ <input name="closedate" id="jscal_field" type="text" tabindex="4" size="10" maxlength="10" value="'.$focus->closedate.'">
+ <img src="'.$image_path.'calendar.gif" id="jscal_trigger">
+ <font size=1><em old="(yyyy-mm-dd)">('.$current_user->date_format.')</em></font>
+ </td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel">'.$mod_strings['LBL_POTENTIAL_AMOUNT'].'</td>
+ <td class="dvtCellInfo"><input type="text" name="potential_amount" class="detailedViewTextBox">'.$potential_amount.'</td>
+ </tr>
+ <tr>
+ <td align="right" class="dvtCellLabel"><font color="red">*</font>'.$mod_strings['LBL_POTENTIAL_SALES_STAGE'].'</td>
+ <td class="dvtCellInfo"><select name="potential_sales_stage" class="detailedViewTextBox">'.$sales_stage_fld.'</select></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" style="border-bottom:1px dashed #CCCCCC;"> </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input name="Save" value=" Save " onclick="this.form.action.value=\'LeadConvertToEntities\'; return verify_data(ConvertLead)" type="submit" class="classBtn">
+ <input type="button" name=" Cancel " value=" Cancel " onClick="hide(\'orgLay\')" class="classBtn">
+ </td>
+ </tr>
+ </table>
+</div></form>';
+echo $convertlead;
- if($value == $sales_stageValue)
- {
- $chk_val = "selected";
- }
- else
- {
- $chk_val = '';
- }
+//$xtpl->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
- $sales_stage_fld.= '<OPTION value="'.$sales_stageValue.'" '.$chk_val.'>'.$sales_stageValue.'</OPTION>';
-}
-$sales_stage_fld .= '</td>';
-$xtpl->assign("POTENTIAL_SALES_STAGE", $sales_stage_fld);
-
-$xtpl->parse("main");
-$xtpl->out("main");
?>
More information about the vtigercrm-commits
mailing list