Test Failed
Push — CI ( 0f01dd...c95a04 )
by Adam
55:13
created
modules/ProjectTask/metadata/quickcreatedefs.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -1,130 +1,130 @@
 block discarded – undo
1 1
 <?php
2 2
 $viewdefs ['ProjectTask'] = 
3 3
 array (
4
-  'QuickCreate' => 
5
-  array (
4
+    'QuickCreate' => 
5
+    array (
6 6
     'templateMeta' => 
7 7
     array (
8
-      'maxColumns' => '2',
9
-      'widths' => 
10
-      array (
8
+        'maxColumns' => '2',
9
+        'widths' => 
10
+        array (
11 11
         0 => 
12 12
         array (
13
-          'label' => '10',
14
-          'field' => '30',
13
+            'label' => '10',
14
+            'field' => '30',
15 15
         ),
16 16
         1 => 
17 17
         array (
18
-          'label' => '10',
19
-          'field' => '30',
18
+            'label' => '10',
19
+            'field' => '30',
20 20
         ),
21
-      ),
22
-      'includes' => 
23
-      array (
21
+        ),
22
+        'includes' => 
23
+        array (
24 24
         0 => 
25 25
         array (
26
-          'file' => 'modules/ProjectTask/ProjectTask.js',
26
+            'file' => 'modules/ProjectTask/ProjectTask.js',
27
+        ),
27 28
         ),
28
-      ),
29 29
     ),
30 30
     'panels' => 
31 31
     array (
32
-      'default' => 
33
-      array (
32
+        'default' => 
33
+        array (
34 34
         0 => 
35 35
         array (
36
-          0 => 
37
-          array (
36
+            0 => 
37
+            array (
38 38
             'name' => 'name',
39 39
             'label' => 'LBL_NAME',
40
-          ),
41
-          1 => 
42
-          array (
40
+            ),
41
+            1 => 
42
+            array (
43 43
             'name' => 'project_task_id',
44 44
             'label' => 'LBL_TASK_ID',
45
-          ),
45
+            ),
46 46
         ),
47 47
         1 => 
48 48
         array (
49
-          0 => 
50
-          array (
49
+            0 => 
50
+            array (
51 51
             'name' => 'date_start',
52
-          ),
53
-          1 => 
54
-          array (
52
+            ),
53
+            1 => 
54
+            array (
55 55
             'name' => 'date_finish',
56
-          ),
56
+            ),
57 57
         ),
58 58
         2 => 
59 59
         array (
60
-          'name' => 'assigned_user_name',
60
+            'name' => 'assigned_user_name',
61 61
         ),
62 62
         3 => 
63 63
         array (
64
-          0 => 
65
-          array (
64
+            0 => 
65
+            array (
66 66
             'name' => 'status',
67 67
             'customCode' => '<select name="{$fields.status.name}" id="{$fields.status.name}" title="" tabindex="s" onchange="update_percent_complete(this.value);">{if isset($fields.status.value) && $fields.status.value != ""}{html_options options=$fields.status.options selected=$fields.status.value}{else}{html_options options=$fields.status.options selected=$fields.status.default}{/if}</select>',
68
-          ),
69
-          1 => 'priority',
68
+            ),
69
+            1 => 'priority',
70 70
         ),
71 71
         4 => 
72 72
         array (
73
-          0 => 
74
-          array (
73
+            0 => 
74
+            array (
75 75
             'name' => 'percent_complete',
76 76
             'customCode' => '<input type="text" name="{$fields.percent_complete.name}" id="{$fields.percent_complete.name}" size="30" value="{$fields.percent_complete.value}" title="" tabindex="0" onChange="update_status(this.value);" /></tr>',
77
-          ),
77
+            ),
78 78
         ),
79 79
         5 => 
80 80
         array (
81
-          0 => 'milestone_flag',
81
+            0 => 'milestone_flag',
82 82
         ),
83 83
         6 => 
84 84
         array (
85
-          0 => 
86
-          array (
85
+            0 => 
86
+            array (
87 87
             'name' => 'project_name',
88 88
             'label' => 'LBL_PROJECT_NAME',
89
-          ),
89
+            ),
90 90
         ),
91 91
         7 => 
92 92
         array (
93
-          0 => 'task_number',
94
-          1 => 'order_number',
93
+            0 => 'task_number',
94
+            1 => 'order_number',
95 95
         ),
96 96
         8 => 
97 97
         array (
98
-          0 => 'estimated_effort',
99
-          1 => 'utilization',
98
+            0 => 'estimated_effort',
99
+            1 => 'utilization',
100 100
         ),
101 101
         9 => 
102 102
         array (
103
-          0 => 
104
-          array (
103
+            0 => 
104
+            array (
105 105
             'name' => 'description',
106
-          ),
106
+            ),
107 107
         ),
108 108
         10 => 
109 109
         array (
110
-          0 => 
111
-          array (
110
+            0 => 
111
+            array (
112 112
             'name' => 'duration',
113 113
             'hideLabel' => true,
114 114
             'customCode' => '<input type="hidden" name="duration" id="projectTask_duration" value="0" />',
115
-          ),
115
+            ),
116 116
         ),
117 117
         11 => 
118 118
         array (
119
-          0 => 
120
-          array (
119
+            0 => 
120
+            array (
121 121
             'name' => 'duration_unit',
122 122
             'hideLabel' => true,
123 123
             'customCode' => '<input type="hidden" name="duration_unit" id="projectTask_durationUnit" value="Days" />',
124
-          ),
124
+            ),
125 125
         ),
126
-      ),
126
+        ),
127
+    ),
127 128
     ),
128
-  ),
129 129
 );
130 130
 ?>
Please login to merge, or discard this patch.
modules/ProjectTask/metadata/listviewdefs.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $listViewDefs ['ProjectTask'] = 
3 3
 array (
4
-  'NAME' => 
5
-  array (
4
+    'NAME' => 
5
+    array (
6 6
     'width' => '40%',
7 7
     'label' => 'LBL_LIST_NAME',
8 8
     'link' => true,
9 9
     'default' => true,
10 10
     'sortable' => true,
11
-  ),
12
-  'PROJECT_NAME' => 
13
-  array (
11
+    ),
12
+    'PROJECT_NAME' => 
13
+    array (
14 14
     'width' => '25%',
15 15
     'label' => 'LBL_PROJECT_NAME',
16 16
     'id' => 'PROJECT_ID',
@@ -21,44 +21,44 @@  discard block
 block discarded – undo
21 21
     'ACLTag' => 'PROJECT',
22 22
     'related_fields' => 
23 23
     array (
24
-      0 => 'project_id',
24
+        0 => 'project_id',
25
+    ),
25 26
     ),
26
-  ),
27
-  'DATE_START' => 
28
-  array (
27
+    'DATE_START' => 
28
+    array (
29 29
     'width' => '10%',
30 30
     'label' => 'LBL_DATE_START',
31 31
     'default' => true,
32 32
     'sortable' => true,
33
-  ),
34
-  'DATE_FINISH' => 
35
-  array (
33
+    ),
34
+    'DATE_FINISH' => 
35
+    array (
36 36
     'width' => '10%',
37 37
     'label' => 'LBL_DATE_FINISH',
38 38
     'default' => true,
39 39
     'sortable' => true,
40
-  ),
41
-  'ASSIGNED_USER_NAME' => 
42
-  array (
40
+    ),
41
+    'ASSIGNED_USER_NAME' => 
42
+    array (
43 43
     'width' => '10%',
44 44
     'label' => 'LBL_LIST_ASSIGNED_USER_ID',
45 45
     'module' => 'Employees',
46 46
     'id' => 'ASSIGNED_USER_ID',
47 47
     'default' => true,
48
-  ),
49
-  'PRIORITY' => 
50
-  array (
48
+    ),
49
+    'PRIORITY' => 
50
+    array (
51 51
     'width' => '10%',
52 52
     'label' => 'LBL_LIST_PRIORITY',
53 53
     'default' => true,
54 54
     'sortable' => true,
55
-  ),
56
-  'PERCENT_COMPLETE' => 
57
-  array (
55
+    ),
56
+    'PERCENT_COMPLETE' => 
57
+    array (
58 58
     'width' => '10%',
59 59
     'label' => 'LBL_LIST_PERCENT_COMPLETE',
60 60
     'default' => true,
61 61
     'sortable' => true,
62
-  ),
62
+    ),
63 63
 );
64 64
 ?>
Please login to merge, or discard this patch.
modules/Calls/SubPanelViewInvitees.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -88,29 +88,29 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
modules/Calls/Call.php 1 patch
Indentation   +512 added lines, -512 removed lines patch added patch discarded remove patch
@@ -47,162 +47,162 @@  discard block
 block discarded – undo
47 47
  ********************************************************************************/
48 48
 
49 49
 class Call extends SugarBean {
50
-	var $field_name_map;
51
-	// Stored fields
52
-	var $id;
53
-	var $json_id;
54
-	var $date_entered;
55
-	var $date_modified;
56
-	var $assigned_user_id;
57
-	var $modified_user_id;
58
-	var $description;
59
-	var $name;
60
-	var $status;
61
-	var $date_start;
62
-	var $time_start;
63
-	var $duration_hours;
64
-	var $duration_minutes;
65
-	var $date_end;
66
-	var $parent_type;
67
-	var $parent_type_options;
68
-	var $parent_id;
69
-	var $contact_id;
70
-	var $user_id;
71
-	var $lead_id;
72
-	var $direction;
73
-	var $reminder_time;
74
-	var $reminder_time_options;
75
-	var $reminder_checked;
76
-	var $email_reminder_time;
77
-	var $email_reminder_checked;
78
-	var $email_reminder_sent;
79
-	var $required;
80
-	var $accept_status;
81
-	var $created_by;
82
-	var $created_by_name;
83
-	var $modified_by_name;
84
-	var $parent_name;
85
-	var $contact_name;
86
-	var $contact_phone;
87
-	var $contact_email;
88
-	var $account_id;
89
-	var $opportunity_id;
90
-	var $case_id;
91
-	var $assigned_user_name;
92
-	var $note_id;
50
+    var $field_name_map;
51
+    // Stored fields
52
+    var $id;
53
+    var $json_id;
54
+    var $date_entered;
55
+    var $date_modified;
56
+    var $assigned_user_id;
57
+    var $modified_user_id;
58
+    var $description;
59
+    var $name;
60
+    var $status;
61
+    var $date_start;
62
+    var $time_start;
63
+    var $duration_hours;
64
+    var $duration_minutes;
65
+    var $date_end;
66
+    var $parent_type;
67
+    var $parent_type_options;
68
+    var $parent_id;
69
+    var $contact_id;
70
+    var $user_id;
71
+    var $lead_id;
72
+    var $direction;
73
+    var $reminder_time;
74
+    var $reminder_time_options;
75
+    var $reminder_checked;
76
+    var $email_reminder_time;
77
+    var $email_reminder_checked;
78
+    var $email_reminder_sent;
79
+    var $required;
80
+    var $accept_status;
81
+    var $created_by;
82
+    var $created_by_name;
83
+    var $modified_by_name;
84
+    var $parent_name;
85
+    var $contact_name;
86
+    var $contact_phone;
87
+    var $contact_email;
88
+    var $account_id;
89
+    var $opportunity_id;
90
+    var $case_id;
91
+    var $assigned_user_name;
92
+    var $note_id;
93 93
     var $outlook_id;
94
-	var $update_vcal = true;
95
-	var $contacts_arr;
96
-	var $users_arr;
97
-	var $leads_arr;
98
-	var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
99
-	var $minutes_value_default = 15;
100
-	var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
101
-	var $table_name = "calls";
102
-	var $rel_users_table = "calls_users";
103
-	var $rel_contacts_table = "calls_contacts";
94
+    var $update_vcal = true;
95
+    var $contacts_arr;
96
+    var $users_arr;
97
+    var $leads_arr;
98
+    var $default_call_name_values = array('Assemble catalogs', 'Make travel arrangements', 'Send a letter', 'Send contract', 'Send fax', 'Send a follow-up letter', 'Send literature', 'Send proposal', 'Send quote');
99
+    var $minutes_value_default = 15;
100
+    var $minutes_values = array('0'=>'00','15'=>'15','30'=>'30','45'=>'45');
101
+    var $table_name = "calls";
102
+    var $rel_users_table = "calls_users";
103
+    var $rel_contacts_table = "calls_contacts";
104 104
     var $rel_leads_table = "calls_leads";
105
-	var $module_dir = 'Calls';
106
-	var $object_name = "Call";
107
-	var $new_schema = true;
108
-	var $importable = true;
109
-	var $syncing = false;
110
-	var $recurring_source;
111
-
112
-	// This is used to retrieve related fields from form posts.
113
-	var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
114
-	var $relationship_fields = array(	'account_id'		=> 'accounts',
115
-										'opportunity_id'	=> 'opportunities',
116
-										'contact_id'		=> 'contacts',
117
-										'case_id'			=> 'cases',
118
-										'user_id'			=> 'users',
119
-										'assigned_user_id'	=> 'users',
120
-										'note_id'			=> 'notes',
105
+    var $module_dir = 'Calls';
106
+    var $object_name = "Call";
107
+    var $new_schema = true;
108
+    var $importable = true;
109
+    var $syncing = false;
110
+    var $recurring_source;
111
+
112
+    // This is used to retrieve related fields from form posts.
113
+    var $additional_column_fields = array('assigned_user_name', 'assigned_user_id', 'contact_id', 'user_id', 'contact_name');
114
+    var $relationship_fields = array(	'account_id'		=> 'accounts',
115
+                                        'opportunity_id'	=> 'opportunities',
116
+                                        'contact_id'		=> 'contacts',
117
+                                        'case_id'			=> 'cases',
118
+                                        'user_id'			=> 'users',
119
+                                        'assigned_user_id'	=> 'users',
120
+                                        'note_id'			=> 'notes',
121 121
                                         'lead_id'			=> 'leads',
122
-								);
123
-
124
-	function Call() {
125
-		parent::SugarBean();
126
-		global $app_list_strings;
127
-
128
-       	$this->setupCustomFields('Calls');
129
-
130
-		foreach ($this->field_defs as $field) {
131
-			$this->field_name_map[$field['name']] = $field;
132
-		}
133
-
134
-
135
-
136
-
137
-         if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
-        	$this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
-	}
140
-
141
-	/**
142
-	 * Disable edit if call is recurring and source is not Sugar. It should be edited only from Outlook.
143
-	 * @param $view string
144
-	 * @param $is_owner bool
145
-	 */
146
-	function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
147
-		// don't check if call is being synced from Outlook
148
-		if($this->syncing == false){
149
-			$view = strtolower($view);
150
-			switch($view){
151
-				case 'edit':
152
-				case 'save':
153
-				case 'editview':
154
-				case 'delete':
155
-					if(!empty($this->recurring_source) && $this->recurring_source != "Sugar"){
156
-						return false;
157
-					}
158
-			}
159
-		}
160
-		return parent::ACLAccess($view,$is_owner,$in_group);
161
-	}
122
+                                );
123
+
124
+    function Call() {
125
+        parent::SugarBean();
126
+        global $app_list_strings;
127
+
128
+            $this->setupCustomFields('Calls');
129
+
130
+        foreach ($this->field_defs as $field) {
131
+            $this->field_name_map[$field['name']] = $field;
132
+        }
133
+
134
+
135
+
136
+
137
+            if(!empty($GLOBALS['app_list_strings']['duration_intervals']))
138
+            $this->minutes_values = $GLOBALS['app_list_strings']['duration_intervals'];
139
+    }
140
+
141
+    /**
142
+     * Disable edit if call is recurring and source is not Sugar. It should be edited only from Outlook.
143
+     * @param $view string
144
+     * @param $is_owner bool
145
+     */
146
+    function ACLAccess($view,$is_owner='not_set',$in_group='not_set'){
147
+        // don't check if call is being synced from Outlook
148
+        if($this->syncing == false){
149
+            $view = strtolower($view);
150
+            switch($view){
151
+                case 'edit':
152
+                case 'save':
153
+                case 'editview':
154
+                case 'delete':
155
+                    if(!empty($this->recurring_source) && $this->recurring_source != "Sugar"){
156
+                        return false;
157
+                    }
158
+            }
159
+        }
160
+        return parent::ACLAccess($view,$is_owner,$in_group);
161
+    }
162 162
     // save date_end by calculating user input
163 163
     // this is for calendar
164
-	function save($check_notify = FALSE) {
165
-		global $timedate,$current_user;
164
+    function save($check_notify = FALSE) {
165
+        global $timedate,$current_user;
166 166
 
167
-	    if(isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
167
+        if(isset($this->date_start) && isset($this->duration_hours) && isset($this->duration_minutes))
168 168
         {
169
-    	    $td = $timedate->fromDb($this->date_start);
170
-    	    if($td)
171
-    	    {
172
-	        	$this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb();
173
-    	    }
169
+            $td = $timedate->fromDb($this->date_start);
170
+            if($td)
171
+            {
172
+                $this->date_end = $td->modify("+{$this->duration_hours} hours {$this->duration_minutes} mins")->asDb();
173
+            }
174 174
         }
175 175
 
176
-		if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
177
-			$check_notify = true;
176
+        if(!empty($_REQUEST['send_invites']) && $_REQUEST['send_invites'] == '1') {
177
+            $check_notify = true;
178 178
         } else {
179
-			$check_notify = false;
180
-		}
181
-		if(empty($_REQUEST['send_invites'])) {
182
-			if(!empty($this->id)) {
183
-				$old_record = new Call();
184
-				$old_record->retrieve($this->id);
185
-				$old_assigned_user_id = $old_record->assigned_user_id;
186
-			}
187
-			if((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id']) ){
188
-				$this->special_notification = true;
189
-				if(!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
190
-					$check_notify = true;
191
-				}
179
+            $check_notify = false;
180
+        }
181
+        if(empty($_REQUEST['send_invites'])) {
182
+            if(!empty($this->id)) {
183
+                $old_record = new Call();
184
+                $old_record->retrieve($this->id);
185
+                $old_assigned_user_id = $old_record->assigned_user_id;
186
+            }
187
+            if((empty($this->id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $GLOBALS['current_user']->id != $_REQUEST['assigned_user_id']) || (isset($old_assigned_user_id) && !empty($old_assigned_user_id) && isset($_REQUEST['assigned_user_id']) && !empty($_REQUEST['assigned_user_id']) && $old_assigned_user_id != $_REQUEST['assigned_user_id']) ){
188
+                $this->special_notification = true;
189
+                if(!isset($GLOBALS['resavingRelatedBeans']) || $GLOBALS['resavingRelatedBeans'] == false) {
190
+                    $check_notify = true;
191
+                }
192 192
                 if(isset($_REQUEST['assigned_user_name'])) {
193 193
                     $this->new_assigned_user_name = $_REQUEST['assigned_user_name'];
194 194
                 }
195
-			}
196
-		}
195
+            }
196
+        }
197 197
         if (empty($this->status) ) {
198 198
             $this->status = $this->getDefaultStatus();
199 199
         }
200 200
 
201
-		// prevent a mass mailing for recurring meetings created in Calendar module
202
-		if (empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id)) {
203
-			$check_notify = false;
204
-		}
205
-		/*nsingh 7/3/08  commenting out as bug #20814 is invalid
201
+        // prevent a mass mailing for recurring meetings created in Calendar module
202
+        if (empty($this->id) && !empty($_REQUEST['module']) && $_REQUEST['module'] == "Calendar" && !empty($_REQUEST['repeat_type']) && !empty($this->repeat_parent_id)) {
203
+            $check_notify = false;
204
+        }
205
+        /*nsingh 7/3/08  commenting out as bug #20814 is invalid
206 206
 		if($current_user->getPreference('reminder_time')!= -1 &&  isset($_POST['reminder_checked']) && isset($_POST['reminder_time']) && $_POST['reminder_checked']==0  && $_POST['reminder_time']==-1){
207 207
 			$this->reminder_checked = '1';
208 208
 			$this->reminder_time = $current_user->getPreference('reminder_time');
@@ -213,87 +213,87 @@  discard block
 block discarded – undo
213 213
 
214 214
 
215 215
         if($this->update_vcal) {
216
-			vCal::cache_sugar_vcal($current_user);
216
+            vCal::cache_sugar_vcal($current_user);
217 217
         }
218 218
 
219
-		if(isset($_REQUEST['reminders_data'])) {
220
-			Reminder::saveRemindersDataJson('Calls', $return_id, html_entity_decode($_REQUEST['reminders_data']));
221
-		}
219
+        if(isset($_REQUEST['reminders_data'])) {
220
+            Reminder::saveRemindersDataJson('Calls', $return_id, html_entity_decode($_REQUEST['reminders_data']));
221
+        }
222 222
 
223 223
         return $return_id;
224
-	}
224
+    }
225 225
 
226
-	/** Returns a list of the associated contacts
227
-	 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
228
-	 * All Rights Reserved..
229
-	 * Contributor(s): ______________________________________..
230
-	*/
231
-	function get_contacts()
232
-	{
233
-		// First, get the list of IDs.
234
-		$query = "SELECT contact_id as id from calls_contacts where call_id='$this->id' AND deleted=0";
226
+    /** Returns a list of the associated contacts
227
+     * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
228
+     * All Rights Reserved..
229
+     * Contributor(s): ______________________________________..
230
+     */
231
+    function get_contacts()
232
+    {
233
+        // First, get the list of IDs.
234
+        $query = "SELECT contact_id as id from calls_contacts where call_id='$this->id' AND deleted=0";
235 235
 
236
-		return $this->build_related_list($query, new Contact());
237
-	}
236
+        return $this->build_related_list($query, new Contact());
237
+    }
238 238
 
239 239
 
240
-	function get_summary_text()
241
-	{
242
-		return "$this->name";
243
-	}
240
+    function get_summary_text()
241
+    {
242
+        return "$this->name";
243
+    }
244 244
 
245
-	function create_list_query($order_by, $where, $show_deleted=0)
246
-	{
245
+    function create_list_query($order_by, $where, $show_deleted=0)
246
+    {
247 247
         $custom_join = $this->getCustomJoin();
248 248
                 $query = "SELECT ";
249
-		$query .= "
249
+        $query .= "
250 250
 			calls.*,";
251
-			if ( preg_match("/calls_users\.user_id/",$where))
252
-			{
253
-				$query .= "calls_users.required,
251
+            if ( preg_match("/calls_users\.user_id/",$where))
252
+            {
253
+                $query .= "calls_users.required,
254 254
 				calls_users.accept_status,";
255
-			}
255
+            }
256 256
 
257
-			$query .= "
257
+            $query .= "
258 258
 			users.user_name as assigned_user_name";
259 259
         $query .= $custom_join['select'];
260 260
 
261
-			// this line will help generate a GMT-metric to compare to a locale's timezone
261
+            // this line will help generate a GMT-metric to compare to a locale's timezone
262 262
 
263
-			if ( preg_match("/contacts/",$where)){
264
-				$query .= ", contacts.first_name, contacts.last_name";
265
-				$query .= ", contacts.assigned_user_id contact_name_owner";
266
-			}
267
-			$query .= " FROM calls ";
263
+            if ( preg_match("/contacts/",$where)){
264
+                $query .= ", contacts.first_name, contacts.last_name";
265
+                $query .= ", contacts.assigned_user_id contact_name_owner";
266
+            }
267
+            $query .= " FROM calls ";
268 268
 
269
-			if ( preg_match("/contacts/",$where)){
270
-				$query .=	"LEFT JOIN calls_contacts
269
+            if ( preg_match("/contacts/",$where)){
270
+                $query .=	"LEFT JOIN calls_contacts
271 271
 	                    ON calls.id=calls_contacts.call_id
272 272
 	                    LEFT JOIN contacts
273 273
 	                    ON calls_contacts.contact_id=contacts.id ";
274
-			}
275
-			if ( preg_match('/calls_users\.user_id/',$where))
276
-			{
277
-		$query .= "LEFT JOIN calls_users
274
+            }
275
+            if ( preg_match('/calls_users\.user_id/',$where))
276
+            {
277
+        $query .= "LEFT JOIN calls_users
278 278
 			ON calls.id=calls_users.call_id and calls_users.deleted=0 ";
279
-			}
280
-			$query .= "
279
+            }
280
+            $query .= "
281 281
 			LEFT JOIN users
282 282
 			ON calls.assigned_user_id=users.id ";
283 283
         $query .= $custom_join['join'];
284
-			$where_auto = '1=1';
285
-       		 if($show_deleted == 0){
286
-            	$where_auto = " $this->table_name.deleted=0  ";
287
-			}else if($show_deleted == 1){
288
-				$where_auto = " $this->table_name.deleted=1 ";
289
-			}
284
+            $where_auto = '1=1';
285
+                if($show_deleted == 0){
286
+                $where_auto = " $this->table_name.deleted=0  ";
287
+            }else if($show_deleted == 1){
288
+                $where_auto = " $this->table_name.deleted=1 ";
289
+            }
290 290
 
291
-			//$where_auto .= " GROUP BY calls.id";
291
+            //$where_auto .= " GROUP BY calls.id";
292 292
 
293
-		if($where != "")
294
-			$query .= "where $where AND ".$where_auto;
295
-		else
296
-			$query .= "where ".$where_auto;
293
+        if($where != "")
294
+            $query .= "where $where AND ".$where_auto;
295
+        else
296
+            $query .= "where ".$where_auto;
297 297
 
298 298
         $order_by = $this->process_order_by($order_by);
299 299
         if (empty($order_by)) {
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
         }
302 302
         $query .= ' ORDER BY ' . $order_by;
303 303
 
304
-		return $query;
305
-	}
304
+        return $query;
305
+    }
306 306
 
307 307
         function create_export_query($order_by, $where, $relate_link_join='')
308 308
         {
309 309
             $custom_join = $this->getCustomJoin(true, true, $where);
310 310
             $custom_join['join'] .= $relate_link_join;
311
-			$contact_required = stristr($where, "contacts");
311
+            $contact_required = stristr($where, "contacts");
312 312
             if($contact_required)
313 313
             {
314 314
                     $query = "SELECT calls.*, contacts.first_name, contacts.last_name, users.user_name as assigned_user_name ";
@@ -325,11 +325,11 @@  discard block
 block discarded – undo
325 325
             }
326 326
 
327 327
 
328
-			$query .= "  LEFT JOIN users ON calls.assigned_user_id=users.id ";
328
+            $query .= "  LEFT JOIN users ON calls.assigned_user_id=users.id ";
329 329
 
330 330
             $query .= $custom_join['join'];
331 331
 
332
-			if($where != "")
332
+            if($where != "")
333 333
                     $query .= "where $where AND ".$where_auto;
334 334
             else
335 335
                     $query .= "where ".$where_auto;
@@ -347,199 +347,199 @@  discard block
 block discarded – undo
347 347
 
348 348
 
349 349
 
350
-	function fill_in_additional_detail_fields()
351
-	{
352
-		global $locale;
353
-		parent::fill_in_additional_detail_fields();
354
-		if (!empty($this->contact_id)) {
355
-			$query  = "SELECT first_name, last_name FROM contacts ";
356
-			$query .= "WHERE id='$this->contact_id' AND deleted=0";
357
-			$result = $this->db->limitQuery($query,0,1,true," Error filling in additional detail fields: ");
358
-
359
-			// Get the contact name.
360
-			$row = $this->db->fetchByAssoc($result);
361
-			$GLOBALS['log']->info("additional call fields $query");
362
-			if($row != null)
363
-			{
364
-				$this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '');
365
-				$GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
366
-				$GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
367
-			}
368
-		}
369
-		if (!isset($this->duration_minutes)) {
370
-			$this->duration_minutes = $this->minutes_value_default;
371
-		}
350
+    function fill_in_additional_detail_fields()
351
+    {
352
+        global $locale;
353
+        parent::fill_in_additional_detail_fields();
354
+        if (!empty($this->contact_id)) {
355
+            $query  = "SELECT first_name, last_name FROM contacts ";
356
+            $query .= "WHERE id='$this->contact_id' AND deleted=0";
357
+            $result = $this->db->limitQuery($query,0,1,true," Error filling in additional detail fields: ");
358
+
359
+            // Get the contact name.
360
+            $row = $this->db->fetchByAssoc($result);
361
+            $GLOBALS['log']->info("additional call fields $query");
362
+            if($row != null)
363
+            {
364
+                $this->contact_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '');
365
+                $GLOBALS['log']->debug("Call($this->id): contact_name = $this->contact_name");
366
+                $GLOBALS['log']->debug("Call($this->id): contact_id = $this->contact_id");
367
+            }
368
+        }
369
+        if (!isset($this->duration_minutes)) {
370
+            $this->duration_minutes = $this->minutes_value_default;
371
+        }
372 372
 
373 373
         global $timedate;
374 374
         //setting default date and time
375
-		if (is_null($this->date_start)) {
376
-			$this->date_start = $timedate->now();
377
-		}
378
-
379
-		if (is_null($this->duration_hours))
380
-			$this->duration_hours = "0";
381
-		if (is_null($this->duration_minutes))
382
-			$this->duration_minutes = "1";
383
-
384
-		$this->fill_in_additional_parent_fields();
385
-
386
-		global $app_list_strings;
387
-		$parent_types = $app_list_strings['record_type_display'];
388
-		$disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
389
-		foreach($disabled_parent_types as $disabled_parent_type){
390
-			if($disabled_parent_type != $this->parent_type){
391
-				unset($parent_types[$disabled_parent_type]);
392
-			}
393
-		}
394
-
395
-		$this->parent_type_options = get_select_options_with_id($parent_types, $this->parent_type);
396
-
397
-		if (empty($this->reminder_time)) {
398
-			$this->reminder_time = -1;
399
-		}
400
-
401
-		if ( empty($this->id) ) {
402
-		    $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
-		    if ( isset($reminder_t) )
404
-		        $this->reminder_time = $reminder_t;
405
-		}
406
-		$this->reminder_checked = $this->reminder_time == -1 ? false : true;
407
-
408
-		if (empty($this->email_reminder_time)) {
409
-			$this->email_reminder_time = -1;
410
-		}
411
-		if(empty($this->id)){
412
-			$reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
-			if(isset($reminder_t))
414
-		    		$this->email_reminder_time = $reminder_t;
415
-		}
416
-		$this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417
-
418
-		if (isset ($_REQUEST['parent_type']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'SubpanelEdits')) {
419
-			$this->parent_type = $_REQUEST['parent_type'];
420
-		} elseif (is_null($this->parent_type)) {
421
-			$this->parent_type = $app_list_strings['record_type_default_key'];
422
-		}
423
-	}
424
-
425
-
426
-	function get_list_view_data(){
427
-		$call_fields = $this->get_list_view_array();
428
-		global $app_list_strings, $focus, $action, $currentModule;
429
-		if (isset($focus->id)) $id = $focus->id;
430
-		else $id = '';
431
-		if (isset($this->parent_type) && $this->parent_type != null)
432
-		{
433
-			$call_fields['PARENT_MODULE'] = $this->parent_type;
434
-		}
435
-		if ($this->status == "Planned") {
436
-			//cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
-			if(empty($action))
438
-			    $action = "index";
375
+        if (is_null($this->date_start)) {
376
+            $this->date_start = $timedate->now();
377
+        }
378
+
379
+        if (is_null($this->duration_hours))
380
+            $this->duration_hours = "0";
381
+        if (is_null($this->duration_minutes))
382
+            $this->duration_minutes = "1";
383
+
384
+        $this->fill_in_additional_parent_fields();
385
+
386
+        global $app_list_strings;
387
+        $parent_types = $app_list_strings['record_type_display'];
388
+        $disabled_parent_types = ACLController::disabledModuleList($parent_types,false, 'list');
389
+        foreach($disabled_parent_types as $disabled_parent_type){
390
+            if($disabled_parent_type != $this->parent_type){
391
+                unset($parent_types[$disabled_parent_type]);
392
+            }
393
+        }
394
+
395
+        $this->parent_type_options = get_select_options_with_id($parent_types, $this->parent_type);
396
+
397
+        if (empty($this->reminder_time)) {
398
+            $this->reminder_time = -1;
399
+        }
400
+
401
+        if ( empty($this->id) ) {
402
+            $reminder_t = $GLOBALS['current_user']->getPreference('reminder_time');
403
+            if ( isset($reminder_t) )
404
+                $this->reminder_time = $reminder_t;
405
+        }
406
+        $this->reminder_checked = $this->reminder_time == -1 ? false : true;
407
+
408
+        if (empty($this->email_reminder_time)) {
409
+            $this->email_reminder_time = -1;
410
+        }
411
+        if(empty($this->id)){
412
+            $reminder_t = $GLOBALS['current_user']->getPreference('email_reminder_time');
413
+            if(isset($reminder_t))
414
+                    $this->email_reminder_time = $reminder_t;
415
+        }
416
+        $this->email_reminder_checked = $this->email_reminder_time == -1 ? false : true;
417
+
418
+        if (isset ($_REQUEST['parent_type']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'SubpanelEdits')) {
419
+            $this->parent_type = $_REQUEST['parent_type'];
420
+        } elseif (is_null($this->parent_type)) {
421
+            $this->parent_type = $app_list_strings['record_type_default_key'];
422
+        }
423
+    }
424
+
425
+
426
+    function get_list_view_data(){
427
+        $call_fields = $this->get_list_view_array();
428
+        global $app_list_strings, $focus, $action, $currentModule;
429
+        if (isset($focus->id)) $id = $focus->id;
430
+        else $id = '';
431
+        if (isset($this->parent_type) && $this->parent_type != null)
432
+        {
433
+            $call_fields['PARENT_MODULE'] = $this->parent_type;
434
+        }
435
+        if ($this->status == "Planned") {
436
+            //cn: added this if() to deal with sequential Closes in Meetings.  this is a hack to a hack (formbase.php->handleRedirect)
437
+            if(empty($action))
438
+                $action = "index";
439 439
 
440 440
             $setCompleteUrl = "<a id='{$this->id}' onclick='SUGAR.util.closeActivityPanel.show(\"{$this->module_dir}\",\"{$this->id}\",\"Held\",\"listview\",\"1\");'>";
441
-			if ($this->ACLAccess('edit')) {
441
+            if ($this->ACLAccess('edit')) {
442 442
                 $call_fields['SET_COMPLETE'] = $setCompleteUrl . SugarThemeRegistry::current()->getImage("close_inline"," border='0'",null,null,'.gif',translate('LBL_CLOSEINLINE'))."</a>";
443 443
             } else {
444 444
                 $call_fields['SET_COMPLETE'] = '';
445 445
             }
446
-		}
447
-		global $timedate;
448
-		$today = $timedate->nowDb();
449
-		$nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day"));
450
-		$mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
451
-		$date_db = $timedate->to_db($mergeTime);
452
-		if( $date_db	< $today){
453
-			$call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
-		}else if($date_db < $nextday){
455
-			$call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
-		}else{
457
-			$call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458
-		}
459
-		$this->fill_in_additional_detail_fields();
460
-
461
-		//make sure we grab the localized version of the contact name, if a contact is provided
462
-		if (!empty($this->contact_id)) {
463
-           // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs
446
+        }
447
+        global $timedate;
448
+        $today = $timedate->nowDb();
449
+        $nextday = $timedate->asDbDate($timedate->getNow()->modify("+1 day"));
450
+        $mergeTime = $call_fields['DATE_START']; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
451
+        $date_db = $timedate->to_db($mergeTime);
452
+        if( $date_db	< $today){
453
+            $call_fields['DATE_START']= "<font class='overdueTask'>".$call_fields['DATE_START']."</font>";
454
+        }else if($date_db < $nextday){
455
+            $call_fields['DATE_START'] = "<font class='todaysTask'>".$call_fields['DATE_START']."</font>";
456
+        }else{
457
+            $call_fields['DATE_START'] = "<font class='futureTask'>".$call_fields['DATE_START']."</font>";
458
+        }
459
+        $this->fill_in_additional_detail_fields();
460
+
461
+        //make sure we grab the localized version of the contact name, if a contact is provided
462
+        if (!empty($this->contact_id)) {
463
+            // Bug# 46125 - make first name, last name, salutation and title of Contacts respect field level ACLs
464 464
             $contact_temp = BeanFactory::getBean("Contacts", $this->contact_id);
465 465
             if(!empty($contact_temp)) {
466 466
                 $contact_temp->_create_proper_name_field();
467 467
                 $this->contact_name = $contact_temp->full_name;
468 468
             }
469
-		}
469
+        }
470 470
 
471 471
         $call_fields['CONTACT_ID'] = $this->contact_id;
472 472
         $call_fields['CONTACT_NAME'] = $this->contact_name;
473
-		$call_fields['PARENT_NAME'] = $this->parent_name;
473
+        $call_fields['PARENT_NAME'] = $this->parent_name;
474 474
         $call_fields['REMINDER_CHECKED'] = $this->reminder_time==-1 ? false : true;
475
-	    $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time==-1 ? false : true;
475
+        $call_fields['EMAIL_REMINDER_CHECKED'] = $this->email_reminder_time==-1 ? false : true;
476 476
 
477
-		return $call_fields;
478
-	}
477
+        return $call_fields;
478
+    }
479 479
 
480
-	function set_notification_body($xtpl, $call) {
481
-		global $sugar_config;
482
-		global $app_list_strings;
483
-		global $current_user;
484
-		global $app_list_strings;
485
-		global $timedate;
480
+    function set_notification_body($xtpl, $call) {
481
+        global $sugar_config;
482
+        global $app_list_strings;
483
+        global $current_user;
484
+        global $app_list_strings;
485
+        global $timedate;
486 486
 
487 487
         // rrs: bug 42684 - passing a contact breaks this call
488
-		$notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
489
-
490
-
491
-		// Assumes $call dates are in user format
492
-		$calldate = $timedate->fromDb($call->date_start);
493
-		$xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser);
494
-
495
-		if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
496
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
497
-				  '/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
498
-		} elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
499
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
500
-				  '/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
501
-		} else {
502
-			$xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
503
-				  '/index.php?entryPoint=acceptDecline&module=Calls&user_id='.$call->current_notify_user->id.'&record='.$call->id);
504
-		}
505
-
506
-		$xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name);
507
-		$xtpl->assign("CALL_SUBJECT", $call->name);
508
-		$xtpl->assign("CALL_STARTDATE", $xOffset);
509
-		$xtpl->assign("CALL_HOURS", $call->duration_hours);
510
-		$xtpl->assign("CALL_MINUTES", $call->duration_minutes);
511
-		$xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
512
-		$xtpl->assign("CALL_DESCRIPTION", $call->description);
513
-
514
-		return $xtpl;
515
-	}
516
-
517
-
518
-	function get_call_users() {
519
-		$template = new User();
520
-		// First, get the list of IDs.
521
-		$query = "SELECT calls_users.required, calls_users.accept_status, calls_users.user_id from calls_users where calls_users.call_id='$this->id' AND calls_users.deleted=0";
522
-		$GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
523
-		$result = $this->db->query($query, true);
524
-		$list = Array();
525
-
526
-		while($row = $this->db->fetchByAssoc($result)) {
527
-			$template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
528
-			$record = $template->retrieve($row['user_id']);
529
-			$template->required = $row['required'];
530
-			$template->accept_status = $row['accept_status'];
531
-
532
-			if($record != null) {
533
-			    // this copies the object into the array
534
-				$list[] = $template;
535
-			}
536
-		}
537
-		return $list;
538
-	}
539
-
540
-
541
-  function get_invite_calls(&$user)
542
-  {
488
+        $notifyUser =($call->current_notify_user->object_name == 'User') ? $call->current_notify_user : $current_user;
489
+
490
+
491
+        // Assumes $call dates are in user format
492
+        $calldate = $timedate->fromDb($call->date_start);
493
+        $xOffset = $timedate->asUser($calldate, $notifyUser).' '.$timedate->userTimezoneSuffix($calldate, $notifyUser);
494
+
495
+        if ( strtolower(get_class($call->current_notify_user)) == 'contact' ) {
496
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
497
+                    '/index.php?entryPoint=acceptDecline&module=Calls&contact_id='.$call->current_notify_user->id.'&record='.$call->id);
498
+        } elseif ( strtolower(get_class($call->current_notify_user)) == 'lead' ) {
499
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
500
+                    '/index.php?entryPoint=acceptDecline&module=Calls&lead_id='.$call->current_notify_user->id.'&record='.$call->id);
501
+        } else {
502
+            $xtpl->assign("ACCEPT_URL", $sugar_config['site_url'].
503
+                    '/index.php?entryPoint=acceptDecline&module=Calls&user_id='.$call->current_notify_user->id.'&record='.$call->id);
504
+        }
505
+
506
+        $xtpl->assign("CALL_TO", $call->current_notify_user->new_assigned_user_name);
507
+        $xtpl->assign("CALL_SUBJECT", $call->name);
508
+        $xtpl->assign("CALL_STARTDATE", $xOffset);
509
+        $xtpl->assign("CALL_HOURS", $call->duration_hours);
510
+        $xtpl->assign("CALL_MINUTES", $call->duration_minutes);
511
+        $xtpl->assign("CALL_STATUS", ((isset($call->status))?$app_list_strings['call_status_dom'][$call->status] : ""));
512
+        $xtpl->assign("CALL_DESCRIPTION", $call->description);
513
+
514
+        return $xtpl;
515
+    }
516
+
517
+
518
+    function get_call_users() {
519
+        $template = new User();
520
+        // First, get the list of IDs.
521
+        $query = "SELECT calls_users.required, calls_users.accept_status, calls_users.user_id from calls_users where calls_users.call_id='$this->id' AND calls_users.deleted=0";
522
+        $GLOBALS['log']->debug("Finding linked records $this->object_name: ".$query);
523
+        $result = $this->db->query($query, true);
524
+        $list = Array();
525
+
526
+        while($row = $this->db->fetchByAssoc($result)) {
527
+            $template = new User(); // PHP 5 will retrieve by reference, always over-writing the "old" one
528
+            $record = $template->retrieve($row['user_id']);
529
+            $template->required = $row['required'];
530
+            $template->accept_status = $row['accept_status'];
531
+
532
+            if($record != null) {
533
+                // this copies the object into the array
534
+                $list[] = $template;
535
+            }
536
+        }
537
+        return $list;
538
+    }
539
+
540
+
541
+    function get_invite_calls(&$user)
542
+    {
543 543
     $template = $this;
544 544
     // First, get the list of IDs.
545 545
     $query = "SELECT calls_users.required, calls_users.accept_status, calls_users.call_id from calls_users where calls_users.user_id='$user->id' AND ( calls_users.accept_status IS NULL OR  calls_users.accept_status='none') AND calls_users.deleted=0";
@@ -554,182 +554,182 @@  discard block
 block discarded – undo
554 554
 
555 555
     while($row = $this->db->fetchByAssoc($result))
556 556
     {
557
-      $record = $template->retrieve($row['call_id']);
558
-      $template->required = $row['required'];
559
-      $template->accept_status = $row['accept_status'];
557
+        $record = $template->retrieve($row['call_id']);
558
+        $template->required = $row['required'];
559
+        $template->accept_status = $row['accept_status'];
560 560
 
561 561
 
562
-      if($record != null)
563
-      {
562
+        if($record != null)
563
+        {
564 564
         // this copies the object into the array
565 565
         $list[] = $template;
566
-      }
566
+        }
567 567
     }
568 568
     return $list;
569 569
 
570
-  }
570
+    }
571 571
 
572 572
 
573
-  function set_accept_status(&$user,$status)
574
-  {
573
+    function set_accept_status(&$user,$status)
574
+    {
575 575
     if ( $user->object_name == 'User')
576 576
     {
577
-      $relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
578
-      $data_values = array('accept_status'=>$status);
579
-      $this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
580
-      global $current_user;
577
+        $relate_values = array('user_id'=>$user->id,'call_id'=>$this->id);
578
+        $data_values = array('accept_status'=>$status);
579
+        $this->set_relationship($this->rel_users_table, $relate_values, true, true,$data_values);
580
+        global $current_user;
581 581
 
582
-      if ( $this->update_vcal )
583
-      {
582
+        if ( $this->update_vcal )
583
+        {
584 584
         vCal::cache_sugar_vcal($user);
585
-      }
585
+        }
586 586
     }
587 587
     else if ( $user->object_name == 'Contact')
588 588
     {
589
-      $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590
-      $data_values = array('accept_status'=>$status);
591
-      $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
589
+        $relate_values = array('contact_id'=>$user->id,'call_id'=>$this->id);
590
+        $data_values = array('accept_status'=>$status);
591
+        $this->set_relationship($this->rel_contacts_table, $relate_values, true, true,$data_values);
592 592
     }
593 593
     else if ( $user->object_name == 'Lead')
594 594
     {
595
-      $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596
-      $data_values = array('accept_status'=>$status);
597
-      $this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
595
+        $relate_values = array('lead_id'=>$user->id,'call_id'=>$this->id);
596
+        $data_values = array('accept_status'=>$status);
597
+        $this->set_relationship($this->rel_leads_table, $relate_values, true, true,$data_values);
598
+    }
598 599
     }
599
-  }
600 600
 
601 601
 
602 602
 
603
-	function get_notification_recipients() {
604
-		if($this->special_notification) {
605
-			return parent::get_notification_recipients();
606
-		}
603
+    function get_notification_recipients() {
604
+        if($this->special_notification) {
605
+            return parent::get_notification_recipients();
606
+        }
607 607
 
608 608
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
609
-		$list = array();
609
+        $list = array();
610 610
         if(!is_array($this->contacts_arr)) {
611
-			$this->contacts_arr =	array();
612
-		}
611
+            $this->contacts_arr =	array();
612
+        }
613 613
 
614
-		if(!is_array($this->users_arr)) {
615
-			$this->users_arr =	array();
616
-		}
614
+        if(!is_array($this->users_arr)) {
615
+            $this->users_arr =	array();
616
+        }
617 617
 
618 618
         if(!is_array($this->leads_arr)) {
619
-			$this->leads_arr =	array();
620
-		}
621
-
622
-		foreach($this->users_arr as $user_id) {
623
-			$notify_user = new User();
624
-			$notify_user->retrieve($user_id);
625
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
626
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
627
-			$list[$notify_user->id] = $notify_user;
628
-		}
629
-
630
-		foreach($this->contacts_arr as $contact_id) {
631
-			$notify_user = new Contact();
632
-			$notify_user->retrieve($contact_id);
633
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
634
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
635
-			$list[$notify_user->id] = $notify_user;
636
-		}
619
+            $this->leads_arr =	array();
620
+        }
621
+
622
+        foreach($this->users_arr as $user_id) {
623
+            $notify_user = new User();
624
+            $notify_user->retrieve($user_id);
625
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
626
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
627
+            $list[$notify_user->id] = $notify_user;
628
+        }
629
+
630
+        foreach($this->contacts_arr as $contact_id) {
631
+            $notify_user = new Contact();
632
+            $notify_user->retrieve($contact_id);
633
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
634
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
635
+            $list[$notify_user->id] = $notify_user;
636
+        }
637 637
 
638 638
         foreach($this->leads_arr as $lead_id) {
639
-			$notify_user = new Lead();
640
-			$notify_user->retrieve($lead_id);
641
-			$notify_user->new_assigned_user_name = $notify_user->full_name;
642
-			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
643
-			$list[$notify_user->id] = $notify_user;
644
-		}
645
-		global $sugar_config;
646
-		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647
-			global $current_user;
648
-			if(isset($list[$current_user->id]))
649
-				unset($list[$current_user->id]);
650
-		}
639
+            $notify_user = new Lead();
640
+            $notify_user->retrieve($lead_id);
641
+            $notify_user->new_assigned_user_name = $notify_user->full_name;
642
+            $GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
643
+            $list[$notify_user->id] = $notify_user;
644
+        }
645
+        global $sugar_config;
646
+        if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
647
+            global $current_user;
648
+            if(isset($list[$current_user->id]))
649
+                unset($list[$current_user->id]);
650
+        }
651 651
 //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
652
-		return $list;
653
-	}
652
+        return $list;
653
+    }
654 654
 
655 655
     function bean_implements($interface){
656
-		switch($interface){
657
-			case 'ACL':return true;
658
-		}
659
-		return false;
660
-	}
661
-
662
-	function listviewACLHelper(){
663
-		$array_assign = parent::listviewACLHelper();
664
-		$is_owner = false;
665
-		$in_group = false; //SECURITY GROUPS
666
-		if(!empty($this->parent_name)){
667
-
668
-			if(!empty($this->parent_name_owner)){
669
-				global $current_user;
670
-				$is_owner = $current_user->id == $this->parent_name_owner;
671
-			}
672
-			/* BEGIN - SECURITY GROUPS */
673
-			//parent_name_owner not being set for whatever reason so we need to figure this out
674
-			else if(!empty($this->parent_type) && !empty($this->parent_id)) {
675
-				global $current_user;
656
+        switch($interface){
657
+            case 'ACL':return true;
658
+        }
659
+        return false;
660
+    }
661
+
662
+    function listviewACLHelper(){
663
+        $array_assign = parent::listviewACLHelper();
664
+        $is_owner = false;
665
+        $in_group = false; //SECURITY GROUPS
666
+        if(!empty($this->parent_name)){
667
+
668
+            if(!empty($this->parent_name_owner)){
669
+                global $current_user;
670
+                $is_owner = $current_user->id == $this->parent_name_owner;
671
+            }
672
+            /* BEGIN - SECURITY GROUPS */
673
+            //parent_name_owner not being set for whatever reason so we need to figure this out
674
+            else if(!empty($this->parent_type) && !empty($this->parent_id)) {
675
+                global $current_user;
676 676
                 $parent_bean = BeanFactory::getBean($this->parent_type,$this->parent_id);
677 677
                 if($parent_bean !== false) {
678
-                	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
678
+                    $is_owner = $current_user->id == $parent_bean->assigned_user_id;
679 679
                 }
680
-			}
681
-			require_once("modules/SecurityGroups/SecurityGroup.php");
682
-			$in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view'); 
683
-        	/* END - SECURITY GROUPS */
684
-		}
685
-
686
-			/* BEGIN - SECURITY GROUPS */
687
-			/**
680
+            }
681
+            require_once("modules/SecurityGroups/SecurityGroup.php");
682
+            $in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view'); 
683
+            /* END - SECURITY GROUPS */
684
+        }
685
+
686
+            /* BEGIN - SECURITY GROUPS */
687
+            /**
688 688
 			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
689
-			*/
690
-			if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691
-        	/* END - SECURITY GROUPS */
692
-				$array_assign['PARENT'] = 'a';
693
-			}else{
694
-				$array_assign['PARENT'] = 'span';
695
-			}
696
-		$is_owner = false;
697
-		$in_group = false; //SECURITY GROUPS
698
-		if(!empty($this->contact_name)){
699
-
700
-			if(!empty($this->contact_name_owner)){
701
-				global $current_user;
702
-				$is_owner = $current_user->id == $this->contact_name_owner;
703
-			}
704
-			/* BEGIN - SECURITY GROUPS */
705
-			//contact_name_owner not being set for whatever reason so we need to figure this out
706
-			else {
707
-				global $current_user;
689
+             */
690
+            if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)){
691
+            /* END - SECURITY GROUPS */
692
+                $array_assign['PARENT'] = 'a';
693
+            }else{
694
+                $array_assign['PARENT'] = 'span';
695
+            }
696
+        $is_owner = false;
697
+        $in_group = false; //SECURITY GROUPS
698
+        if(!empty($this->contact_name)){
699
+
700
+            if(!empty($this->contact_name_owner)){
701
+                global $current_user;
702
+                $is_owner = $current_user->id == $this->contact_name_owner;
703
+            }
704
+            /* BEGIN - SECURITY GROUPS */
705
+            //contact_name_owner not being set for whatever reason so we need to figure this out
706
+            else {
707
+                global $current_user;
708 708
                 $parent_bean = BeanFactory::getBean('Contacts',$this->contact_id);
709 709
                 if($parent_bean !== false) {
710
-                	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
710
+                    $is_owner = $current_user->id == $parent_bean->assigned_user_id;
711 711
                 }
712
-			}
713
-			require_once("modules/SecurityGroups/SecurityGroup.php");
714
-			$in_group = SecurityGroup::groupHasAccess('Contacts', $this->contact_id, 'view'); 
715
-        	/* END - SECURITY GROUPS */
716
-		}
717
-			/* BEGIN - SECURITY GROUPS */
718
-			/**
712
+            }
713
+            require_once("modules/SecurityGroups/SecurityGroup.php");
714
+            $in_group = SecurityGroup::groupHasAccess('Contacts', $this->contact_id, 'view'); 
715
+            /* END - SECURITY GROUPS */
716
+        }
717
+            /* BEGIN - SECURITY GROUPS */
718
+            /**
719 719
 			if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
720
-			*/
721
-			if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722
-        	/* END - SECURITY GROUPS */
723
-				$array_assign['CONTACT'] = 'a';
724
-			}else{
725
-				$array_assign['CONTACT'] = 'span';
726
-			}
727
-
728
-		return $array_assign;
729
-	}
730
-
731
-	function save_relationship_changes($is_update, $exclude = array()) {
732
-		if(empty($this->in_workflow))
720
+             */
721
+            if( ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)){
722
+            /* END - SECURITY GROUPS */
723
+                $array_assign['CONTACT'] = 'a';
724
+            }else{
725
+                $array_assign['CONTACT'] = 'span';
726
+            }
727
+
728
+        return $array_assign;
729
+    }
730
+
731
+    function save_relationship_changes($is_update, $exclude = array()) {
732
+        if(empty($this->in_workflow))
733 733
         {
734 734
             if(empty($this->in_import))
735 735
             {
@@ -737,12 +737,12 @@  discard block
 block discarded – undo
737 737
                 //add assigned_user_id to exclude list and let the logic from MeetingFormBase determine whether assigned user id gets added to the relationship
738 738
                 if(!empty($GLOBALS['soap_server_object']))
739 739
                 {
740
-           		    $exclude = array('lead_id', 'contact_id', 'user_id');
741
-           	    }
740
+                        $exclude = array('lead_id', 'contact_id', 'user_id');
741
+                    }
742 742
                 else
743 743
                 {
744
-	                $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745
-           	    }
744
+                    $exclude = array('lead_id', 'contact_id', 'user_id', 'assigned_user_id');
745
+                    }
746 746
             }
747 747
             else
748 748
             {
@@ -751,15 +751,15 @@  discard block
 block discarded – undo
751 751
 
752 752
 
753 753
         }
754
-		parent::save_relationship_changes($is_update, $exclude);
755
-	}
754
+        parent::save_relationship_changes($is_update, $exclude);
755
+    }
756 756
 
757 757
     public function getDefaultStatus()
