@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | $listViewDefs ['Calls'] = |
41 | 41 | array ( |
42 | - 'SET_COMPLETE' => |
|
43 | - array ( |
|
42 | + 'SET_COMPLETE' => |
|
43 | + array ( |
|
44 | 44 | 'width' => '1%', |
45 | 45 | 'label' => 'LBL_LIST_CLOSE', |
46 | 46 | 'link' => true, |
@@ -48,25 +48,25 @@ discard block |
||
48 | 48 | 'default' => true, |
49 | 49 | 'related_fields' => |
50 | 50 | array ( |
51 | - 0 => 'status', |
|
51 | + 0 => 'status', |
|
52 | + ), |
|
52 | 53 | ), |
53 | - ), |
|
54 | - 'DIRECTION' => |
|
55 | - array ( |
|
54 | + 'DIRECTION' => |
|
55 | + array ( |
|
56 | 56 | 'width' => '10%', |
57 | 57 | 'label' => 'LBL_LIST_DIRECTION', |
58 | 58 | 'link' => false, |
59 | 59 | 'default' => true, |
60 | - ), |
|
61 | - 'NAME' => |
|
62 | - array ( |
|
60 | + ), |
|
61 | + 'NAME' => |
|
62 | + array ( |
|
63 | 63 | 'width' => '40%', |
64 | 64 | 'label' => 'LBL_LIST_SUBJECT', |
65 | 65 | 'link' => true, |
66 | 66 | 'default' => true, |
67 | - ), |
|
68 | - 'CONTACT_NAME' => |
|
69 | - array ( |
|
67 | + ), |
|
68 | + 'CONTACT_NAME' => |
|
69 | + array ( |
|
70 | 70 | 'width' => '20%', |
71 | 71 | 'label' => 'LBL_LIST_CONTACT', |
72 | 72 | 'link' => true, |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | 'module' => 'Contacts', |
75 | 75 | 'default' => true, |
76 | 76 | 'ACLTag' => 'CONTACT', |
77 | - ), |
|
78 | - 'PARENT_NAME' => |
|
79 | - array ( |
|
77 | + ), |
|
78 | + 'PARENT_NAME' => |
|
79 | + array ( |
|
80 | 80 | 'width' => '20%', |
81 | 81 | 'label' => 'LBL_LIST_RELATED_TO', |
82 | 82 | 'dynamic_module' => 'PARENT_TYPE', |
@@ -87,40 +87,40 @@ discard block |
||
87 | 87 | 'ACLTag' => 'PARENT', |
88 | 88 | 'related_fields' => |
89 | 89 | array ( |
90 | - 0 => 'parent_id', |
|
91 | - 1 => 'parent_type', |
|
90 | + 0 => 'parent_id', |
|
91 | + 1 => 'parent_type', |
|
92 | + ), |
|
92 | 93 | ), |
93 | - ), |
|
94 | - 'DATE_START' => |
|
95 | - array ( |
|
94 | + 'DATE_START' => |
|
95 | + array ( |
|
96 | 96 | 'width' => '15%', |
97 | 97 | 'label' => 'LBL_LIST_DATE', |
98 | 98 | 'link' => false, |
99 | 99 | 'default' => true, |
100 | 100 | 'related_fields' => |
101 | 101 | array ( |
102 | - 0 => 'time_start', |
|
102 | + 0 => 'time_start', |
|
103 | + ), |
|
103 | 104 | ), |
104 | - ), |
|
105 | - 'ASSIGNED_USER_NAME' => |
|
106 | - array ( |
|
105 | + 'ASSIGNED_USER_NAME' => |
|
106 | + array ( |
|
107 | 107 | 'width' => '2%', |
108 | 108 | 'label' => 'LBL_LIST_ASSIGNED_TO_NAME', |
109 | 109 | 'module' => 'Employees', |
110 | 110 | 'id' => 'ASSIGNED_USER_ID', |
111 | 111 | 'default' => true, |
112 | - ), |
|
113 | - 'STATUS' => |
|
114 | - array ( |
|
112 | + ), |
|
113 | + 'STATUS' => |
|
114 | + array ( |
|
115 | 115 | 'width' => '10%', |
116 | 116 | 'label' => 'LBL_STATUS', |
117 | 117 | 'link' => false, |
118 | 118 | 'default' => false, |
119 | - ), |
|
120 | - 'DATE_ENTERED' => array ( |
|
119 | + ), |
|
120 | + 'DATE_ENTERED' => array ( |
|
121 | 121 | 'width' => '10%', |
122 | 122 | 'label' => 'LBL_DATE_ENTERED', |
123 | 123 | 'default' => true |
124 | - ), |
|
124 | + ), |
|
125 | 125 | ); |
126 | 126 | ?> |
@@ -38,35 +38,35 @@ discard block |
||
38 | 38 | ********************************************************************************/ |
39 | 39 | |
40 | 40 | $listViewDefs ['Calls'] = |
41 | -array ( |
|
41 | +array( |
|
42 | 42 | 'SET_COMPLETE' => |
43 | - array ( |
|
43 | + array( |
|
44 | 44 | 'width' => '1%', |
45 | 45 | 'label' => 'LBL_LIST_CLOSE', |
46 | 46 | 'link' => true, |
47 | 47 | 'sortable' => false, |
48 | 48 | 'default' => true, |
49 | 49 | 'related_fields' => |
50 | - array ( |
|
50 | + array( |
|
51 | 51 | 0 => 'status', |
52 | 52 | ), |
53 | 53 | ), |
54 | 54 | 'DIRECTION' => |
55 | - array ( |
|
55 | + array( |
|
56 | 56 | 'width' => '10%', |
57 | 57 | 'label' => 'LBL_LIST_DIRECTION', |
58 | 58 | 'link' => false, |
59 | 59 | 'default' => true, |
60 | 60 | ), |
61 | 61 | 'NAME' => |
62 | - array ( |
|
62 | + array( |
|
63 | 63 | 'width' => '40%', |
64 | 64 | 'label' => 'LBL_LIST_SUBJECT', |
65 | 65 | 'link' => true, |
66 | 66 | 'default' => true, |
67 | 67 | ), |
68 | 68 | 'CONTACT_NAME' => |
69 | - array ( |
|
69 | + array( |
|
70 | 70 | 'width' => '20%', |
71 | 71 | 'label' => 'LBL_LIST_CONTACT', |
72 | 72 | 'link' => true, |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | 'ACLTag' => 'CONTACT', |
77 | 77 | ), |
78 | 78 | 'PARENT_NAME' => |
79 | - array ( |
|
79 | + array( |
|
80 | 80 | 'width' => '20%', |
81 | 81 | 'label' => 'LBL_LIST_RELATED_TO', |
82 | 82 | 'dynamic_module' => 'PARENT_TYPE', |
@@ -86,24 +86,24 @@ discard block |
||
86 | 86 | 'sortable' => false, |
87 | 87 | 'ACLTag' => 'PARENT', |
88 | 88 | 'related_fields' => |
89 | - array ( |
|
89 | + array( |
|
90 | 90 | 0 => 'parent_id', |
91 | 91 | 1 => 'parent_type', |
92 | 92 | ), |
93 | 93 | ), |
94 | 94 | 'DATE_START' => |
95 | - array ( |
|
95 | + array( |
|
96 | 96 | 'width' => '15%', |
97 | 97 | 'label' => 'LBL_LIST_DATE', |
98 | 98 | 'link' => false, |
99 | 99 | 'default' => true, |
100 | 100 | 'related_fields' => |
101 | - array ( |
|
101 | + array( |
|
102 | 102 | 0 => 'time_start', |
103 | 103 | ), |
104 | 104 | ), |
105 | 105 | 'ASSIGNED_USER_NAME' => |
106 | - array ( |
|
106 | + array( |
|
107 | 107 | 'width' => '2%', |
108 | 108 | 'label' => 'LBL_LIST_ASSIGNED_TO_NAME', |
109 | 109 | 'module' => 'Employees', |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | 'default' => true, |
112 | 112 | ), |
113 | 113 | 'STATUS' => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 'width' => '10%', |
116 | 116 | 'label' => 'LBL_STATUS', |
117 | 117 | 'link' => false, |
118 | 118 | 'default' => false, |
119 | 119 | ), |
120 | - 'DATE_ENTERED' => array ( |
|
120 | + 'DATE_ENTERED' => array( |
|
121 | 121 | 'width' => '10%', |
122 | 122 | 'label' => 'LBL_DATE_ENTERED', |
123 | 123 | 'default' => true |
@@ -44,46 +44,46 @@ |
||
44 | 44 | |
45 | 45 | class CallsViewEdit extends ViewEdit |
46 | 46 | { |
47 | - /** |
|
48 | - * @see SugarView::preDisplay() |
|
49 | - */ |
|
50 | - public function preDisplay() |
|
51 | - { |
|
52 | - if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | - $this->bean->status = ''; |
|
54 | - } //if |
|
47 | + /** |
|
48 | + * @see SugarView::preDisplay() |
|
49 | + */ |
|
50 | + public function preDisplay() |
|
51 | + { |
|
52 | + if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | + $this->bean->status = ''; |
|
54 | + } //if |
|
55 | 55 | if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
56 | - $this->bean->status = 'Held'; |
|
57 | - } |
|
58 | - parent::preDisplay(); |
|
59 | - } |
|
56 | + $this->bean->status = 'Held'; |
|
57 | + } |
|
58 | + parent::preDisplay(); |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @see SugarView::display() |
|
63 | - */ |
|
64 | - public function display() |
|
65 | - { |
|
66 | - global $json; |
|
61 | + /** |
|
62 | + * @see SugarView::display() |
|
63 | + */ |
|
64 | + public function display() |
|
65 | + { |
|
66 | + global $json; |
|
67 | 67 | $json = getJSONobj(); |
68 | 68 | $json_config = new json_config(); |
69 | - if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) { |
|
70 | - $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); |
|
69 | + if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) { |
|
70 | + $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id); |
|
71 | 71 | |
72 | - } else { |
|
73 | - $this->bean->json_id = $this->bean->id; |
|
74 | - $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); |
|
72 | + } else { |
|
73 | + $this->bean->json_id = $this->bean->id; |
|
74 | + $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id); |
|
75 | 75 | |
76 | - } |
|
77 | - $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); |
|
76 | + } |
|
77 | + $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript); |
|
78 | 78 | |
79 | - $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
80 | - $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
81 | - $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
|
82 | - $this->ss->assign('remindersDisabled', json_encode(false)); |
|
79 | + $this->ss->assign('remindersData', Reminder::loadRemindersData('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
80 | + $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Calls', $this->bean->id, $this->ev->isDuplicate)); |
|
81 | + $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
|
82 | + $this->ss->assign('remindersDisabled', json_encode(false)); |
|
83 | 83 | |
84 | - if($this->ev->isDuplicate){ |
|
85 | - $this->bean->status = $this->bean->getDefaultStatus(); |
|
86 | - } //if |
|
87 | - parent::display(); |
|
88 | - } |
|
84 | + if($this->ev->isDuplicate){ |
|
85 | + $this->bean->status = $this->bean->getDefaultStatus(); |
|
86 | + } //if |
|
87 | + parent::display(); |
|
88 | + } |
|
89 | 89 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | |
4 | 4 | /********************************************************************************* |
5 | 5 | * SugarCRM Community Edition is a customer relationship management program developed by |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function preDisplay() |
51 | 51 | { |
52 | - if($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
52 | + if ($_REQUEST['module'] != 'Calls' && isset($_REQUEST['status']) && empty($_REQUEST['status'])) { |
|
53 | 53 | $this->bean->status = ''; |
54 | 54 | } //if |
55 | - if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
|
55 | + if (!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) { |
|
56 | 56 | $this->bean->status = 'Held'; |
57 | 57 | } |
58 | 58 | parent::preDisplay(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson()); |
82 | 82 | $this->ss->assign('remindersDisabled', json_encode(false)); |
83 | 83 | |
84 | - if($this->ev->isDuplicate){ |
|
84 | + if ($this->ev->isDuplicate) { |
|
85 | 85 | $this->bean->status = $this->bean->getDefaultStatus(); |
86 | 86 | } //if |
87 | 87 | parent::display(); |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -86,29 +86,29 @@ discard block |
||
86 | 86 | $oddRow = true; |
87 | 87 | foreach($focus_users_list as $user) |
88 | 88 | { |
89 | - $user_fields = array( |
|
90 | - 'USER_NAME' => $user->user_name, |
|
91 | - 'FULL_NAME' => $user->first_name." ".$user->last_name, |
|
92 | - 'ID' => $user->id, |
|
93 | - 'EMAIL' => $user->email1, |
|
94 | - 'PHONE_WORK' => $user->phone_work |
|
95 | - ); |
|
89 | + $user_fields = array( |
|
90 | + 'USER_NAME' => $user->user_name, |
|
91 | + 'FULL_NAME' => $user->first_name." ".$user->last_name, |
|
92 | + 'ID' => $user->id, |
|
93 | + 'EMAIL' => $user->email1, |
|
94 | + 'PHONE_WORK' => $user->phone_work |
|
95 | + ); |
|
96 | 96 | |
97 | - $xtpl->assign("USER", $user_fields); |
|
97 | + $xtpl->assign("USER", $user_fields); |
|
98 | 98 | |
99 | - if($oddRow) |
|
99 | + if($oddRow) |
|
100 | 100 | { |
101 | 101 | //todo move to themes |
102 | - $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
102 | + $xtpl->assign("ROW_COLOR", 'oddListRow'); |
|
103 | 103 | } |
104 | 104 | else |
105 | 105 | { |
106 | 106 | //todo move to themes |
107 | - $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
107 | + $xtpl->assign("ROW_COLOR", 'evenListRow'); |
|
108 | 108 | } |
109 | 109 | $oddRow = !$oddRow; |
110 | 110 | |
111 | - $xtpl->parse("users.row"); |
|
111 | + $xtpl->parse("users.row"); |
|
112 | 112 | // Put the rows in. |
113 | 113 | } |
114 | 114 | |
@@ -120,30 +120,30 @@ discard block |
||
120 | 120 | |
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 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -76,15 +76,15 @@ discard block |
||
76 | 76 | |
77 | 77 | // Stick the form header out there. |
78 | 78 | echo get_form_header($mod_strings['LBL_INVITEE'], $button, false); |
79 | -$xtpl=new XTemplate ('modules/Emails/SubPanelViewRecipients.html'); |
|
79 | +$xtpl = new XTemplate('modules/Emails/SubPanelViewRecipients.html'); |
|
80 | 80 | $xtpl->assign("MOD", $mod_strings); |
81 | 81 | $xtpl->assign("APP", $app_strings); |
82 | 82 | $xtpl->assign("RETURN_URL", "&return_module=$currentModule&return_action=DetailView&return_id=$focus->id"); |
83 | 83 | $xtpl->assign("EMAIL_ID", $focus->id); |
84 | -$xtpl->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_REMOVE'])); |
|
85 | -$xtpl->assign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" border="0"', null,null,'.gif',$app_strings['LNK_EDIT'])); |
|
84 | +$xtpl->assign("DELETE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_REMOVE'])); |
|
85 | +$xtpl->assign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_EDIT'])); |
|
86 | 86 | $oddRow = true; |
87 | -foreach($focus_users_list as $user) |
|
87 | +foreach ($focus_users_list as $user) |
|
88 | 88 | { |
89 | 89 | $user_fields = array( |
90 | 90 | 'USER_NAME' => $user->user_name, |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $xtpl->assign("USER", $user_fields); |
98 | 98 | |
99 | - if($oddRow) |
|
99 | + if ($oddRow) |
|
100 | 100 | { |
101 | 101 | //todo move to themes |
102 | 102 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $oddRow = true; |
119 | 119 | print count($focus_contacts_list); |
120 | 120 | |
121 | -foreach($focus_contacts_list as $contact) |
|
121 | +foreach ($focus_contacts_list as $contact) |
|
122 | 122 | { |
123 | 123 | $contact_fields = array( |
124 | 124 | 'FIRST_NAME' => $contact->first_name, |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | $xtpl->assign("CONTACT", $contact_fields); |
133 | 133 | |
134 | - if($oddRow) |
|
134 | + if ($oddRow) |
|
135 | 135 | { |
136 | 136 | //todo move to themes |
137 | 137 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -63,14 +65,19 @@ discard block |
||
63 | 65 | |
64 | 66 | $button = "<table cellspacing='0' cellpadding='1' border='0'><form border='0' action='index.php' method='post' name='form' id='form'>\n"; |
65 | 67 | $button .= "<input type='hidden' name='module' value='Contacts'>\n"; |
66 | -if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n"; |
|
68 | +if ($currentModule == 'Accounts') { |
|
69 | + $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value='$focus->name'>\n"; |
|
70 | +} |
|
67 | 71 | $button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n"; |
68 | 72 | $button .= "<input type='hidden' name='return_action' value='".$action."'>\n"; |
69 | 73 | $button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n"; |
70 | 74 | $button .= "<input type='hidden' name='action'>\n"; |
71 | 75 | $button .= "<tr><td> </td>"; |
72 | -if ($focus->parent_type == "Accounts") $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n"; |
|
73 | -else $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n"; |
|
76 | +if ($focus->parent_type == "Accounts") { |
|
77 | + $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)."\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n"; |
|
78 | +} else { |
|
79 | + $button .= "<td><input title='".$app_strings['LBL_SELECT_CONTACT_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_CONTACT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Contacts&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n"; |
|
80 | +} |
|
74 | 81 | $button .= "<td><input title='".$app_strings['LBL_SELECT_USER_BUTTON_TITLE']."' type='button' class='button' value='".$app_strings['LBL_SELECT_USER_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'></td>\n"; |
75 | 82 | $button .= "</tr></form></table>\n"; |
76 | 83 | |
@@ -100,8 +107,7 @@ discard block |
||
100 | 107 | { |
101 | 108 | //todo move to themes |
102 | 109 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
103 | - } |
|
104 | - else |
|
110 | + } else |
|
105 | 111 | { |
106 | 112 | //todo move to themes |
107 | 113 | $xtpl->assign("ROW_COLOR", 'evenListRow'); |
@@ -135,8 +141,7 @@ discard block |
||
135 | 141 | { |
136 | 142 | //todo move to themes |
137 | 143 | $xtpl->assign("ROW_COLOR", 'oddListRow'); |
138 | - } |
|
139 | - else |
|
144 | + } else |
|
140 | 145 | { |
141 | 146 | //todo move to themes |
142 | 147 | $xtpl->assign("ROW_COLOR", 'evenListRow'); |
@@ -42,47 +42,47 @@ |
||
42 | 42 | |
43 | 43 | |
44 | 44 | class AM_TaskTemplates_sugar extends Basic { |
45 | - var $new_schema = true; |
|
46 | - var $module_dir = 'AM_TaskTemplates'; |
|
47 | - var $object_name = 'AM_TaskTemplates'; |
|
48 | - var $table_name = 'am_tasktemplates'; |
|
49 | - var $importable = false; |
|
50 | - var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
51 | - var $id; |
|
52 | - var $name; |
|
53 | - var $date_entered; |
|
54 | - var $date_modified; |
|
55 | - var $modified_user_id; |
|
56 | - var $modified_by_name; |
|
57 | - var $created_by; |
|
58 | - var $created_by_name; |
|
59 | - var $description; |
|
60 | - var $deleted; |
|
61 | - var $created_by_link; |
|
62 | - var $modified_user_link; |
|
63 | - var $assigned_user_id; |
|
64 | - var $assigned_user_name; |
|
65 | - var $assigned_user_link; |
|
66 | - var $status; |
|
67 | - var $priority; |
|
68 | - var $percent_complete; |
|
69 | - var $predecessors; |
|
70 | - var $milestone_flag; |
|
71 | - var $relationship_type; |
|
72 | - var $task_number; |
|
73 | - var $order_number; |
|
74 | - var $estimated_effort; |
|
75 | - var $utilization; |
|
76 | - var $duration; |
|
77 | - function AM_TaskTemplates_sugar(){ |
|
78 | - parent::Basic(); |
|
79 | - } |
|
45 | + var $new_schema = true; |
|
46 | + var $module_dir = 'AM_TaskTemplates'; |
|
47 | + var $object_name = 'AM_TaskTemplates'; |
|
48 | + var $table_name = 'am_tasktemplates'; |
|
49 | + var $importable = false; |
|
50 | + var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
51 | + var $id; |
|
52 | + var $name; |
|
53 | + var $date_entered; |
|
54 | + var $date_modified; |
|
55 | + var $modified_user_id; |
|
56 | + var $modified_by_name; |
|
57 | + var $created_by; |
|
58 | + var $created_by_name; |
|
59 | + var $description; |
|
60 | + var $deleted; |
|
61 | + var $created_by_link; |
|
62 | + var $modified_user_link; |
|
63 | + var $assigned_user_id; |
|
64 | + var $assigned_user_name; |
|
65 | + var $assigned_user_link; |
|
66 | + var $status; |
|
67 | + var $priority; |
|
68 | + var $percent_complete; |
|
69 | + var $predecessors; |
|
70 | + var $milestone_flag; |
|
71 | + var $relationship_type; |
|
72 | + var $task_number; |
|
73 | + var $order_number; |
|
74 | + var $estimated_effort; |
|
75 | + var $utilization; |
|
76 | + var $duration; |
|
77 | + function AM_TaskTemplates_sugar(){ |
|
78 | + parent::Basic(); |
|
79 | + } |
|
80 | 80 | |
81 | - function bean_implements($interface){ |
|
82 | - switch($interface){ |
|
83 | - case 'ACL': return true; |
|
84 | - } |
|
85 | - return false; |
|
81 | + function bean_implements($interface){ |
|
82 | + switch($interface){ |
|
83 | + case 'ACL': return true; |
|
84 | + } |
|
85 | + return false; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | var $object_name = 'AM_TaskTemplates'; |
48 | 48 | var $table_name = 'am_tasktemplates'; |
49 | 49 | var $importable = false; |
50 | - var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
50 | + var $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO |
|
51 | 51 | var $id; |
52 | 52 | var $name; |
53 | 53 | var $date_entered; |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | var $estimated_effort; |
75 | 75 | var $utilization; |
76 | 76 | var $duration; |
77 | - function AM_TaskTemplates_sugar(){ |
|
77 | + function AM_TaskTemplates_sugar() { |
|
78 | 78 | parent::Basic(); |
79 | 79 | } |
80 | 80 | |
81 | - function bean_implements($interface){ |
|
82 | - switch($interface){ |
|
81 | + function bean_implements($interface) { |
|
82 | + switch ($interface) { |
|
83 | 83 | case 'ACL': return true; |
84 | 84 | } |
85 | 85 | return false; |
@@ -40,9 +40,9 @@ |
||
40 | 40 | require_once('modules/AM_TaskTemplates/AM_TaskTemplates_sugar.php'); |
41 | 41 | class AM_TaskTemplates extends AM_TaskTemplates_sugar { |
42 | 42 | |
43 | - function AM_TaskTemplates(){ |
|
44 | - parent::AM_TaskTemplates_sugar(); |
|
45 | - } |
|
43 | + function AM_TaskTemplates(){ |
|
44 | + parent::AM_TaskTemplates_sugar(); |
|
45 | + } |
|
46 | 46 | |
47 | 47 | } |
48 | 48 | ?> |
49 | 49 | \ No newline at end of file |
@@ -40,7 +40,7 @@ |
||
40 | 40 | require_once('modules/AM_TaskTemplates/AM_TaskTemplates_sugar.php'); |
41 | 41 | class AM_TaskTemplates extends AM_TaskTemplates_sugar { |
42 | 42 | |
43 | - function AM_TaskTemplates(){ |
|
43 | + function AM_TaskTemplates() { |
|
44 | 44 | parent::AM_TaskTemplates_sugar(); |
45 | 45 | } |
46 | 46 |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | |
5 | 5 | class Jjwg_MarkersViewMarker_Detail_Map extends SugarView { |
6 | 6 | |
7 | - function Jjwg_MarkersViewMarker_Detail_Map() { |
|
7 | + function Jjwg_MarkersViewMarker_Detail_Map() { |
|
8 | 8 | parent::SugarView(); |
9 | - } |
|
9 | + } |
|
10 | 10 | |
11 | - function display() { |
|
11 | + function display() { |
|
12 | 12 | |
13 | 13 | $custom_markers_dir = 'themes/default/images/jjwg_Markers/'; |
14 | 14 | |
@@ -131,6 +131,6 @@ discard block |
||
131 | 131 | |
132 | 132 | <?php |
133 | 133 | |
134 | - } |
|
134 | + } |
|
135 | 135 | |
136 | 136 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | |
5 | 5 | class Jjwg_MarkersViewMarker_Edit_Map extends SugarView { |
6 | 6 | |
7 | - function Jjwg_MarkersViewMarker_Edit_Map() { |
|
7 | + function Jjwg_MarkersViewMarker_Edit_Map() { |
|
8 | 8 | parent::SugarView(); |
9 | - } |
|
9 | + } |
|
10 | 10 | |
11 | - function display() { |
|
11 | + function display() { |
|
12 | 12 | |
13 | 13 | // Users local settings for decimal seperator and number grouping seperator |
14 | 14 | $dec_sep = $GLOBALS['sugar_config']['default_decimal_seperator']; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | mapTypeId: google.maps.MapTypeId.ROADMAP |
114 | 114 | }); |
115 | 115 | <?php |
116 | - if (!empty($GLOBALS['loc']['image'])) { |
|
116 | + if (!empty($GLOBALS['loc']['image'])) { |
|
117 | 117 | ?> |
118 | 118 | var customImage = new google.maps.MarkerImage('<?php echo $custom_markers_dir; ?>/<?php echo javascript_escape($GLOBALS['loc']['image']); ?>.png', |
119 | 119 | new google.maps.Size(32,37), |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ); |
123 | 123 | var shape = {coord: [1, 1, 1, 37, 32, 37, 32, 1],type: 'poly'}; |
124 | 124 | <?php |
125 | - } // empty image |
|
125 | + } // empty image |
|
126 | 126 | ?> |
127 | 127 | |
128 | 128 | var marker = new google.maps.Marker({ |
@@ -176,6 +176,6 @@ discard block |
||
176 | 176 | |
177 | 177 | <?php |
178 | 178 | |
179 | - } |
|
179 | + } |
|
180 | 180 | |
181 | 181 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -5,39 +5,39 @@ |
||
5 | 5 | |
6 | 6 | class AccountsListViewSmarty extends ListViewSmarty { |
7 | 7 | |
8 | - function AccountsListViewSmarty(){ |
|
8 | + function AccountsListViewSmarty(){ |
|
9 | 9 | |
10 | - parent::ListViewSmarty(); |
|
11 | - $this->targetList = true; |
|
10 | + parent::ListViewSmarty(); |
|
11 | + $this->targetList = true; |
|
12 | 12 | |
13 | - } |
|
13 | + } |
|
14 | 14 | |
15 | - function process($file, $data, $htmlVar) { |
|
16 | - parent::process($file, $data, $htmlVar); |
|
15 | + function process($file, $data, $htmlVar) { |
|
16 | + parent::process($file, $data, $htmlVar); |
|
17 | 17 | |
18 | - if(!ACLController::checkAccess($this->seed->module_dir,'export',true) || !$this->export) { |
|
19 | - $this->ss->assign('exportLink', $this->buildExportLink()); |
|
20 | - } |
|
21 | - } |
|
18 | + if(!ACLController::checkAccess($this->seed->module_dir,'export',true) || !$this->export) { |
|
19 | + $this->ss->assign('exportLink', $this->buildExportLink()); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | |
23 | - function buildExportLink($id = 'export_link'){ |
|
24 | - global $app_strings; |
|
25 | - global $sugar_config; |
|
23 | + function buildExportLink($id = 'export_link'){ |
|
24 | + global $app_strings; |
|
25 | + global $sugar_config; |
|
26 | 26 | |
27 | - $script = ""; |
|
28 | - if(ACLController::checkAccess($this->seed->module_dir,'export',true)) { |
|
29 | - if($this->export) { |
|
30 | - $script = parent::buildExportLink($id); |
|
31 | - } |
|
32 | - } |
|
27 | + $script = ""; |
|
28 | + if(ACLController::checkAccess($this->seed->module_dir,'export',true)) { |
|
29 | + if($this->export) { |
|
30 | + $script = parent::buildExportLink($id); |
|
31 | + } |
|
32 | + } |
|
33 | 33 | |
34 | 34 | $script .= "<a href='javascript:void(0)' id='map_listview_top' " . |
35 | 35 | " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . |
36 | 36 | "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . |
37 | 37 | "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>"; |
38 | 38 | |
39 | - return formLetter::LVSmarty().$script; |
|
40 | - } |
|
39 | + return formLetter::LVSmarty().$script; |
|
40 | + } |
|
41 | 41 | |
42 | 42 | } |
43 | 43 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | class AccountsListViewSmarty extends ListViewSmarty { |
7 | 7 | |
8 | - function AccountsListViewSmarty(){ |
|
8 | + function AccountsListViewSmarty() { |
|
9 | 9 | |
10 | 10 | parent::ListViewSmarty(); |
11 | 11 | $this->targetList = true; |
@@ -15,25 +15,25 @@ discard block |
||
15 | 15 | function process($file, $data, $htmlVar) { |
16 | 16 | parent::process($file, $data, $htmlVar); |
17 | 17 | |
18 | - if(!ACLController::checkAccess($this->seed->module_dir,'export',true) || !$this->export) { |
|
18 | + if (!ACLController::checkAccess($this->seed->module_dir, 'export', true) || !$this->export) { |
|
19 | 19 | $this->ss->assign('exportLink', $this->buildExportLink()); |
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | - function buildExportLink($id = 'export_link'){ |
|
23 | + function buildExportLink($id = 'export_link') { |
|
24 | 24 | global $app_strings; |
25 | 25 | global $sugar_config; |
26 | 26 | |
27 | 27 | $script = ""; |
28 | - if(ACLController::checkAccess($this->seed->module_dir,'export',true)) { |
|
29 | - if($this->export) { |
|
28 | + if (ACLController::checkAccess($this->seed->module_dir, 'export', true)) { |
|
29 | + if ($this->export) { |
|
30 | 30 | $script = parent::buildExportLink($id); |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | - $script .= "<a href='javascript:void(0)' id='map_listview_top' " . |
|
35 | - " onclick=\"return sListView.send_form(true, 'jjwg_Maps', " . |
|
36 | - "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', " . |
|
34 | + $script .= "<a href='javascript:void(0)' id='map_listview_top' ". |
|
35 | + " onclick=\"return sListView.send_form(true, 'jjwg_Maps', ". |
|
36 | + "'index.php?entryPoint=jjwg_Maps&display_module={$_REQUEST['module']}', ". |
|
37 | 37 | "'{$app_strings['LBL_LISTVIEW_NO_SELECTED']}')\">{$app_strings['LBL_MAP']}</a>"; |
38 | 38 | |
39 | 39 | return formLetter::LVSmarty().$script; |
@@ -41,63 +41,63 @@ |
||
41 | 41 | class AccountsViewDetail extends ViewDetail { |
42 | 42 | |
43 | 43 | |
44 | - function AccountsViewDetail(){ |
|
45 | - parent::ViewDetail(); |
|
46 | - } |
|
44 | + function AccountsViewDetail(){ |
|
45 | + parent::ViewDetail(); |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * display |
|
50 | - * Override the display method to support customization for the buttons that display |
|
51 | - * a popup and allow you to copy the account's address into the selected contacts. |
|
52 | - * The custom_code_billing and custom_code_shipping Smarty variables are found in |
|
53 | - * include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S. |
|
54 | - * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl. |
|
55 | - */ |
|
56 | - function display(){ |
|
48 | + /** |
|
49 | + * display |
|
50 | + * Override the display method to support customization for the buttons that display |
|
51 | + * a popup and allow you to copy the account's address into the selected contacts. |
|
52 | + * The custom_code_billing and custom_code_shipping Smarty variables are found in |
|
53 | + * include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S. |
|
54 | + * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl. |
|
55 | + */ |
|
56 | + function display(){ |
|
57 | 57 | |
58 | - if(empty($this->bean->id)){ |
|
59 | - global $app_strings; |
|
60 | - sugar_die($app_strings['ERROR_NO_RECORD']); |
|
61 | - } |
|
58 | + if(empty($this->bean->id)){ |
|
59 | + global $app_strings; |
|
60 | + sugar_die($app_strings['ERROR_NO_RECORD']); |
|
61 | + } |
|
62 | 62 | |
63 | - require_once('modules/AOS_PDF_Templates/formLetter.php'); |
|
64 | - formLetter::DVPopupHtml('Accounts'); |
|
63 | + require_once('modules/AOS_PDF_Templates/formLetter.php'); |
|
64 | + formLetter::DVPopupHtml('Accounts'); |
|
65 | 65 | |
66 | - $this->dv->process(); |
|
67 | - global $mod_strings; |
|
68 | - if(ACLController::checkAccess('Contacts', 'edit', true)) { |
|
69 | - $push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
70 | - '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
71 | - $this->bean->name . '&html=change_address' . |
|
72 | - '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->billing_address_street)) . |
|
73 | - '&primary_address_city=' . $this->bean->billing_address_city . |
|
74 | - '&primary_address_state=' . $this->bean->billing_address_state . |
|
75 | - '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . |
|
76 | - '&primary_address_country=' . $this->bean->billing_address_country . |
|
77 | - '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE']. '">'; |
|
78 | - $push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
79 | - '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
80 | - $this->bean->name . '&html=change_address' . |
|
81 | - '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->shipping_address_street)) . |
|
82 | - '&primary_address_city=' . $this->bean->shipping_address_city . |
|
83 | - '&primary_address_state=' . $this->bean->shipping_address_state . |
|
84 | - '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . |
|
85 | - '&primary_address_country=' . $this->bean->shipping_address_country . |
|
86 | - '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">'; |
|
87 | - } else { |
|
88 | - $push_billing = ''; |
|
89 | - $push_shipping = ''; |
|
90 | - } |
|
66 | + $this->dv->process(); |
|
67 | + global $mod_strings; |
|
68 | + if(ACLController::checkAccess('Contacts', 'edit', true)) { |
|
69 | + $push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
70 | + '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
71 | + $this->bean->name . '&html=change_address' . |
|
72 | + '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->billing_address_street)) . |
|
73 | + '&primary_address_city=' . $this->bean->billing_address_city . |
|
74 | + '&primary_address_state=' . $this->bean->billing_address_state . |
|
75 | + '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . |
|
76 | + '&primary_address_country=' . $this->bean->billing_address_country . |
|
77 | + '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE']. '">'; |
|
78 | + $push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
79 | + '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
80 | + $this->bean->name . '&html=change_address' . |
|
81 | + '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->shipping_address_street)) . |
|
82 | + '&primary_address_city=' . $this->bean->shipping_address_city . |
|
83 | + '&primary_address_state=' . $this->bean->shipping_address_state . |
|
84 | + '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . |
|
85 | + '&primary_address_country=' . $this->bean->shipping_address_country . |
|
86 | + '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">'; |
|
87 | + } else { |
|
88 | + $push_billing = ''; |
|
89 | + $push_shipping = ''; |
|
90 | + } |
|
91 | 91 | |
92 | - $this->ss->assign("custom_code_billing", $push_billing); |
|
93 | - $this->ss->assign("custom_code_shipping", $push_shipping); |
|
92 | + $this->ss->assign("custom_code_billing", $push_billing); |
|
93 | + $this->ss->assign("custom_code_shipping", $push_shipping); |
|
94 | 94 | |
95 | 95 | if(empty($this->bean->id)){ |
96 | - global $app_strings; |
|
97 | - sugar_die($app_strings['ERROR_NO_RECORD']); |
|
98 | - } |
|
99 | - echo $this->dv->display(); |
|
100 | - } |
|
96 | + global $app_strings; |
|
97 | + sugar_die($app_strings['ERROR_NO_RECORD']); |
|
98 | + } |
|
99 | + echo $this->dv->display(); |
|
100 | + } |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | |
4 | 4 | /********************************************************************************* |
5 | 5 | * SugarCRM is a customer relationship management program developed by |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | class AccountsViewDetail extends ViewDetail { |
42 | 42 | |
43 | 43 | |
44 | - function AccountsViewDetail(){ |
|
44 | + function AccountsViewDetail() { |
|
45 | 45 | parent::ViewDetail(); |
46 | 46 | } |
47 | 47 | |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | * include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S. |
54 | 54 | * locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl. |
55 | 55 | */ |
56 | - function display(){ |
|
56 | + function display() { |
|
57 | 57 | |
58 | - if(empty($this->bean->id)){ |
|
58 | + if (empty($this->bean->id)) { |
|
59 | 59 | global $app_strings; |
60 | 60 | sugar_die($app_strings['ERROR_NO_RECORD']); |
61 | 61 | } |
@@ -65,25 +65,25 @@ discard block |
||
65 | 65 | |
66 | 66 | $this->dv->process(); |
67 | 67 | global $mod_strings; |
68 | - if(ACLController::checkAccess('Contacts', 'edit', true)) { |
|
69 | - $push_billing = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
70 | - '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
71 | - $this->bean->name . '&html=change_address' . |
|
72 | - '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->billing_address_street)) . |
|
73 | - '&primary_address_city=' . $this->bean->billing_address_city . |
|
74 | - '&primary_address_state=' . $this->bean->billing_address_state . |
|
75 | - '&primary_address_postalcode=' . $this->bean->billing_address_postalcode . |
|
76 | - '&primary_address_country=' . $this->bean->billing_address_country . |
|
77 | - '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE']. '">'; |
|
78 | - $push_shipping = '<input class="button" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] . |
|
79 | - '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' . |
|
80 | - $this->bean->name . '&html=change_address' . |
|
81 | - '&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->shipping_address_street)) . |
|
82 | - '&primary_address_city=' . $this->bean->shipping_address_city . |
|
83 | - '&primary_address_state=' . $this->bean->shipping_address_state . |
|
84 | - '&primary_address_postalcode=' . $this->bean->shipping_address_postalcode . |
|
85 | - '&primary_address_country=' . $this->bean->shipping_address_country . |
|
86 | - '", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">'; |
|
68 | + if (ACLController::checkAccess('Contacts', 'edit', true)) { |
|
69 | + $push_billing = '<input class="button" title="'.$mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL']. |
|
70 | + '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name='. |
|
71 | + $this->bean->name.'&html=change_address'. |
|
72 | + '&primary_address_street='.str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->billing_address_street)). |
|
73 | + '&primary_address_city='.$this->bean->billing_address_city. |
|
74 | + '&primary_address_state='.$this->bean->billing_address_state. |
|
75 | + '&primary_address_postalcode='.$this->bean->billing_address_postalcode. |
|
76 | + '&primary_address_country='.$this->bean->billing_address_country. |
|
77 | + '", true, false);\' value="'.$mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'].'">'; |
|
78 | + $push_shipping = '<input class="button" title="'.$mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL']. |
|
79 | + '" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name='. |
|
80 | + $this->bean->name.'&html=change_address'. |
|
81 | + '&primary_address_street='.str_replace(array("\rn", "\r", "\n"), array('', '', '<br>'), urlencode($this->bean->shipping_address_street)). |
|
82 | + '&primary_address_city='.$this->bean->shipping_address_city. |
|
83 | + '&primary_address_state='.$this->bean->shipping_address_state. |
|
84 | + '&primary_address_postalcode='.$this->bean->shipping_address_postalcode. |
|
85 | + '&primary_address_country='.$this->bean->shipping_address_country. |
|
86 | + '", true, false);\' value="'.$mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'].'">'; |
|
87 | 87 | } else { |
88 | 88 | $push_billing = ''; |
89 | 89 | $push_shipping = ''; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $this->ss->assign("custom_code_billing", $push_billing); |
93 | 93 | $this->ss->assign("custom_code_shipping", $push_shipping); |
94 | 94 | |
95 | - if(empty($this->bean->id)){ |
|
95 | + if (empty($this->bean->id)) { |
|
96 | 96 | global $app_strings; |
97 | 97 | sugar_die($app_strings['ERROR_NO_RECORD']); |
98 | 98 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |