@@ -29,32 +29,32 @@ |
||
29 | 29 | $module_name = 'AOS_Products'; |
30 | 30 | $viewdefs[$module_name]['SideQuickCreate'] = array( |
31 | 31 | 'templateMeta' => array('form'=>array('buttons'=>array('SAVE'), |
32 | - 'button_location'=>'bottom', |
|
33 | - 'headerTpl'=>'include/EditView/header.tpl', |
|
34 | - 'footerTpl'=>'include/EditView/footer.tpl', |
|
35 | - ), |
|
36 | - 'maxColumns' => '1', |
|
37 | - 'panelClass'=>'none', |
|
38 | - 'labelsOnTop'=>true, |
|
32 | + 'button_location'=>'bottom', |
|
33 | + 'headerTpl'=>'include/EditView/header.tpl', |
|
34 | + 'footerTpl'=>'include/EditView/footer.tpl', |
|
35 | + ), |
|
36 | + 'maxColumns' => '1', |
|
37 | + 'panelClass'=>'none', |
|
38 | + 'labelsOnTop'=>true, |
|
39 | 39 | 'widths' => array( |
40 | 40 | array('label' => '10', 'field' => '30'), |
41 | - ), |
|
41 | + ), |
|
42 | 42 | ), |
43 | - 'panels' =>array ( |
|
44 | - 'DEFAULT' => |
|
45 | - array ( |
|
43 | + 'panels' =>array ( |
|
44 | + 'DEFAULT' => |
|
45 | + array ( |
|
46 | 46 | array( |
47 | - array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)), |
|
47 | + array('name'=>'name', 'displayParams'=>array('required'=>true,'size'=>20)), |
|
48 | 48 | ), |
49 | 49 | array ( |
50 | - array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)), |
|
50 | + array('name'=>'description','displayParams'=>array('rows'=>3, 'cols'=>20)), |
|
51 | 51 | ), |
52 | 52 | array ( |
53 | - array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)), |
|
53 | + array('name'=>'assigned_user_name', 'displayParams'=>array('required'=>true, 'size'=>11, 'selectOnly'=>true)), |
|
54 | + ), |
|
54 | 55 | ), |
55 | - ), |
|
56 | 56 | |
57 | - ) |
|
57 | + ) |
|
58 | 58 | |
59 | 59 | |
60 | 60 | ); |
@@ -31,12 +31,12 @@ |
||
31 | 31 | * Window - Preferences - PHPeclipse - PHP - Code Templates |
32 | 32 | */ |
33 | 33 | $module_name = 'AOS_Products'; |
34 | - $metafiles[$module_name] = array( |
|
35 | - 'detailviewdefs' => 'modules/' . $module_name . '/metadata/detailviewdefs.php', |
|
36 | - 'editviewdefs' => 'modules/' . $module_name . '/metadata/editviewdefs.php', |
|
37 | - 'listviewdefs' => 'modules/' . $module_name . '/metadata/listviewdefs.php', |
|
38 | - 'searchdefs' => 'modules/' . $module_name . '/metadata/searchdefs.php', |
|
39 | - 'popupdefs' => 'modules/' . $module_name . '/metadata/popupdefs.php', |
|
40 | - 'searchfields' => 'modules/' . $module_name . '/metadata/SearchFields.php', |
|
41 | - ); |
|
34 | + $metafiles[$module_name] = array( |
|
35 | + 'detailviewdefs' => 'modules/' . $module_name . '/metadata/detailviewdefs.php', |
|
36 | + 'editviewdefs' => 'modules/' . $module_name . '/metadata/editviewdefs.php', |
|
37 | + 'listviewdefs' => 'modules/' . $module_name . '/metadata/listviewdefs.php', |
|
38 | + 'searchdefs' => 'modules/' . $module_name . '/metadata/searchdefs.php', |
|
39 | + 'popupdefs' => 'modules/' . $module_name . '/metadata/popupdefs.php', |
|
40 | + 'searchfields' => 'modules/' . $module_name . '/metadata/SearchFields.php', |
|
41 | + ); |
|
42 | 42 | ?> |
@@ -88,29 +88,29 @@ discard block |
||
88 | 88 | $oddRow = true; |
89 | 89 | foreach($focus_users_list as $user) |
90 | 90 | { |
91 | - $user_fields = array( |
|
92 | - 'USER_NAME' => $user->user_name, |
|
93 | - 'FULL_NAME' => $locale->getLocaleFormattedName($user->first_name, $user->last_name), |
|
94 | - 'ID' => $user->id, |
|
95 | - 'EMAIL' => $user->email1, |
|
96 | - 'PHONE_WORK' => $user->phone_work |
|
97 | - ); |
|
91 | + $user_fields = array( |
|
92 | + 'USER_NAME' => $user->user_name, |
|
93 | + 'FULL_NAME' => $locale->getLocaleFormattedName($user->first_name, $user->last_name), |
|
94 | + 'ID' => $user->id, |
|
95 | + 'EMAIL' => $user->email1, |
|
96 | + 'PHONE_WORK' => $user->phone_work |
|
97 | + ); |
|
98 | 98 | |
99 | - $xtpl->assign("USER", $user_fields); |
|
99 | + $xtpl->assign("USER", $user_fields); |
|
100 | 100 | |
101 | - if($oddRow) |
|
101 | + if($oddRow) |
|
102 | 102 | { |
103 | 103 | //todo move to themes |
104 | - $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
104 | + $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
105 | 105 | } |
106 | 106 | else |
107 | 107 | { |
108 | 108 | //todo move to themes |
109 | - $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
109 | + $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
110 | 110 | } |
111 | 111 | $oddRow = !$oddRow; |
112 | 112 | |
113 | - $xtpl->parse("users.row"); |
|
113 | + $xtpl->parse("users.row"); |
|
114 | 114 | // Put the rows in. |
115 | 115 | } |
116 | 116 | |
@@ -120,30 +120,30 @@ discard block |
||
120 | 120 | $oddRow = true; |
121 | 121 | foreach($focus_contacts_list as $contact) |
122 | 122 | { |
123 | - $contact_fields = array( |
|
124 | - 'FIRST_NAME' => $contact->first_name, |
|
125 | - 'LAST_NAME' => $contact->last_name, |
|
126 | - 'ACCOUNT_NAME' => $contact->account_name, |
|
127 | - 'ID' => $contact->id, |
|
128 | - 'EMAIL' => $contact->email1, |
|
129 | - 'PHONE_WORK' => $contact->phone_work |
|
130 | - ); |
|
131 | - |
|
132 | - $xtpl->assign("CONTACT", $contact_fields); |
|
133 | - |
|
134 | - if($oddRow) |
|
123 | + $contact_fields = array( |
|
124 | + 'FIRST_NAME' => $contact->first_name, |
|
125 | + 'LAST_NAME' => $contact->last_name, |
|
126 | + 'ACCOUNT_NAME' => $contact->account_name, |
|
127 | + 'ID' => $contact->id, |
|
128 | + 'EMAIL' => $contact->email1, |
|
129 | + 'PHONE_WORK' => $contact->phone_work |
|
130 | + ); |
|
131 | + |
|
132 | + $xtpl->assign("CONTACT", $contact_fields); |
|
133 | + |
|
134 | + if($oddRow) |
|
135 | 135 | { |
136 | 136 | //todo move to themes |
137 | - $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
137 | + $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
138 | 138 | } |
139 | 139 | else |
140 | 140 | { |
141 | 141 | //todo move to themes |
142 | - $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
142 | + $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
143 | 143 | } |
144 | 144 | $oddRow = !$oddRow; |
145 | 145 | |
146 | - $xtpl->parse("contacts.row"); |
|
146 | + $xtpl->parse("contacts.row"); |
|
147 | 147 | // Put the rows in. |
148 | 148 | } |
149 | 149 |
@@ -656,7 +656,7 @@ |
||
656 | 656 | } |
657 | 657 | } |
658 | 658 | |
659 | - return $users[0]; |
|
659 | + return $users[0]; |
|
660 | 660 | } |
661 | 661 | |
662 | 662 | function setLastUser($user_id, $id) { |
@@ -25,26 +25,26 @@ discard block |
||
25 | 25 | */ |
26 | 26 | |
27 | 27 | class sendEmail{ |
28 | - function send_email($module,$module_type,$printable,$file_name,$attach){ |
|
28 | + function send_email($module,$module_type,$printable,$file_name,$attach){ |
|
29 | 29 | |
30 | - require_once('modules/Emails/Email.php'); |
|
31 | - global $current_user, $mod_strings, $sugar_config; |
|
30 | + require_once('modules/Emails/Email.php'); |
|
31 | + global $current_user, $mod_strings, $sugar_config; |
|
32 | 32 | |
33 | - //First Create e-mail draft |
|
34 | - $email = new Email(); |
|
35 | - // set the id for relationships |
|
36 | - $email->id = create_guid(); |
|
37 | - $email->new_with_id = true; |
|
33 | + //First Create e-mail draft |
|
34 | + $email = new Email(); |
|
35 | + // set the id for relationships |
|
36 | + $email->id = create_guid(); |
|
37 | + $email->new_with_id = true; |
|
38 | 38 | |
39 | - //subject |
|
40 | - $email->name = $mod_strings['LBL_EMAIL_NAME'].' '.$module->name; |
|
41 | - //body |
|
42 | - $email->description_html = $printable; |
|
43 | - //type is draft |
|
44 | - $email->type = "draft"; |
|
45 | - $email->status = "draft"; |
|
39 | + //subject |
|
40 | + $email->name = $mod_strings['LBL_EMAIL_NAME'].' '.$module->name; |
|
41 | + //body |
|
42 | + $email->description_html = $printable; |
|
43 | + //type is draft |
|
44 | + $email->type = "draft"; |
|
45 | + $email->status = "draft"; |
|
46 | 46 | |
47 | - if(!empty($module->billing_contact_id) && $module->billing_contact_id!="") |
|
47 | + if(!empty($module->billing_contact_id) && $module->billing_contact_id!="") |
|
48 | 48 | $contact_id = $module->billing_contact_id; |
49 | 49 | else if(!empty($module->contact_id) && $module->contact_id!="") |
50 | 50 | $contact_id = $module->contact_id; |
@@ -62,38 +62,38 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | |
65 | - //team id |
|
66 | - $email->team_id = $current_user->default_team; |
|
67 | - //assigned_user_id |
|
68 | - $email->assigned_user_id = $current_user->id; |
|
69 | - //Save the email object |
|
70 | - global $timedate; |
|
71 | - $email->date_start = $timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format())); |
|
72 | - $email->save(FALSE); |
|
73 | - $email_id = $email->id; |
|
65 | + //team id |
|
66 | + $email->team_id = $current_user->default_team; |
|
67 | + //assigned_user_id |
|
68 | + $email->assigned_user_id = $current_user->id; |
|
69 | + //Save the email object |
|
70 | + global $timedate; |
|
71 | + $email->date_start = $timedate->to_display_date_time(gmdate($GLOBALS['timedate']->get_db_date_time_format())); |
|
72 | + $email->save(FALSE); |
|
73 | + $email_id = $email->id; |
|
74 | 74 | |
75 | - if($attach) |
|
76 | - { |
|
77 | - $note = new Note(); |
|
78 | - $note->modified_user_id = $current_user->id; |
|
79 | - $note->created_by = $current_user->id; |
|
80 | - $note->name = $file_name; |
|
81 | - $note->parent_type = 'Emails'; |
|
82 | - $note->parent_id = $email_id; |
|
83 | - $note->file_mime_type = 'application/pdf'; |
|
84 | - $note->filename = $file_name; |
|
85 | - $note->save(); |
|
75 | + if($attach) |
|
76 | + { |
|
77 | + $note = new Note(); |
|
78 | + $note->modified_user_id = $current_user->id; |
|
79 | + $note->created_by = $current_user->id; |
|
80 | + $note->name = $file_name; |
|
81 | + $note->parent_type = 'Emails'; |
|
82 | + $note->parent_id = $email_id; |
|
83 | + $note->file_mime_type = 'application/pdf'; |
|
84 | + $note->filename = $file_name; |
|
85 | + $note->save(); |
|
86 | 86 | |
87 | - rename($sugar_config['upload_dir'].'attachfile.pdf',$sugar_config['upload_dir'].$note->id); |
|
88 | - } |
|
87 | + rename($sugar_config['upload_dir'].'attachfile.pdf',$sugar_config['upload_dir'].$note->id); |
|
88 | + } |
|
89 | 89 | |
90 | - //redirect |
|
91 | - if($email_id=="") { |
|
92 | - echo "Unable to initiate Email Client"; |
|
93 | - exit; |
|
94 | - } else { |
|
95 | - header("Location: index.php?action=Compose&module=Emails&return_module=".$module_type."&return_action=DetailView&return_id=".$_REQUEST['record']."&recordId=".$email_id); |
|
96 | - } |
|
97 | - } |
|
90 | + //redirect |
|
91 | + if($email_id=="") { |
|
92 | + echo "Unable to initiate Email Client"; |
|
93 | + exit; |
|
94 | + } else { |
|
95 | + header("Location: index.php?action=Compose&module=Emails&return_module=".$module_type."&return_action=DetailView&return_id=".$_REQUEST['record']."&recordId=".$email_id); |
|
96 | + } |
|
97 | + } |
|
98 | 98 | } |
99 | 99 | ?> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | function smarty_modifier_spacify($string, $spacify_char = ' ') |
23 | 23 | { |
24 | 24 | return implode($spacify_char, |
25 | - preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY)); |
|
25 | + preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY)); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /* vim: set expandtab: */ |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | $_params = array('resource_name' => $_file, |
59 | - 'resource_base_path' => $smarty->config_dir, |
|
60 | - 'get_source' => false); |
|
59 | + 'resource_base_path' => $smarty->config_dir, |
|
60 | + 'get_source' => false); |
|
61 | 61 | $smarty->_parse_resource_name($_params); |
62 | 62 | $_file_path = $_params['resource_type'] . ':' . $_params['resource_name']; |
63 | 63 | if (isset($_section)) |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | $_compile = true; |
70 | 70 | } elseif ($smarty->compile_check) { |
71 | 71 | $_params = array('resource_name' => $_file, |
72 | - 'resource_base_path' => $smarty->config_dir, |
|
73 | - 'get_source' => false); |
|
72 | + 'resource_base_path' => $smarty->config_dir, |
|
73 | + 'get_source' => false); |
|
74 | 74 | $_compile = $smarty->_fetch_resource_info($_params) && |
75 | 75 | $_params['resource_timestamp'] > filemtime($_compile_file); |
76 | 76 | } else { |
@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $_params = array('resource_name' => $_file, |
92 | - 'resource_base_path' => $smarty->config_dir, |
|
93 | - $_params['get_source'] = true); |
|
92 | + 'resource_base_path' => $smarty->config_dir, |
|
93 | + $_params['get_source'] = true); |
|
94 | 94 | if (!$smarty->_fetch_resource_info($_params)) { |
95 | 95 | return; |
96 | 96 | } |
@@ -130,18 +130,18 @@ |
||
130 | 130 | function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids) { |
131 | 131 | $_output = ''; |
132 | 132 | if ($labels) { |
133 | - if($label_ids) { |
|
134 | - $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); |
|
135 | - $_output .= '<label for="' . $_id . '">'; |
|
136 | - } else { |
|
137 | - $_output .= '<label>'; |
|
138 | - } |
|
139 | - } |
|
140 | - $_output .= '<input type="radio" name="' |
|
133 | + if($label_ids) { |
|
134 | + $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value)); |
|
135 | + $_output .= '<label for="' . $_id . '">'; |
|
136 | + } else { |
|
137 | + $_output .= '<label>'; |
|
138 | + } |
|
139 | + } |
|
140 | + $_output .= '<input type="radio" name="' |
|
141 | 141 | . smarty_function_escape_special_chars($name) . '" value="' |
142 | 142 | . smarty_function_escape_special_chars($value) . '"'; |
143 | 143 | |
144 | - if ($labels && $label_ids) $_output .= ' id="' . $_id . '"'; |
|
144 | + if ($labels && $label_ids) $_output .= ' id="' . $_id . '"'; |
|
145 | 145 | |
146 | 146 | if ((string)$value==$selected) { |
147 | 147 | $_output .= ' checked="checked"'; |
@@ -62,27 +62,27 @@ |
||
62 | 62 | 'panels' =>array ( |
63 | 63 | 'default' => |
64 | 64 | array ( |
65 | - array ( |
|
65 | + array ( |
|
66 | 66 | 'name', |
67 | 67 | 'assigned_user_name', |
68 | - ), |
|
68 | + ), |
|
69 | 69 | |
70 | - array ( |
|
71 | - array ( |
|
72 | - 'name' => 'date_entered', |
|
73 | - 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
|
74 | - 'label' => 'LBL_DATE_ENTERED', |
|
70 | + array ( |
|
71 | + array ( |
|
72 | + 'name' => 'date_entered', |
|
73 | + 'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}', |
|
74 | + 'label' => 'LBL_DATE_ENTERED', |
|
75 | 75 | ), |
76 | 76 | array ( |
77 | - 'name' => 'date_modified', |
|
78 | - 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
|
79 | - 'label' => 'LBL_DATE_MODIFIED', |
|
77 | + 'name' => 'date_modified', |
|
78 | + 'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}', |
|
79 | + 'label' => 'LBL_DATE_MODIFIED', |
|
80 | + ), |
|
80 | 81 | ), |
81 | - ), |
|
82 | 82 | |
83 | - array ( |
|
83 | + array ( |
|
84 | 84 | 'description', |
85 | - ), |
|
85 | + ), |
|
86 | 86 | ), |
87 | 87 | ) |
88 | 88 | ); |