Passed
Push — scrutinizer-code-quality ( eedb15...27193c )
by Adam
54:15 queued 15s
created
modules/Meetings/metadata/detailviewdefs.php 1 patch
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -39,56 +39,56 @@  discard block
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Meetings'] = 
41 41
 array (
42
-  'DetailView' => 
43
-  array (
42
+    'DetailView' => 
43
+    array (
44 44
     'templateMeta' => 
45 45
     array (
46 46
         'includes' => array(
47 47
             array('file' => 'modules/Reminders/Reminders.js'),
48 48
         ),
49
-      'form' => 
50
-      array (
49
+        'form' => 
50
+        array (
51 51
         'buttons' => 
52 52
         array (
53
-          0 => 'EDIT',
54
-          1 => 'DUPLICATE',
55
-          2 => 'DELETE',
56
-          3 => 
57
-          array (
53
+            0 => 'EDIT',
54
+            1 => 'DUPLICATE',
55
+            2 => 'DELETE',
56
+            3 => 
57
+            array (
58 58
             '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=\'Meetings\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true;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}',
59
-              //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
60
-              'sugar_html' => array(
61
-                  'type' => 'submit',
62
-                  'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
63
-                  'htmlOptions' => array(
64
-                      'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
65
-                      'name' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
66
-                      'class' => 'button',
67
-                      'id' => 'close_create_button',
68
-                      'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Meetings\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true;this.form.return_id.value=\'{$fields.id.value}\';',
59
+                //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
60
+                'sugar_html' => array(
61
+                    'type' => 'submit',
62
+                    'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
63
+                    'htmlOptions' => array(
64
+                        'title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
65
+                        'name' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}',
66
+                        'class' => 'button',
67
+                        'id' => 'close_create_button',
68
+                        'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Meetings\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true;this.form.return_id.value=\'{$fields.id.value}\';',
69 69
 
70
-                  ),
71
-                  'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
72
-              ),
73
-          ),
74
-          4 => 
75
-          array (
70
+                    ),
71
+                    'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
72
+                ),
73
+            ),
74
+            4 => 
75
+            array (
76 76
             '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=\'Meetings\';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}',
77
-              //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
78
-              'sugar_html' => array(
79
-                  'type' => 'submit',
80
-                  'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
81
-                  'htmlOptions' => array(
82
-                      'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
83
-                      'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}',
84
-                      'class' => 'button',
85
-                      'onclick' => 'this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Meetings\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';',
86
-                      'name' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
87
-                      'id' => 'close_button',
88
-                  ),
89
-                  'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
90
-              ),
91
-          ),
77
+                //Bug#51778: The custom code will be replaced with sugar_html. customCode will be deplicated.
78
+                'sugar_html' => array(
79
+                    'type' => 'submit',
80
+                    'value' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
81
+                    'htmlOptions' => array(
82
+                        'title' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
83
+                        'accesskey' => '{$APP.LBL_CLOSE_BUTTON_KEY}',
84
+                        'class' => 'button',
85
+                        'onclick' => 'this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Meetings\';this.form.isSave.value=true;this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\';',
86
+                        'name' => '{$APP.LBL_CLOSE_BUTTON_TITLE}',
87
+                        'id' => 'close_button',
88
+                    ),
89
+                    'template' => '{if $fields.status.value != "Held" && $bean->aclAccess("edit")}[CONTENT]{/if}',
90
+                ),
91
+            ),
92 92
         ),
93 93
         'hidden' => array(
94 94
             '<input type="hidden" name="isSaveAndNew">',
@@ -97,50 +97,50 @@  discard block
 block discarded – undo
97 97
             '<input type="hidden" name="isSave">',
98 98
         ),
99 99
         'headerTpl' => 'modules/Meetings/tpls/detailHeader.tpl',
100
-      ),
101
-      'maxColumns' => '2',
102
-      'widths' => 
103
-      array (
100
+        ),
101
+        'maxColumns' => '2',
102
+        'widths' => 
103
+        array (
104 104
         0 => 
105 105
         array (
106
-          'label' => '10',
107
-          'field' => '30',
106
+            'label' => '10',
107
+            'field' => '30',
108 108
         ),
109 109
         1 => 
110 110
         array (
111
-          'label' => '10',
112
-          'field' => '30',
111
+            'label' => '10',
112
+            'field' => '30',
113
+        ),
113 114
         ),
114
-      ),
115
-      'useTabs' => false,
115
+        'useTabs' => false,
116 116
     ),
117 117
     'panels' => 
118 118
     array (
119
-      'lbl_meeting_information' => 
120
-      array (
119
+        'lbl_meeting_information' => 
120
+        array (
121 121
         array (
122
-          array (
122
+            array (
123 123
             'name' => 'name',
124 124
             'label' => 'LBL_SUBJECT',
125
-          ),
126
-          'status',
125
+            ),
126
+            'status',
127 127
         ),
128 128
         array (
129
-          array (
129
+            array (
130 130
             'name' => 'date_start',
131 131
             'label' => 'LBL_DATE_TIME',
132
-          ),
132
+            ),
133 133
         ),
134 134
         array (
135
-          array (
135
+            array (
136 136
             'name' => 'duration',
137 137
             'customCode' => '{$fields.duration_hours.value}{$MOD.LBL_HOURS_ABBREV} {$fields.duration_minutes.value}{$MOD.LBL_MINSS_ABBREV} ',
138 138
             'label' => 'LBL_DURATION',
139
-          ),
140
-          array (
139
+            ),
140
+            array (
141 141
             'name' => 'parent_name',
142 142
             'customLabel' => '{sugar_translate label=\'LBL_MODULE_NAME\' module=$fields.parent_type.value}',
143
-          ),
143
+            ),
144 144
         ),
145 145
         array (
146 146
 //          array(
@@ -148,38 +148,38 @@  discard block
 block discarded – undo
148 148
 //            'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
149 149
 //            'label' => 'LBL_REMINDER',
150 150
 //            ),
151
-          array(
151
+            array(
152 152
             'name' => 'reminders',
153 153
             'label' => 'LBL_REMINDERS',
154 154
             ),
155
-          'location',
155
+            'location',
156 156
         ),
157 157
         array (
158
-          'description',
158
+            'description',
159
+        ),
159 160
         ),
160
-      ),
161
-      'LBL_PANEL_ASSIGNMENT' => 
162
-      array (
161
+        'LBL_PANEL_ASSIGNMENT' => 
163 162
         array (
164
-          array (
163
+        array (
164
+            array (
165 165
             'name' => 'assigned_user_name',
166 166
             'label' => 'LBL_ASSIGNED_TO',
167
-          ),
168
-          array (
167
+            ),
168
+            array (
169 169
             'name' => 'date_modified',
170 170
             'label' => 'LBL_DATE_MODIFIED',
171 171
             'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
172
-          ),
172
+            ),
173 173
 
174 174
         ),
175 175
         array (
176
-          array (
176
+            array (
177 177
             'name' => 'date_entered',
178 178
             'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
179
-          ),
179
+            ),
180 180
         ),
181
-      ),
181
+        ),
182
+    ),
182 183
     ),
183
-  ),
184 184
 );