758 758
     {
759
-         $def = $this->field_defs['status'];
760
-         if (isset($def['default'])) {
761
-             return $def['default'];
762
-         } else {
759
+            $def = $this->field_defs['status'];
760
+            if (isset($def['default'])) {
761
+                return $def['default'];
762
+            } else {
763 763
             $app = return_app_list_strings_language($GLOBALS['current_language']);
764 764
             if (isset($def['options']) && isset($app[$def['options']])) {
765 765
                 $keys = array_keys($app[$def['options']]);
Please login to merge, or discard this patch.
modules/Calls/metadata/additionalDetails.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 
42 42
 function additionalDetailsCall($fields) {
43 43
     global $timedate;
44
-	static $mod_strings;
45
-	if(empty($mod_strings)) {
46
-		global $current_language;
47
-		$mod_strings = return_module_language($current_language, 'Calls');
48
-	}
44
+    static $mod_strings;
45
+    if(empty($mod_strings)) {
46
+        global $current_language;
47
+        $mod_strings = return_module_language($current_language, 'Calls');
48
+    }
49 49
     $overlib_string = '';
50 50
     $overlib_string .= '<input id="type" type="hidden" value="Call"/>';
51 51
 
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
 
57 57
     $overlib_string .= '<h2><img src="index.php?entryPoint=getImage&themeName=' . SugarThemeRegistry::current()->name .'&imageName=Calls.gif"/> '.$mod_strings['LBL_CALL'].'</h2>';
58 58
 
59
-   if(!empty($fields['NAME'])) {
60
-        	$overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ';
59
+    if(!empty($fields['NAME'])) {
60
+            $overlib_string .= '<b>'. $mod_strings['LBL_SUBJECT'] . '</b> ';
61 61
             $url = 'index.php?action=DetailView&module=Calls&record='.$fields['ID'];
62 62
             $overlib_string .= '<a href="'.$url.'">' . $fields['NAME'] . '</a>';
63
-        	$overlib_string .= '<br>';
63
+            $overlib_string .= '<br>';
64 64
     }
65
-	if(!empty($fields['DATE_START'])) {
65
+    if(!empty($fields['DATE_START'])) {
66 66
         $data_date = $timedate->fromUser($fields['DATE_START'])->format('Y-m-d H:i:s');
67 67
         $overlib_string .= '<span data-field="DATE_START" data-date="' . $data_date . '">';
68 68
         $overlib_string .= '<b>' . $mod_strings['LBL_DATE_TIME'] . '</b> ' . $fields['DATE_START'] . ' <br>';
69 69
         $overlib_string .= '</span>';
70 70
     }
71
-	if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
-		$overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
71
+    if(isset($fields['DURATION_HOURS']) || isset($fields['DURATION_MINUTES'])) {
72
+        $overlib_string .= '<b>'. $mod_strings['LBL_DURATION'] . '</b> ';
73 73
         if(isset($fields['DURATION_HOURS'])) {
74 74
             $overlib_string .= $fields['DURATION_HOURS'] . $mod_strings['LBL_HOURS_ABBREV'] . ' ';
75 75
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $overlib_string .=  $fields['DURATION_MINUTES'] . $mod_strings['LBL_MINSS_ABBREV'];
78 78
         }
79 79
         $overlib_string .=  '<br>';
80
-	}
80
+    }
81 81
     if (!empty($fields['PARENT_ID']))
82 82
     {
83 83
             $overlib_string .= "<b>". $mod_strings['LBL_RELATED_TO'] . "</b> ".
@@ -86,21 +86,21 @@  discard block
 block discarded – undo
86 86
             $overlib_string .= '<br>';
87 87
     }
88 88
     if(!empty($fields['STATUS'])) {
89
-      	$overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'];
90
-      	$overlib_string .= '<br>';
91
-      }
92
-	if(!empty($fields['DESCRIPTION'])) {
93
-		$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
-		if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
95
-		$overlib_string .= '<br>';
96
-	}
89
+            $overlib_string .= '<b>'. $mod_strings['LBL_STATUS'] . '</b> ' . $fields['STATUS'];
90
+            $overlib_string .= '<br>';
91
+        }
92
+    if(!empty($fields['DESCRIPTION'])) {
93
+        $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300);
94
+        if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
95
+        $overlib_string .= '<br>';
96
+    }
97 97
     $overlib_string .= '<br>';
98
-	$editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
99
-	$viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
98
+    $editLink = "index.php?action=EditView&module=Calls&record={$fields['ID']}";
99
+    $viewLink = "index.php?action=DetailView&module=Calls&record={$fields['ID']}";
100 100
 
101
-	return array('fieldToAddTo' => 'NAME',
102
-				 'string' => $overlib_string,
103
-				 'editLink' => $editLink,
104
-				 'viewLink' => $viewLink);
101
+    return array('fieldToAddTo' => 'NAME',
102
+                    'string' => $overlib_string,
103
+                    'editLink' => $editLink,
104
+                    'viewLink' => $viewLink);
105 105
 }
106 106
 
Please login to merge, or discard this patch.
modules/Calls/metadata/editviewdefs.php 1 patch
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -39,136 +39,136 @@  discard block
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Calls'] =
41 41
 array (
42
-  'EditView' => 
43
-  array (
42
+    'EditView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49
-      'maxColumns' => '2',
50
-      'form' => 
51
-      array (
49
+        'maxColumns' => '2',
50
+        'form' => 
51
+        array (
52 52
         'hidden' => 
53 53
         array (
54
-          0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
-          1 => '<input type="hidden" name="send_invites">',
56
-          2 => '<input type="hidden" name="user_invitees">',
57
-          3 => '<input type="hidden" name="lead_invitees">',
58
-          4 => '<input type="hidden" name="contact_invitees">',
54
+            0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
+            1 => '<input type="hidden" name="send_invites">',
56
+            2 => '<input type="hidden" name="user_invitees">',
57
+            3 => '<input type="hidden" name="lead_invitees">',
58
+            4 => '<input type="hidden" name="contact_invitees">',
59 59
         ),
60 60
         'buttons' => 
61 61
         array (
62
-          0 => 
63
-          array (
62
+            0 => 
63
+            array (
64 64
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
65
-          ),
66
-          1 => 'CANCEL',
67
-          2 => 
68
-          array (
65
+            ),
66
+            1 => 'CANCEL',
67
+            2 => 
68
+            array (
69 69
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_HEADER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
70
-          ),
71
-          3 => 
72
-          array (
70
+            ),
71
+            3 => 
72
+            array (
73 73
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_HEADER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
74
-          ),
74
+            ),
75 75
         ),
76 76
         'buttons_footer' => 
77 77
         array (
78
-          0 => 
79
-          array (
78
+            0 => 
79
+            array (
80 80
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id="SAVE_FOOTER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if}formSubmitCheck();;" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
81
-          ),
82
-          1 => 'CANCEL',
83
-          2 => 
84
-          array (
81
+            ),
82
+            1 => 'CANCEL',
83
+            2 => 
84
+            array (
85 85
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" id="SAVE_SEND_FOOTER" class="button" onclick="document.EditView.send_invites.value=\'1\';SUGAR.calls.fill_invitees();document.EditView.action.value=\'Save\';document.EditView.return_action.value=\'EditView\';document.EditView.return_module.value=\'{$smarty.request.return_module}\';formSubmitCheck();;" type="button" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
86
-          ),
87
-          3 => 
88
-          array (
86
+            ),
87
+            3 => 
88
+            array (
89 89
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" id="CLOSE_CREATE_FOOTER" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees(); document.EditView.status.value=\'Held\'; document.EditView.action.value=\'Save\'; document.EditView.return_module.value=\'Calls\'; document.EditView.isDuplicate.value=true; document.EditView.isSaveAndNew.value=true; document.EditView.return_action.value=\'EditView\'; document.EditView.return_id.value=\'{$fields.id.value}\'; formSubmitCheck();" type="button" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
90
-          ),
90
+            ),
91 91
         ),
92 92
         'footerTpl' => 'modules/Calls/tpls/footer.tpl',
93
-      ),
94
-      'widths' => 
95
-      array (
93
+        ),
94
+        'widths' => 
95
+        array (
96 96
         0 => 
97 97
         array (
98
-          'label' => '10',
99
-          'field' => '30',
98
+            'label' => '10',
99
+            'field' => '30',
100 100
         ),
101 101
         1 => 
102 102
         array (
103
-          'label' => '10',
104
-          'field' => '30',
103
+            'label' => '10',
104
+            'field' => '30',
105
+        ),
105 106
         ),
106
-      ),
107
-      'javascript' => '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
107
+        'javascript' => '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
108 108
 <script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
109 109
 <script>toggle_portal_flag();function toggle_portal_flag()  {ldelim} {$TOGGLE_JS} {rdelim}
110 110
 function formSubmitCheck(){ldelim}var duration=true;if(typeof(isValidDuration)!="undefined"){ldelim}duration=isValidDuration();{rdelim}if(check_form(\'EditView\') && duration){ldelim}SUGAR.ajaxUI.submitForm("EditView");{rdelim}{rdelim}</script>',
111
-      'useTabs' => false,
112
-      'tabDefs' => 
113
-      array (
111
+        'useTabs' => false,
112
+        'tabDefs' => 
113
+        array (
114 114
         'LBL_CALL_INFORMATION' => 
115 115
         array (
116
-          'newTab' => false,
117
-          'panelDefault' => 'expanded',
116
+            'newTab' => false,
117
+            'panelDefault' => 'expanded',
118
+        ),
118 119
         ),
119
-      ),
120 120
     ),
121 121
     'panels' => 
122 122
     array (
123
-      'lbl_call_information' => 
124
-      array (
123
+        'lbl_call_information' => 
124
+        array (
125 125
         0 => 
126 126
         array (
127
-          0 => 
128
-          array (
127
+            0 => 
128
+            array (
129 129
             'name' => 'name',
130
-          ),
131
-          1 => 
132
-          array (
130
+            ),
131
+            1 => 
132
+            array (
133 133
             'name' => 'status',
134 134
             'fields' => 
135 135
             array (
136
-              0 => 
137
-              array (
136
+                0 => 
137
+                array (
138 138
                 'name' => 'direction',
139
-              ),
140
-              1 => 
141
-              array (
139
+                ),
140
+                1 => 
141
+                array (
142 142
                 'name' => 'status',
143
-              ),
143
+                ),
144
+            ),
144 145
             ),
145
-          ),
146 146
         ),
147 147
         1 => 
148 148
         array (
149
-          0 => 
150
-          array (
149
+            0 => 
150
+            array (
151 151
             'name' => 'date_start',
152 152
             'displayParams' => 
153 153
             array (
154
-              'updateCallback' => 'SugarWidgetScheduler.update_time();',
154
+                'updateCallback' => 'SugarWidgetScheduler.update_time();',
155 155
             ),
156 156
             'label' => 'LBL_DATE_TIME',
157
-          ),
158
-          1 => 
159
-          array (
157
+            ),
158
+            1 => 
159
+            array (
160 160
             'name' => 'parent_name',
161 161
             'label' => 'LBL_LIST_RELATED_TO',
162
-          ),
162
+            ),
163 163
         ),
164 164
         2 => 
165 165
         array (
166
-          0 => 
167
-          array (
166
+            0 => 
167
+            array (
168 168
             'name' => 'duration_hours',
169 169
             'label' => 'LBL_DURATION',
170 170
             'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value}&nbsp;<span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}</span>',
171
-          ),
171
+            ),
172 172
 //          1 =>
173 173
 //          array (
174 174
 //            'name' => 'reminder_time',
@@ -186,23 +186,23 @@  discard block
 block discarded – undo
186 186
         ),
187 187
         4 =>
188 188
         array (
189
-          0 => 
190
-          array (
189
+            0 => 
190
+            array (
191 191
             'name' => 'description',
192 192
             'comment' => 'Full text of the note',
193 193
             'label' => 'LBL_DESCRIPTION',
194
-          ),
194
+            ),
195 195
         ),
196 196
         5 =>
197 197
         array (
198
-          0 => 
199
-          array (
198
+            0 => 
199
+            array (
200 200
             'name' => 'assigned_user_name',
201 201
             'label' => 'LBL_ASSIGNED_TO_NAME',
202
-          ),
202
+            ),
203 203
         ),
204
-      ),
204
+        ),
205
+    ),
205 206
     ),
206
-  ),
207 207
 );
208 208
 ?>
Please login to merge, or discard this patch.
modules/Calls/metadata/SearchFields.php 1 patch
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -40,135 +40,135 @@
 block discarded – undo
40 40
 global $current_user;
41 41
 $module_name = "Calls";
42 42
 $searchFields['Calls'] = array (
43
-  'name' =>
44
-  array (
43
+    'name' =>
44
+    array (
45 45
     'query_type' => 'default',
46
-  ),
47
-  'contact_name' => 
48
-  array (
46
+    ),
47
+    'contact_name' => 
48
+    array (
49 49
     'query_type' => 'default',
50 50
     'db_field' => 
51 51
     array (
52
-      0 => 'contacts.first_name',
53
-      1 => 'contacts.last_name',
52
+        0 => 'contacts.first_name',
53
+        1 => 'contacts.last_name',
54 54
     ),
55
-  ),
56
-  'date_start' => 
57
-  array (
55
+    ),
56
+    'date_start' => 
57
+    array (
58 58
     'query_type' => 'default',
59
-  ),
60
-  'location' => 
61
-  array (
59
+    ),
60
+    'location' => 
61
+    array (
62 62
     'query_type' => 'default',
63
-  ),
64
-  'current_user_only' => 
65
-  array (
63
+    ),
64
+    'current_user_only' => 
65
+    array (
66 66
     'query_type' => 'default',
67 67
     'db_field' => 
68 68
     array (
69
-      0 => 'assigned_user_id',
69
+        0 => 'assigned_user_id',
70 70
     ),
71 71
     'my_items' => true,
72 72
     'vname' => 'LBL_CURRENT_USER_FILTER',
73 73
     'type' => 'bool',
74
-  ),
75
-  'assigned_user_id' => 
76
-  array (
74
+    ),
75
+    'assigned_user_id' => 
76
+    array (
77 77
     'query_type' => 'default',
78
-  ),
79
-  'status' => 
80
-  array (
78
+    ),
79
+    'status' => 
80
+    array (
81 81
     'query_type' => 'default',
82 82
     'options' => 'call_status_dom',
83 83
     'template_var' => 'STATUS_FILTER',
84
-  ),
85
-  'open_only' => 
86
-  array (
84
+    ),
85
+    'open_only' => 
86
+    array (
87 87
     'query_type' => 'default',
88 88
     'db_field' => 
89 89
     array (
90
-      0 => 'status',
90
+        0 => 'status',
91 91
     ),
92 92
     'operator' => 'not in',
93 93
     'closed_values' => 
94 94
     array (
95
-      0 => 'Held',
96
-      1 => 'Not Held',
95
+        0 => 'Held',
96
+        1 => 'Not Held',
97 97
     ),
98 98
     'type' => 'bool',
99
-  ),
100
-  'range_date_entered' => 
101
-  array (
99
+    ),
100
+    'range_date_entered' => 
101
+    array (
102 102
     'query_type' => 'default',
103 103
     'enable_range_search' => true,
104 104
     'is_date_field' => true,
105
-  ),
106
-  'start_range_date_entered' => 
107
-  array (
105
+    ),
106
+    'start_range_date_entered' => 
107
+    array (
108 108
     'query_type' => 'default',
109 109
     'enable_range_search' => true,
110 110
     'is_date_field' => true,
111
-  ),
112
-  'end_range_date_entered' => 
113
-  array (
111
+    ),
112
+    'end_range_date_entered' => 
113
+    array (
114 114
     'query_type' => 'default',
115 115
     'enable_range_search' => true,
116 116
     'is_date_field' => true,
117
-  ),
118
-  'range_date_modified' => 
119
-  array (
117
+    ),
118
+    'range_date_modified' => 
119
+    array (
120 120
     'query_type' => 'default',
121 121
     'enable_range_search' => true,
122 122
     'is_date_field' => true,
123
-  ),
124
-  'start_range_date_modified' => 
125
-  array (
123
+    ),
124
+    'start_range_date_modified' => 
125
+    array (
126 126
     'query_type' => 'default',
127 127
     'enable_range_search' => true,
128 128
     'is_date_field' => true,
129
-  ),
130
-  'end_range_date_modified' => 
131
-  array (
129
+    ),
130
+    'end_range_date_modified' => 
131
+    array (
132 132
     'query_type' => 'default',
133 133
     'enable_range_search' => true,
134 134
     'is_date_field' => true,
135
-  ),
136
-  'range_date_start' => 
137
-  array (
135
+    ),
136
+    'range_date_start' => 
137
+    array (
138 138
     'query_type' => 'default',
139 139
     'enable_range_search' => true,
140 140
     'is_date_field' => true,
141
-  ),
142
-  'start_range_date_start' => 
143
-  array (
141
+    ),
142
+    'start_range_date_start' => 
143
+    array (
144 144
     'query_type' => 'default',
145 145
     'enable_range_search' => true,
146 146
     'is_date_field' => true,
147
-  ),
148
-  'end_range_date_start' => 
149
-  array (
147
+    ),
148
+    'end_range_date_start' => 
149
+    array (
150 150
     'query_type' => 'default',
151 151
     'enable_range_search' => true,
152 152
     'is_date_field' => true,
153
-  ),
154
-  'range_date_end' => 
155
-  array (
153
+    ),
154
+    'range_date_end' => 
155
+    array (
156 156
     'query_type' => 'default',
157 157
     'enable_range_search' => true,
158 158
     'is_date_field' => true,
159
-  ),
160
-  'start_range_date_end' => 
161
-  array (
159
+    ),
160
+    'start_range_date_end' => 
161
+    array (
162 162
     'query_type' => 'default',
163 163
     'enable_range_search' => true,
164 164
     'is_date_field' => true,
165
-  ),
166
-  'end_range_date_end' => 
167
-  array (
165
+    ),
166
+    'end_range_date_end' => 
167
+    array (
168 168
     'query_type' => 'default',
169 169
     'enable_range_search' => true,
170 170
     'is_date_field' => true,
171
-  ),
171
+    ),
172 172
     'favorites_only' => array(
173 173
         'query_type'=>'format',
174 174
         'operator' => 'subquery',
Please login to merge, or discard this patch.
modules/Calls/metadata/detailviewdefs.php 1 patch
Indentation   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -40,150 +40,150 @@  discard block
 block discarded – undo
40 40
 
41 41
 $viewdefs ['Calls'] =
42 42
 array (
43
-  'DetailView' => 
44
-  array (
43
+    'DetailView' => 
44
+    array (
45 45
     'templateMeta' => 
46 46
     array (
47
-      'form' => 
48
-      array (
47
+        'form' => 
48
+        array (
49 49
         'buttons' => 
50 50
         array (
51
-          0 => 'EDIT',
52
-          1 => 'DUPLICATE',
53
-          2 => 'DELETE',
54
-          3 => 
55
-          array (
51
+            0 => 'EDIT',
52
+            1 => 'DUPLICATE',
53
+            2 => 'DELETE',
54
+            3 => 
55
+            array (
56 56
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSaveAndNew" value="false">  <input type="hidden" name="status" value="">  <input type="hidden" name="isSaveFromDetailView" value="true">  <input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"   class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_create_button" name="button"  value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"  type="submit">{/if}',
57 57
             'sugar_html' => 
58 58
             array (
59
-              'type' => 'submit',
60
-              'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
61
-              'htmlOptions' => 
62
-              array (
59
+                'type' => 'submit',
60
+                'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
61
+                'htmlOptions' => 
62
+                array (
63 63
                 'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
64 64
                 'class' => 'button',
65 65
                 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'',
66 66
                 'name' => 'button',
67 67
                 'id' => 'close_create_button',
68
-              ),
69
-              'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
68
+                ),
69
+                'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
70
+            ),
70 71
             ),
71
-          ),
72
-          4 => 
73
-          array (
72
+            4 => 
73
+            array (
74 74
             'customCode' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")} <input type="hidden" name="isSave" value="false">  <input title="{$APP.LBL_CLOSE_BUTTON_TITLE}"  accesskey="{$APP.LBL_CLOSE_BUTTON_KEY}"  class="button"  onclick="this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'" id="close_button" name="button1"  value="{$APP.LBL_CLOSE_BUTTON_TITLE}"  type="submit">{/if}',
75 75
             'sugar_html' => 
76 76
             array (
77
-              'type' => 'submit',
78
-              'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
79
-              'htmlOptions' => 
80
-              array (
77
+                'type' => 'submit',
78
+                'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
79
+                'htmlOptions' => 
80
+                array (
81 81
                 'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
82 82
                 'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}',
83 83
                 'class' => 'button',
84 84
                 'onclick' => 'this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Calls\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';this.form.isSaveFromDetailView.value=true',
85 85
                 'name' => 'button1',
86 86
                 'id' => 'close_button',
87
-              ),
88
-              'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
87
+                ),
88
+                'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
89
+            ),
89 90
             ),
90
-          ),
91
-          'SA_RESCHEDULE' => 
92
-          array (
91
+            'SA_RESCHEDULE' => 
92
+            array (
93 93
             'customCode' => '{if $fields.status.value != "Held"} <input title="{$MOD.LBL_RESCHEDULE}" class="button" onclick="get_form();" name="Reschedule" id="reschedule_button" value="{$MOD.LBL_RESCHEDULE}" type="button">{/if}',
94
-          ),
94
+            ),
95 95
         ),
96 96
         'hidden' => 
97 97
         array (
98
-          0 => '<input type="hidden" name="isSaveAndNew">',
99
-          1 => '<input type="hidden" name="status">',
100
-          2 => '<input type="hidden" name="isSaveFromDetailView">',
101
-          3 => '<input type="hidden" name="isSave">',
98
+            0 => '<input type="hidden" name="isSaveAndNew">',
99
+            1 => '<input type="hidden" name="status">',
100
+            2 => '<input type="hidden" name="isSaveFromDetailView">',
101
+            3 => '<input type="hidden" name="isSave">',
102 102
         ),
103 103
         'headerTpl' => 'modules/Calls/tpls/detailHeader.tpl',
104
-      ),
105
-      'maxColumns' => '2',
106
-      'widths' => 
107
-      array (
104
+        ),
105
+        'maxColumns' => '2',
106
+        'widths' => 
107
+        array (
108 108
         0 => 
109 109
         array (
110
-          'label' => '10',
111
-          'field' => '30',
110
+            'label' => '10',
111
+            'field' => '30',
112 112
         ),
113 113
         1 => 
114 114
         array (
115
-          'label' => '10',
116
-          'field' => '30',
115
+            'label' => '10',
116
+            'field' => '30',
117 117
         ),
118
-      ),
119
-      'useTabs' => true,
120
-      'includes' => 
121
-      array (
118
+        ),
119
+        'useTabs' => true,
120
+        'includes' => 
121
+        array (
122 122
         'SA_RESCHEDULE' => 
123 123
         array (
124
-          'file' => 'modules/Calls_Reschedule/reschedule_form.js',
124
+            'file' => 'modules/Calls_Reschedule/reschedule_form.js',
125
+        ),
126
+            array('file' => 'modules/Reminders/Reminders.js'),
125 127
         ),
126
-          array('file' => 'modules/Reminders/Reminders.js'),
127
-      ),
128
-      'tabDefs' => 
129
-      array (
128
+        'tabDefs' => 
129
+        array (
130 130
         'LBL_CALL_INFORMATION' => 
131 131
         array (
132
-          'newTab' => true,
133
-          'panelDefault' => 'expanded',
132
+            'newTab' => true,
133
+            'panelDefault' => 'expanded',
134 134
         ),
135 135
         'LBL_RESCHEDULE_PANEL' => 
136 136
         array (
137
-          'newTab' => true,
138
-          'panelDefault' => 'expanded',
137
+            'newTab' => true,
138
+            'panelDefault' => 'expanded',
139 139
         ),
140 140
         'LBL_PANEL_ASSIGNMENT' =>
141 141
         array (
142
-          'newTab' => true,
143
-          'panelDefault' => 'expanded',
142
+            'newTab' => true,
143
+            'panelDefault' => 'expanded',
144
+        ),
144 145
         ),
145
-      ),
146 146
     ),
147 147
     'panels' => 
148 148
     array (
149
-      'lbl_call_information' => 
150
-      array (
149
+        'lbl_call_information' => 
150
+        array (
151 151
         0 => 
152 152
         array (
153
-          0 => 
154
-          array (
153
+            0 => 
154
+            array (
155 155
             'name' => 'name',
156 156
             'label' => 'LBL_SUBJECT',
157
-          ),
158
-          1 => 
159
-          array (
157
+            ),
158
+            1 => 
159
+            array (
160 160
             'name' => 'direction',
161 161
             'customCode' => '{$fields.direction.options[$fields.direction.value]} {$fields.status.options[$fields.status.value]}',
162 162
             'label' => 'LBL_STATUS',
163
-          ),
163
+            ),
164 164
         ),
165 165
         1 => 
166 166
         array (
167
-          0 => 
168
-          array (
167
+            0 => 
168
+            array (
169 169
             'name' => 'date_start',
170 170
             'customCode' => '{$fields.date_start.value} {$fields.time_start.value}&nbsp;',
171 171
             'label' => 'LBL_DATE_TIME',
172
-          ),
173
-          1 => 
174
-          array (
172
+            ),
173
+            1 => 
174
+            array (
175 175
             'name' => 'parent_name',
176 176
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
177
-          ),
177
+            ),
178 178
         ),
179 179
         2 => 
180 180
         array (
181
-          0 => 
182
-          array (
181
+            0 => 
182
+            array (
183 183
             'name' => 'duration_hours',
184 184
             'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV}&nbsp;',
185 185
             'label' => 'LBL_DURATION',
186
-          ),
186
+            ),
187 187
 //          1 =>
188 188
 //          array (
189 189
 //            'name' => 'reminder_time',
@@ -197,55 +197,55 @@  discard block
 block discarded – undo
197 197
         ),
198 198
         3 => 
199 199
         array (
200
-          0 => 
201
-          array (
200
+            0 => 
201
+            array (
202 202
             'name' => 'description',
203 203
             'comment' => 'Full text of the note',
204 204
             'label' => 'LBL_DESCRIPTION',
205
-          ),
205
+            ),
206 206
         ),
207 207
         4 => 
208 208
         array (
209
-          0 => 
210
-          array (
209
+            0 => 
210
+            array (
211 211
             'name' => 'assigned_user_name',
212 212
             'customCode' => '{$fields.assigned_user_name.value}',
213 213
             'label' => 'LBL_ASSIGNED_TO',
214
-          ),
214
+            ),
215 215
         ),
216
-      ),
217
-      'lbl_reschedule_panel' => 
218
-      array (
216
+        ),
217
+        'lbl_reschedule_panel' => 
218
+        array (
219 219
         0 => 
220 220
         array (
221
-          0 => 
222
-          array (
221
+            0 => 
222
+            array (
223 223
             'name' => 'reschedule_history',
224 224
             'comment' => 'Call duration, minutes portion',
225 225
             'label' => 'LBL_RESCHEDULE_HISTORY',
226
-          ),
227
-          1 => '',
226
+            ),
227
+            1 => '',
228
+        ),
228 229
         ),
229
-      ),
230
-      'LBL_PANEL_ASSIGNMENT' =>
231
-      array (
230
+        'LBL_PANEL_ASSIGNMENT' =>
231
+        array (
232 232
         0 => 
233 233
         array (
234
-          0 => 
235
-          array (
234
+            0 => 
235
+            array (
236 236
             'name' => 'date_entered',
237 237
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}&nbsp;',
238 238
             'label' => 'LBL_DATE_ENTERED',
239
-          ),
240
-          1 => 
241
-          array (
239
+            ),
240
+            1 => 
241
+            array (
242 242
             'name' => 'date_modified',
243 243
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}&nbsp;',
244 244
             'label' => 'LBL_DATE_MODIFIED',
245
-          ),
245
+            ),
246 246
         ),
247
-      ),
247
+        ),
248
+    ),
248 249
     ),
249
-  ),
250 250
 );
251 251
 ?>
Please login to merge, or discard this patch.
modules/Calls/metadata/quickcreatedefs.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -39,117 +39,117 @@  discard block
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Calls'] =
41 41
 array (
42
-  'QuickCreate' =>
43
-  array (
42
+    'QuickCreate' =>
43
+    array (
44 44
     'templateMeta' =>
45 45
     array (
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49
-      'maxColumns' => '2',
50
-      'form' =>
51
-      array (
49
+        'maxColumns' => '2',
50
+        'form' =>
51
+        array (
52 52
         'hidden' =>
53 53
         array (
54
-          0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
-          1 => '<input type="hidden" name="send_invites">',
56
-          2 => '<input type="hidden" name="user_invitees">',
57
-          3 => '<input type="hidden" name="lead_invitees">',
58
-          4 => '<input type="hidden" name="contact_invitees">',
54
+            0 => '<input type="hidden" name="isSaveAndNew" value="false">',
55
+            1 => '<input type="hidden" name="send_invites">',
56
+            2 => '<input type="hidden" name="user_invitees">',
57
+            3 => '<input type="hidden" name="lead_invitees">',
58
+            4 => '<input type="hidden" name="contact_invitees">',
59 59
         ),
60 60
         'buttons' =>
61 61
         array (
62
-          0 =>
63
-          array (
62
+            0 =>
63
+            array (
64 64
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.calls.fill_invitees();this.form.action.value=\'Save\'; this.form.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}this.form.return_id.value=\'\'; {/if}return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
65
-          ),
66
-          1 => 'CANCEL',
67
-          2 =>
68
-          array (
65
+            ),
66
+            1 => 'CANCEL',
67
+            2 =>
68
+            array (
69 69
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.calls.fill_invitees();this.form.action.value=\'Save\';this.form.return_action.value=\'EditView\';this.form.return_module.value=\'{$smarty.request.return_module}\';return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
70
-          ),
71
-          3 =>
72
-          array (
70
+            ),
71
+            3 =>
72
+            array (
73 73
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" class="button" onclick="SUGAR.calls.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Calls\'; this.form.isDuplicate.value=true; this.form.isSaveAndNew.value=true; this.form.return_action.value=\'EditView\'; this.form.return_id.value=\'{$fields.id.value}\'; return check_form(\'EditView\') && isValidDuration();" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
74
-          ),
74
+            ),
75
+        ),
75 76
         ),
76
-      ),
77
-      'widths' =>
78
-      array (
77
+        'widths' =>
78
+        array (
79 79
         0 =>
80 80
         array (
81
-          'label' => '10',
82
-          'field' => '30',
81
+            'label' => '10',
82
+            'field' => '30',
83 83
         ),
84 84
         1 =>
85 85
         array (
86
-          'label' => '10',
87
-          'field' => '30',
86
+            'label' => '10',
87
+            'field' => '30',
88
+        ),
88 89
         ),
89
-      ),
90
-      'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>'.
90
+        'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>'.
91 91
                 '{sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}' .
92 92
                 '<script>toggle_portal_flag();function toggle_portal_flag()  {literal} { {/literal} {$TOGGLE_JS} {literal} } {/literal} </script>',
93 93
 
94
-      'useTabs' => false,
94
+        'useTabs' => false,
95 95
     ),
96 96
     'panels' =>
97 97
     array (
98
-      'default' =>
99
-      array (
98
+        'default' =>
100 99
         array (
101
-          array (
100
+        array (
101
+            array (
102 102
             'name' => 'name',
103 103
             'displayParams' =>
104 104
             array (
105
-              'required' => true,
105
+                'required' => true,
106
+            ),
106 107
             ),
107
-          ),
108
-          array (
108
+            array (
109 109
             'name' => 'status',
110 110
             'displayParams' =>
111 111
             array (
112
-              'required' => true,
112
+                'required' => true,
113 113
             ),
114 114
             'fields' =>
115 115
             array (
116
-              array (
116
+                array (
117 117
                 'name' => 'direction',
118
-              ),
119
-              array (
118
+                ),
119
+                array (
120 120
                 'name' => 'status',
121
-              ),
121
+                ),
122
+            ),
122 123
             ),
123
-          ),
124 124
         ),
125 125
 
126 126
         array (
127
-          array (
127
+            array (
128 128
             'name' => 'date_start',
129 129
             'type' => 'datetimecombo',
130 130
             'displayParams' =>
131 131
             array (
132
-              'required' => true,
133
-              'updateCallback' => 'SugarWidgetScheduler.update_time();',
132
+                'required' => true,
133
+                'updateCallback' => 'SugarWidgetScheduler.update_time();',
134 134
             ),
135 135
             'label' => 'LBL_DATE_TIME',
136
-          ),
137
-          array (
136
+            ),
137
+            array (
138 138
             'name' => 'parent_name',
139 139
             'label' => 'LBL_LIST_RELATED_TO',
140
-          ),
140
+            ),
141 141
         ),
142 142
 
143 143
         array (
144
-          array (
144
+            array (
145 145
             'name' => 'duration_hours',
146 146
             'label' => 'LBL_DURATION',
147 147
             'customCode' => '{literal}<script type="text/javascript">function isValidDuration() { form = document.getElementById(\'EditView\'); if ( form.duration_hours.value + form.duration_minutes.value <= 0 ) { alert(\'{/literal}{$MOD.NOTICE_DURATION_TIME}{literal}\'); return false; } return true; }</script>{/literal}<input id="duration_hours" name="duration_hours" tabindex="1" size="2" maxlength="2" type="text" value="{$fields.duration_hours.value}" onkeyup="SugarWidgetScheduler.update_time();"/>{$fields.duration_minutes.value}&nbsp;<span class="dateFormat">{$MOD.LBL_HOURS_MINUTES}',
148 148
             'displayParams' =>
149 149
             array (
150
-              'required' => true,
150
+                'required' => true,
151
+            ),
151 152
             ),
152
-          ),
153 153
 //          array(
154 154
 //            'name' => 'reminder_time',
155 155
 //            'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
@@ -164,21 +164,21 @@  discard block
 block discarded – undo
164 164
         ),
165 165
 
166 166
         array (
167
-          array (
167
+            array (
168 168
             'name' => 'assigned_user_name',
169 169
             'label' => 'LBL_ASSIGNED_TO_NAME',
170
-          ),
170
+            ),
171 171
         ),
172 172
 
173 173
         array (
174
-          array (
174
+            array (
175 175
             'name' => 'description',
176 176
             'comment' => 'Full text of the note',
177 177
             'label' => 'LBL_DESCRIPTION',
178
-          ),
178
+            ),
179
+        ),
179 180
         ),
180
-      ),
181 181
     ),
182
-  ),
182
+    ),
183 183
 );
184 184
 ?>
Please login to merge, or discard this patch.