185 185
 ?>
Please login to merge, or discard this patch.
modules/Meetings/metadata/quickcreatedefs.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -39,119 +39,119 @@  discard block
 block discarded – undo
39 39
 
40 40
 $viewdefs ['Meetings'] =
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
-           '<input type="hidden" name="isSaveAndNew" value="false">',
55
-           '<input type="hidden" name="is_ajax_call" value="1">',
54
+            '<input type="hidden" name="isSaveAndNew" value="false">',
55
+            '<input type="hidden" name="is_ajax_call" value="1">',
56 56
         ),
57 57
         'buttons' =>
58 58
         array (
59 59
 
60
-          array (
60
+            array (
61 61
             'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.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\');" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
62
-          ),
63
-           'CANCEL',
62
+            ),
63
+            'CANCEL',
64 64
 
65
-          array (
65
+            array (
66 66
             'customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" class="button" onclick="this.form.send_invites.value=\'1\';SUGAR.meetings.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\');" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">',
67
-          ),
67
+            ),
68 68
 
69
-          array (
69
+            array (
70 70
             'customCode' => '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" accessKey="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_KEY}" class="button" onclick="SUGAR.meetings.fill_invitees(); this.form.status.value=\'Held\'; this.form.action.value=\'Save\'; this.form.return_module.value=\'Meetings\'; 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\');" type="submit" name="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_LABEL}">{/if}',
71
-          ),
71
+            ),
72
+        ),
72 73
         ),
73
-      ),
74
-      'widths' =>
75
-      array (
74
+        'widths' =>
75
+        array (
76 76
 
77 77
         array (
78
-          'label' => '10',
79
-          'field' => '30',
78
+            'label' => '10',
79
+            'field' => '30',
80 80
         ),
81 81
 
82 82
         array (
83
-          'label' => '10',
84
-          'field' => '30',
83
+            'label' => '10',
84
+            'field' => '30',
85
+        ),
85 86
         ),
86
-      ),
87
-      'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
87
+        'javascript' => '<script type="text/javascript">{$JSON_CONFIG_JAVASCRIPT}</script>
88 88
 {sugar_getscript file="cache/include/javascript/sugar_grp_jsolait.js"}
89 89
 <script>toggle_portal_flag();function toggle_portal_flag()  {literal} { {/literal} {$TOGGLE_JS} {literal} } {/literal} </script>',
90
-      'useTabs' => false,
90
+        'useTabs' => false,
91 91
     ),
92 92
     'panels' =>
93 93
     array (
94
-      'default' =>
95
-      array (
94
+        'default' =>
95
+        array (
96 96
 
97 97
         array (
98 98
 
99
-          array (
99
+            array (
100 100
             'name' => 'name',
101 101
             'displayParams' =>
102 102
             array (
103
-              'required' => true,
103
+                'required' => true,
104
+            ),
104 105
             ),
105
-          ),
106 106
 
107
-          array (
107
+            array (
108 108
             'name' => 'status',
109 109
             'fields' =>
110 110
             array (
111 111
 
112
-              array (
112
+                array (
113 113
                 'name' => 'status',
114
-              ),
114
+                ),
115
+            ),
115 116
             ),
116
-          ),
117 117
         ),
118 118
         array (
119 119
 
120
-          array (
120
+            array (
121 121
             'name' => 'date_start',
122 122
             'type' => 'datetimecombo',
123 123
             'displayParams' =>
124 124
             array (
125
-              'required' => true,
126
-              'updateCallback' => 'SugarWidgetScheduler.update_time();',
125
+                'required' => true,
126
+                'updateCallback' => 'SugarWidgetScheduler.update_time();',
127
+            ),
127 128
             ),
128
-          ),
129 129
 
130
-          array (
130
+            array (
131 131
             'name' => 'parent_name',
132 132
             'label' => 'LBL_LIST_RELATED_TO',
133
-          ),
133
+            ),
134 134
         ),
135 135
         
136 136
         array (
137
-          array (
137
+            array (
138 138
             'name' => 'date_end',
139 139
             'type' => 'datetimecombo',
140 140
             'displayParams' =>
141 141
             array (
142
-              'required' => true,
143
-              'updateCallback' => 'SugarWidgetScheduler.update_time();',
142
+                'required' => true,
143
+                'updateCallback' => 'SugarWidgetScheduler.update_time();',
144 144
             ),
145
-          ),
146
-          array (
145
+            ),
146
+            array (
147 147
             'name' => 'location',
148 148
             'comment' => 'Meeting location',
149 149
             'label' => 'LBL_LOCATION',
150
-          ),
150
+            ),
151 151
         ),
152 152
         
153 153
         array(        
154
-          array (
154
+            array (
155 155
             'name' => 'duration',
156 156
             'customCode' => '
157 157
                 @@FIELD@@
@@ -168,37 +168,37 @@  discard block
 block discarded – undo
168 168
                     {/literal}
169 169
                 </script>            
170 170
             ',
171
-          ),          
171
+            ),          
172 172
 //          array (
173 173
 //            'name' => 'reminder_time',
174 174
 //            'customCode' => '{include file="modules/Meetings/tpls/reminders.tpl"}',
175 175
 //            'label' => 'LBL_REMINDER',
176 176
 //          ),
177
-              array (
178
-                  'name' => 'reminders',
179
-                  'customCode' => '{include file="modules/Reminders/tpls/reminders.tpl"}',
180
-                  'label' => 'LBL_REMINDERS',
181
-              ),
182
-       ),
183
-
184
-         array (
185
-         	 array (
177
+                array (
178
+                    'name' => 'reminders',
179
+                    'customCode' => '{include file="modules/Reminders/tpls/reminders.tpl"}',
180
+                    'label' => 'LBL_REMINDERS',
181
+                ),
182
+        ),
183
+
184
+            array (
185
+                array (
186 186
             'name' => 'assigned_user_name',
187 187
             'label' => 'LBL_ASSIGNED_TO_NAME',
188
-          ),
188
+            ),
189 189
 
190 190
         ),
191 191
 
192 192
         array (
193 193
 
194
-          array (
194
+            array (
195 195
             'name' => 'description',
196 196
             'comment' => 'Full text of the note',
197 197
             'label' => 'LBL_DESCRIPTION',
198
-          ),
198
+            ),
199 199
         ),
200
-      ),
200
+        ),
201
+    ),
201 202
     ),
202
-  ),
203 203
 );
204 204
 ?>
Please login to merge, or discard this patch.
modules/Meetings/metadata/listviewdefs.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 $listViewDefs ['Meetings'] = 
41 41
 array (
42
-  'SET_COMPLETE' => 
43
-  array (
42
+    'SET_COMPLETE' => 
43
+    array (
44 44
     'width' => '1%',
45 45
     'label' => 'LBL_LIST_CLOSE',
46 46
     'link' => true,
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
     'default' => true,
49 49
     'related_fields' => 
50 50
     array (
51
-      0 => 'status',
51
+        0 => 'status',
52
+    ),
52 53
     ),
53
-  ),
54
-  'NAME' => 
55
-  array (
54
+    'NAME' => 
55
+    array (
56 56
     'width' => '40%',
57 57
     'label' => 'LBL_LIST_SUBJECT',
58 58
     'link' => true,
59 59
     'default' => true,
60
-  ),
61
-  'CONTACT_NAME' => 
62
-  array (
60
+    ),
61
+    'CONTACT_NAME' => 
62
+    array (
63 63
     'width' => '20%',
64 64
     'label' => 'LBL_LIST_CONTACT',
65 65
     'link' => true,
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     'module' => 'Contacts',
68 68
     'default' => true,
69 69
     'ACLTag' => 'CONTACT',
70
-  ),
71
-  'PARENT_NAME' => 
72
-  array (
70
+    ),
71
+    'PARENT_NAME' => 
72
+    array (
73 73
     'width' => '20%',
74 74
     'label' => 'LBL_LIST_RELATED_TO',
75 75
     'dynamic_module' => 'PARENT_TYPE',
@@ -80,47 +80,47 @@  discard block
 block discarded – undo
80 80
     'ACLTag' => 'PARENT',
81 81
     'related_fields' => 
82 82
     array (
83
-      0 => 'parent_id',
84
-      1 => 'parent_type',
83
+        0 => 'parent_id',
84
+        1 => 'parent_type',
85 85
     ),
86
-  ),
87
-  'DATE_START' => 
88
-  array (
86
+    ),
87
+    'DATE_START' => 
88
+    array (
89 89
     'width' => '15%',
90 90
     'label' => 'LBL_LIST_DATE',
91 91
     'link' => false,
92 92
     'default' => true,
93 93
     'related_fields' => 
94 94
     array (
95
-      0 => 'time_start',
95
+        0 => 'time_start',
96 96
     ),
97
-  ),
98
-  'ASSIGNED_USER_NAME' => 
99
-  array (
97
+    ),
98
+    'ASSIGNED_USER_NAME' => 
99
+    array (
100 100
     'width' => '2%',
101 101
     'label' => 'LBL_LIST_ASSIGNED_TO_NAME',
102 102
     'module' => 'Employees',
103 103
     'id' => 'ASSIGNED_USER_ID',
104 104
     'default' => true,
105
-  ),
106
-  'DIRECTION' => 
107
-  array (
105
+    ),
106
+    'DIRECTION' => 
107
+    array (
108 108
     'type' => 'enum',
109 109
     'label' => 'LBL_LIST_DIRECTION',
110 110
     'width' => '10%',
111 111
     'default' => false,
112
-  ),
113
-  'STATUS' => 
114
-  array (
112
+    ),
113
+    'STATUS' => 
114
+    array (
115 115
     'width' => '10%',
116 116
     'label' => 'LBL_LIST_STATUS',
117 117
     'link' => false,
118 118
     'default' => false,
119
-  ),
120
-  'DATE_ENTERED' => array (
121
-	'width' => '10%',
122
-	'label' => 'LBL_DATE_ENTERED',
123
-	'default' => true
124
-  ),  
119
+    ),
120
+    'DATE_ENTERED' => array (
121
+    'width' => '10%',
122
+    'label' => 'LBL_DATE_ENTERED',
123
+    'default' => true
124
+    ),  
125 125
 );
126 126
 ?>
Please login to merge, or discard this patch.
modules/Meetings/views/view.edit.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -44,45 +44,45 @@
 block discarded – undo
44 44
 
45 45
 class MeetingsViewEdit extends ViewEdit
46 46
 {
47
- 	/**
48
- 	 * @see SugarView::preDisplay()
49
- 	 *
50
- 	 * Override preDisplay to check for presence of 'status' in $_REQUEST
51
- 	 * This is to support the "Close And Create New" operation.
52
- 	 */
53
- 	public function preDisplay()
54
- 	{
55
- 		if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) {
56
-	       $this->bean->status = 'Held';
57
- 		}
47
+        /**
48
+         * @see SugarView::preDisplay()
49
+         *
50
+         * Override preDisplay to check for presence of 'status' in $_REQUEST
51
+         * This is to support the "Close And Create New" operation.
52
+         */
53
+        public function preDisplay()
54
+        {
55
+            if(!empty($_REQUEST['status']) && ($_REQUEST['status'] == 'Held')) {
56
+            $this->bean->status = 'Held';
57
+            }
58 58
 
59
- 		parent::preDisplay();
60
- 	}
59
+            parent::preDisplay();
60
+        }
61 61
 
62
- 	/**
63
- 	 * @see SugarView::display()
64
- 	 */
65
- 	public function display()
66
- 	{
67
- 		global $json;
62
+        /**
63
+         * @see SugarView::display()
64
+         */
65
+        public function display()
66
+        {
67
+            global $json;
68 68
         $json = getJSONobj();
69 69
         $json_config = new json_config();
70
-		if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) {
71
-			$javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->json_id);
72
-		} else {
73
-			$this->bean->json_id = $this->bean->id;
74
-			$javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->id);
75
-		}
76
- 		$this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
77
- 		if($this->ev->isDuplicate){
78
-	        $this->bean->status = $this->bean->getDefaultStatus();
79
- 		} //if
70
+        if (isset($this->bean->json_id) && !empty ($this->bean->json_id)) {
71
+            $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->json_id);
72
+        } else {
73
+            $this->bean->json_id = $this->bean->id;
74
+            $javascript = $json_config->get_static_json_server(false, true, 'Meetings', $this->bean->id);
75
+        }
76
+            $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
77
+            if($this->ev->isDuplicate){
78
+            $this->bean->status = $this->bean->getDefaultStatus();
79
+            } //if
80 80
 
81
-		$this->ss->assign('remindersData', Reminder::loadRemindersData('Meetings', $this->bean->id, $this->ev->isDuplicate));
82
-		$this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Meetings', $this->bean->id, $this->ev->isDuplicate));
83
-		$this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson());
84
-		$this->ss->assign('remindersDisabled', json_encode(false));
81
+        $this->ss->assign('remindersData', Reminder::loadRemindersData('Meetings', $this->bean->id, $this->ev->isDuplicate));
82
+        $this->ss->assign('remindersDataJson', Reminder::loadRemindersDataJson('Meetings', $this->bean->id, $this->ev->isDuplicate));
83
+        $this->ss->assign('remindersDefaultValuesDataJson', Reminder::loadRemindersDefaultValuesDataJson());
84
+        $this->ss->assign('remindersDisabled', json_encode(false));
85 85
 
86
- 		parent::display();
87
- 	}
86
+            parent::display();
87
+        }
88 88
 }
Please login to merge, or discard this patch.
modules/ModuleBuilder/action_view_map.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -43,28 +43,28 @@
 block discarded – undo
43 43
  * To change the template for this generated file go to
44 44
  * Window - Preferences - PHPeclipse - PHP - Code Templates
45 45
  */
46
- //format '<action_name>' => '<view_name>',
47
- $action_view_map = array(
48
- 						'index' => 'main',
49
- 						'module'=>'module',
50
- 						'modulefields'=>'modulefields',
51
- 						'modulelabels'=>'modulelabels',
52
- 						'relationships'=>'relationships',
53
- 						'relationship'=>'relationship',
46
+    //format '<action_name>' => '<view_name>',
47
+    $action_view_map = array(
48
+                            'index' => 'main',
49
+                            'module'=>'module',
50
+                            'modulefields'=>'modulefields',
51
+                            'modulelabels'=>'modulelabels',
52
+                            'relationships'=>'relationships',
53
+                            'relationship'=>'relationship',
54 54
                         'resetmodule'=>'resetmodule',
55
- 						'modulefield'=>'modulefield',
56
- 						'displaydeploy'=>'displaydeploy',
57
- 						'package'=>'package',
58
- 						'dropdown'=>'dropdown',
59
- 						'dropdowns'=>'dropdowns',
60
- 						'detailview' => 'detail',
61
- 						'editview' => 'edit',
62
- 						'popup' => 'popup',
63
- 						'home'=>'home',
55
+                            'modulefield'=>'modulefield',
56
+                            'displaydeploy'=>'displaydeploy',
57
+                            'package'=>'package',
58
+                            'dropdown'=>'dropdown',
59
+                            'dropdowns'=>'dropdowns',
60
+                            'detailview' => 'detail',
61
+                            'editview' => 'edit',
62
+                            'popup' => 'popup',
63
+                            'home'=>'home',
64 64
                         'visibilityeditor' => 'visibilityeditor',
65
- 						'exportcustomizations'=>'exportcustomizations',
65
+                            'exportcustomizations'=>'exportcustomizations',
66 66
 
67
- 					);
67
+                        );
68 68
     // add those we need from the global action_view_map
69 69
     $action_view_map['dc'] = 'dc';
70 70
     $action_view_map['dcajax'] = 'dcajax';
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.module.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -41,36 +41,36 @@  discard block
 block discarded – undo
41 41
 
42 42
 class ViewModule extends SugarView
43 43
 {
44
-	var $mbModule;
44
+    var $mbModule;
45 45
 	
46
- 	/**
47
-	 * @see SugarView::_getModuleTitleParams()
48
-	 */
49
-	protected function _getModuleTitleParams($browserTitle = false)
50
-	{
51
-	    global $mod_strings;
46
+        /**
47
+         * @see SugarView::_getModuleTitleParams()
48
+         */
49
+    protected function _getModuleTitleParams($browserTitle = false)
50
+    {
51
+        global $mod_strings;
52 52
 	    
53
-    	return array(
54
-    	   translate('LBL_MODULE_NAME','Administration'),
55
-    	   ModuleBuilderController::getModuleTitle(),
56
-    	   );
53
+        return array(
54
+            translate('LBL_MODULE_NAME','Administration'),
55
+            ModuleBuilderController::getModuleTitle(),
56
+            );
57 57
     }
58 58
 
59
-	function display()
60
-	{
61
-		global $mod_strings;
62
- 		$smarty = new Sugar_Smarty();
59
+    function display()
60
+    {
61
+        global $mod_strings;
62
+            $smarty = new Sugar_Smarty();
63 63
 
64
-		require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
65
-		$mb = new ModuleBuilder();
66
-		$mb->getPackage($_REQUEST['view_package']);
67
-		$package = $mb->packages[$_REQUEST['view_package']];
68
-		$module_name = (!empty($_REQUEST['view_module']))?$_REQUEST['view_module']:'';
69
-		$package->getModule($module_name);
70
-		$this->mbModule = $package->modules[$module_name];
71
-		$this->loadPackageHelp($module_name);
64
+        require_once('modules/ModuleBuilder/MB/ModuleBuilder.php');
65
+        $mb = new ModuleBuilder();
66
+        $mb->getPackage($_REQUEST['view_package']);
67
+        $package = $mb->packages[$_REQUEST['view_package']];
68
+        $module_name = (!empty($_REQUEST['view_module']))?$_REQUEST['view_module']:'';
69
+        $package->getModule($module_name);
70
+        $this->mbModule = $package->modules[$module_name];
71
+        $this->loadPackageHelp($module_name);
72 72
 		
73
-		// set up the list of either available types for a new module, or implemented types for an existing one
73
+        // set up the list of either available types for a new module, or implemented types for an existing one
74 74
         $types = (empty($module_name)) ? MBModule::getTypes() : $this->mbModule->mbvardefs->templates ;
75 75
         
76 76
         foreach( $types as $type=>$definition)
@@ -80,28 +80,28 @@  discard block
 block discarded – undo
80 80
         natcasesort($translated_type);
81 81
         $smarty->assign('types',$translated_type);
82 82
 		
83
-		$smarty->assign('package', $package);
84
-		$smarty->assign('module', $this->mbModule);
85
-		$smarty->assign('mod_strings', $mod_strings);
83
+        $smarty->assign('package', $package);
84
+        $smarty->assign('module', $this->mbModule);
85
+        $smarty->assign('mod_strings', $mod_strings);
86 86
 
87
-		$ajax = new AjaxCompose();
88
-		$ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
89
-		$ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")');
90
-		if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
91
-		$ajax->addCrumb($module_name, '');
92
-		$html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl');
93
-		if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule')
94
-			$html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
95
-		$ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html);
87
+        $ajax = new AjaxCompose();
88
+        $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
89
+        $ajax->addCrumb(' '. $package->name,'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package='.$package->name.'")');
90
+        if(empty($module_name))$module_name = translate('LBL_NEW_MODULE', 'ModuleBuilder');
91
+        $ajax->addCrumb($module_name, '');
92
+        $html=$smarty->fetch('modules/ModuleBuilder/tpls/MBModule/module.tpl');
93
+        if(!empty($_REQUEST['action']) && $_REQUEST['action']=='SaveModule')
94
+            $html .="<script>ModuleBuilder.treeRefresh('ModuleBuilder')</script>";
95
+        $ajax->addSection('center', translate('LBL_SECTION_MODULE', 'ModuleBuilder'), $html);
96 96
 		
97
-		echo $ajax->getJavascript();
98
- 	}
97
+        echo $ajax->getJavascript();
98
+        }
99 99
  	
100
- 	function loadPackageHelp(
101
- 	    $name
102
- 	    )
103
- 	{
100
+        function loadPackageHelp(
101
+            $name
102
+            )
103
+        {
104 104
         $this->mbModule->help['default'] = (empty($name))?'create':'modify';
105 105
         $this->mbModule->help['group'] = 'module';
106
- 	}
106
+        }
107 107
 }
108 108
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.searchview.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -48,88 +48,88 @@
 block discarded – undo
48 48
 
49 49
 class ViewSearchView extends ViewListView
50 50
 {
51
- 	function __construct()
52
- 	{
53
- 		parent::__construct();
54
- 		if (!empty($_REQUEST['searchlayout'])) {
55
- 			$this->editLayout = $_REQUEST['searchlayout'];
56
- 		}
57
- 	}
51
+        function __construct()
52
+        {
53
+            parent::__construct();
54
+            if (!empty($_REQUEST['searchlayout'])) {
55
+                $this->editLayout = $_REQUEST['searchlayout'];
56
+            }
57
+        }
58 58
  	
59
- 	/**
60
-	 * @see SugarView::_getModuleTitleParams()
61
-	 */
62
-	protected function _getModuleTitleParams($browserTitle = false)
63
-	{
64
-	    global $mod_strings;
59
+        /**
60
+         * @see SugarView::_getModuleTitleParams()
61
+         */
62
+    protected function _getModuleTitleParams($browserTitle = false)
63
+    {
64
+        global $mod_strings;
65 65
 	    
66
-    	return array(
67
-    	   translate('LBL_MODULE_NAME','Administration'),
68
-    	   ModuleBuilderController::getModuleTitle(),
69
-    	   );
66
+        return array(
67
+            translate('LBL_MODULE_NAME','Administration'),
68
+            ModuleBuilderController::getModuleTitle(),
69
+            );
70 70
     }
71 71
 
72
- 	// DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module
73
- 	function preDisplay()
74
- 	{
75
- 	}
72
+        // DO NOT REMOVE - overrides parent ViewEdit preDisplay() which attempts to load a bean for a non-existent module
73
+        function preDisplay()
74
+        {
75
+        }
76 76
 
77
- 	function display(
78
- 	    $preview = false
79
- 	    )
80
- 	{
81
- 		$packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ;
82
- 		require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ;
83
- 		$parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ;
77
+        function display(
78
+            $preview = false
79
+            )
80
+        {
81
+            $packageName = (isset ( $_REQUEST [ 'view_package' ] )) ? $_REQUEST [ 'view_package' ] : '' ;
82
+            require_once 'modules/ModuleBuilder/parsers/ParserFactory.php' ;
83
+            $parser = ParserFactory::getParser ( $this->editLayout , $this->editModule, $packageName ) ;
84 84
 
85
- 		$smarty = parent::constructSmarty ( $parser ) ;
86
- 		$smarty->assign ( 'action', 'searchViewSave' ) ;
87
- 		$smarty->assign ( 'view', $this->editLayout ) ;
88
- 		$smarty->assign ( 'helpName', 'searchViewEditor' ) ;
89
- 		$smarty->assign ( 'helpDefault', 'modify' ) ;
85
+            $smarty = parent::constructSmarty ( $parser ) ;
86
+            $smarty->assign ( 'action', 'searchViewSave' ) ;
87
+            $smarty->assign ( 'view', $this->editLayout ) ;
88
+            $smarty->assign ( 'helpName', 'searchViewEditor' ) ;
89
+            $smarty->assign ( 'helpDefault', 'modify' ) ;
90 90
 
91
- 		if ($preview)
92
- 		{
93
- 			echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ;
94
- 		} else
95
- 		{
96
- 			$ajax = $this->constructAjax () ;
97
- 			$ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ;
98
- 			echo $ajax->getJavascript () ;
99
- 		}
100
- 	}
91
+            if ($preview)
92
+            {
93
+                echo $smarty->fetch ( "modules/ModuleBuilder/tpls/Preview/listView.tpl" ) ;
94
+            } else
95
+            {
96
+                $ajax = $this->constructAjax () ;
97
+                $ajax->addSection ( 'center', translate ($this->title), $smarty->fetch ( "modules/ModuleBuilder/tpls/listView.tpl" ) ) ;
98
+                echo $ajax->getJavascript () ;
99
+            }
100
+        }
101 101
 
102
- 	function constructAjax()
103
- 	{
104
- 		require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ;
105
- 		$ajax = new AjaxCompose ( ) ;
106
- 		switch ( $this->editLayout )
107
- 		{
108
- 			default:
109
- 				$searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ;
110
- 		}
102
+        function constructAjax()
103
+        {
104
+            require_once ('modules/ModuleBuilder/MB/AjaxCompose.php') ;
105
+            $ajax = new AjaxCompose ( ) ;
106
+            switch ( $this->editLayout )
107
+            {
108
+                default:
109
+                 $searchLabel = 'LBL_' . strtoupper ( $this->editLayout) ;
110
+            }
111 111
 
112 112
         $layoutLabel = 'LBL_LAYOUTS' ;
113 113
         $layoutView = 'layouts' ;
114 114
 
115 115
 
116
- 		if ($this->fromModuleBuilder)
117
- 		{
118
- 			$ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ;
119
- 			$ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ;
120
- 			$ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")'  ) ;
121
- 			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")'  ) ;
122
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")'  ) ;
123
- 			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ;
124
- 		} else
125
- 		{
126
- 			$ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ;
127
- 			$ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")'  ) ;
128
- 			$ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")'  ) ;
129
- 			if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ;
130
- 			$ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), ''  ) ;
131
- 		}
132
- 		$this->title = $searchLabel;
133
- 		return $ajax ;
134
- 	}
116
+            if ($this->fromModuleBuilder)
117
+            {
118
+                $ajax->addCrumb ( translate ( 'LBL_MODULEBUILDER', 'ModuleBuilder' ), 'ModuleBuilder.main("mb")' ) ;
119
+                $ajax->addCrumb ( $_REQUEST [ 'view_package' ], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST [ 'view_package' ] . '")' ) ;
120
+                $ajax->addCrumb ( $this->editModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=module&view_package=' . $_REQUEST [ 'view_package' ] . "&view_module={$this->editModule}" . '")'  ) ;
121
+                $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view_module=' . $this->editModule. '&view_package=' . $_REQUEST['view_package'] . '")'  ) ;
122
+                if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&MB=true&action=wizard&view=search&view_module=' .$this->editModule . '&view_package=' . $_REQUEST [ 'view_package' ] . '")'  ) ;
123
+                $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), '' ) ;
124
+            } else
125
+            {
126
+                $ajax->addCrumb ( translate ( 'LBL_STUDIO', 'ModuleBuilder' ), 'ModuleBuilder.main("studio")' ) ;
127
+                $ajax->addCrumb ( $this->translatedEditModule, 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view_module=' . $this->editModule . '")'  ) ;
128
+                $ajax->addCrumb ( translate ( $layoutLabel, 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view='.$layoutView.'&view_module=' . $this->editModule . '")'  ) ;
129
+                if ( $layoutLabel == 'LBL_LAYOUTS' ) $ajax->addCrumb ( translate ( 'LBL_SEARCH_FORMS', 'ModuleBuilder' ), 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard&view=search&view_module=' .$this->editModule . '")' ) ;
130
+                $ajax->addCrumb ( translate ( $searchLabel, 'ModuleBuilder' ), ''  ) ;
131
+            }
132
+            $this->title = $searchLabel;
133
+            return $ajax ;
134
+        }
135 135
 }
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.exportcustomizations.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -40,40 +40,40 @@
 block discarded – undo
40 40
 require_once('modules/ModuleBuilder/MB/AjaxCompose.php');
41 41
 class ViewExportcustomizations extends SugarView
42 42
 {
43
-	/**
44
-	 * @see SugarView::_getModuleTitleParams()
45
-	 */
46
-	protected function _getModuleTitleParams($browserTitle = false)
47
-	{
48
-	    global $mod_strings;
43
+    /**
44
+     * @see SugarView::_getModuleTitleParams()
45
+     */
46
+    protected function _getModuleTitleParams($browserTitle = false)
47
+    {
48
+        global $mod_strings;
49 49
 	    
50
-    	return array(
51
-    	   translate('LBL_MODULE_NAME','Administration'),
52
-    	   ModuleBuilderController::getModuleTitle(),
53
-    	   );
50
+        return array(
51
+            translate('LBL_MODULE_NAME','Administration'),
52
+            ModuleBuilderController::getModuleTitle(),
53
+            );
54 54
     }
55 55
 
56
-	function display()
57
-	{
58
- 		global $current_user, $mod_strings;
59
- 		$smarty = new Sugar_Smarty();
60
- 		$mb = new MBPackage("packageCustom");
61
- 		$mod=$mb->getCustomModules();
62
- 		foreach($mod as $key => $value){
63
- 		    $modules[]=$key;
64
- 		    $custom[]=$value;
65
- 		}
66
- 		$nb_mod = count($modules);
67
- 		$smarty->assign('mod_strings', $mod_strings);
68
- 		$smarty->assign('modules', $mod);
69
- 		$smarty->assign('custom', $custom);
70
- 		$smarty->assign('nb_mod', $nb_mod);
71
- 		$smarty->assign('defaultHelp', 'exportHelp');
72
- 		$smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
73
- 		$smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
74
-		$ajax = new AjaxCompose();
75
-		$ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
76
-		$ajax->addSection('center', $mod_strings['LBL_EC_TITLE'],$smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
77
-		echo $ajax->getJavascript();
78
- 	}
56
+    function display()
57
+    {
58
+            global $current_user, $mod_strings;
59
+            $smarty = new Sugar_Smarty();
60
+            $mb = new MBPackage("packageCustom");
61
+            $mod=$mb->getCustomModules();
62
+            foreach($mod as $key => $value){
63
+                $modules[]=$key;
64
+                $custom[]=$value;
65
+            }
66
+            $nb_mod = count($modules);
67
+            $smarty->assign('mod_strings', $mod_strings);
68
+            $smarty->assign('modules', $mod);
69
+            $smarty->assign('custom', $custom);
70
+            $smarty->assign('nb_mod', $nb_mod);
71
+            $smarty->assign('defaultHelp', 'exportHelp');
72
+            $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
73
+            $smarty->assign('moduleList',$GLOBALS['app_list_strings']['moduleList']);  
74
+        $ajax = new AjaxCompose();
75
+        $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
76
+        $ajax->addSection('center', $mod_strings['LBL_EC_TITLE'],$smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
77
+        echo $ajax->getJavascript();
78
+        }
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
modules/ModuleBuilder/views/view.relationship.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@  discard block
 block discarded – undo
47 47
 class ViewRelationship extends SugarView
48 48
 {
49 49
     /**
50
-	 * @see SugarView::_getModuleTitleParams()
51
-	 */
52
-	protected function _getModuleTitleParams($browserTitle = false)
53
-	{
54
-	    global $mod_strings;
50
+     * @see SugarView::_getModuleTitleParams()
51
+     */
52
+    protected function _getModuleTitleParams($browserTitle = false)
53
+    {
54
+        global $mod_strings;
55 55
 	    
56
-    	return array(
57
-    	   translate('LBL_MODULE_NAME','Administration'),
58
-    	   ModuleBuilderController::getModuleTitle(),
59
-    	   );
56
+        return array(
57
+            translate('LBL_MODULE_NAME','Administration'),
58
+            ModuleBuilderController::getModuleTitle(),
59
+            );
60 60
     }
61 61
 
62 62
     function overrideDefinitionFromPOST(
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
         require_once 'modules/ModuleBuilder/parsers/relationships/AbstractRelationship.php' ;
67 67
         foreach ( AbstractRelationship::$definitionKeys as $key )
68 68
         {
69
-        	if(!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label')) ){
70
-        		continue;
71
-        	}
69
+            if(!empty($_REQUEST ['ajaxLoad']) && in_array($key, array('label', 'rhs_label', 'lhs_label')) ){
70
+                continue;
71
+            }
72 72
             if (! empty ( $_REQUEST [ $key ] ))
73 73
             {
74 74
                 $definition [ $key ] = $_REQUEST [ $key ] ;
@@ -92,15 +92,15 @@  discard block
 block discarded – undo
92 92
             $fields = $module->fields ;
93 93
             require_once 'modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php' ;
94 94
             $relatableModules = DeployedRelationships::findRelatableModules () ;
95
-        	$appStrings = return_app_list_strings_language( $selected_lang ) ;
96
-        	$modStrings = return_module_language( $selected_lang, $_REQUEST [ 'view_module' ], true ) ;
97
-        	$appStrings = $appStrings['moduleList'];
95
+            $appStrings = return_app_list_strings_language( $selected_lang ) ;
96
+            $modStrings = return_module_language( $selected_lang, $_REQUEST [ 'view_module' ], true ) ;
97
+            $appStrings = $appStrings['moduleList'];
98 98
         } else
99 99
         {
100 100
             $mb = new ModuleBuilder ( ) ;
101
-			$mb->getPackages();
102
-			//display the latest module name rather than what is in or not in the loaded app_list_strings.
103
-			$mb->getPackage($_REQUEST ['view_package'])->loadModuleTitles();
101
+            $mb->getPackages();
102
+            //display the latest module name rather than what is in or not in the loaded app_list_strings.
103
+            $mb->getPackage($_REQUEST ['view_package'])->loadModuleTitles();
104 104
             $module = $mb->getPackageModule ( $_REQUEST [ 'view_package' ], $_REQUEST [ 'view_module' ] ) ;
105 105
             $moduleName = empty($module->key_name) ? $module->getModuleName() : $module->key_name;
106 106
             $this->smarty->assign ( 'view_package', $_REQUEST [ 'view_package' ] ) ;
@@ -132,16 +132,16 @@  discard block
 block discarded – undo
132 132
             $relationship->setName($_REQUEST [ 'relationship_name' ] );
133 133
             $definition = $relationship->getDefinition();
134 134
             if (!$this->fromModuleBuilder){
135
-        		$modStrings = return_module_language( $selected_lang, $relationship->rhs_module, true ) ;
136
-	            $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module;
137
-	            $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ;
138
-	    		$definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ;
139
-			}else{
140
-				#30624
141
-				if(!empty($_REQUEST['rhs_module'])){
142
-					$definition['rhs_label'] = $_REQUEST['rhs_module'];
143
-				}
144
-			}
135
+                $modStrings = return_module_language( $selected_lang, $relationship->rhs_module, true ) ;
136
+                $definition['lhs_label'] = isset($modStrings[$relationship->getTitleKey()])?$modStrings[$relationship->getTitleKey()] : $relationship->lhs_module;
137
+                $modStrings = return_module_language( $selected_lang, $relationship->lhs_module, true ) ;
138
+                $definition['rhs_label'] = isset($modStrings[$relationship->getTitleKey(true)])?$modStrings[$relationship->getTitleKey(true)] : $relationship->rhs_module ;
139
+            }else{
140
+                #30624
141
+                if(!empty($_REQUEST['rhs_module'])){
142
+                    $definition['rhs_label'] = $_REQUEST['rhs_module'];
143
+                }
144
+            }
145 145
         } else
146 146
         {
147 147
             $definition = array ( ) ;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         
157 157
         if (empty($definition ['rhs_label']))
158 158
         {
159
-        	$definition ['rhs_label'] = translate($definition [ 'rhs_module' ]);
159
+            $definition ['rhs_label'] = translate($definition [ 'rhs_module' ]);
160 160
         }
161 161
         if (empty($definition ['lhs_label']))
162 162
         {
@@ -185,17 +185,17 @@  discard block
 block discarded – undo
185 185
             }
186 186
 
187 187
             if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Activities') {
188
-            	$cardinality = array( MB_ONETOMANY => translate ( 'LBL_ONETOMANY' ));
188
+                $cardinality = array( MB_ONETOMANY => translate ( 'LBL_ONETOMANY' ));
189 189
             }
190 190
             //Bug 23139, Campaigns module current cannot display custom subpanels, so we need to ban it from any
191 191
             //relationships that would require a new subpanel to be shown in Campaigns.
192
-        	if (isset ($definition['lhs_module']) && $definition['lhs_module'] == 'Campaigns') {
193
-            	unset ( $cardinality [ MB_MANYTOMANY ] ) ;
194
-            	unset ( $cardinality [ MB_ONETOMANY ] ) ;
192
+            if (isset ($definition['lhs_module']) && $definition['lhs_module'] == 'Campaigns') {
193
+                unset ( $cardinality [ MB_MANYTOMANY ] ) ;
194
+                unset ( $cardinality [ MB_ONETOMANY ] ) ;
195 195
             }
196
-        	if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [ MB_MANYTOMANY ])) {
197
-            	unset ( $cardinality [ MB_MANYTOMANY ] ) ;
198
-            	unset ( $cardinality [ MB_MANYTOONE ] );
196
+            if (isset ($definition['rhs_module']) && $definition['rhs_module'] == 'Campaigns' && isset($cardinality [ MB_MANYTOMANY ])) {
197
+                unset ( $cardinality [ MB_MANYTOMANY ] ) ;
198
+                unset ( $cardinality [ MB_MANYTOONE ] );
199 199
             }
200 200
             if (! isset($cardinality[$relationship->getType()]))
201 201
             {
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
             
207 207
             $this->smarty->assign ( 'is_new', true ) ;
208 208
         } else {
209
-        	$this->smarty->assign ( 'is_new', false ) ;
209
+            $this->smarty->assign ( 'is_new', false ) ;
210 210
         }
211 211
         
212 212
         //Remove Activities if one-to-many is not availible
213
-    	if (!isset($cardinality [ MB_ONETOMANY ]) && isset ($relatableModules['Activities'])) {
214
-        	unset ($relatableModules['Activities']);
213
+        if (!isset($cardinality [ MB_ONETOMANY ]) && isset ($relatableModules['Activities'])) {
214
+            unset ($relatableModules['Activities']);
215 215
         }
216 216
         
217 217
         
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $this->smarty->assign ( 'rhspanels', $rhs_subpanels ) ;
238 238
         $this->smarty->assign ( 'lhspanels', $lhs_subpanels ) ;
239 239
         $this->smarty->assign('selected_lang', $selected_lang);
240
-		$this->smarty->assign('available_languages',get_languages());
240
+        $this->smarty->assign('available_languages',get_languages());
241 241
         
242 242
         switch ( $relationship->relationship_type)
243 243
         {
Please login to merge, or discard this patch.