@@ -46,27 +46,27 @@ |
||
46 | 46 | |
47 | 47 | class SugarWidgetSubPanelActivitiesStatusField extends SugarWidgetField |
48 | 48 | { |
49 | - function displayList($layout_def) |
|
50 | - { |
|
51 | - global $current_language; |
|
52 | - $app_list_strings = return_app_list_strings_language($current_language); |
|
49 | + function displayList($layout_def) |
|
50 | + { |
|
51 | + global $current_language; |
|
52 | + $app_list_strings = return_app_list_strings_language($current_language); |
|
53 | 53 | |
54 | - $module = empty($layout_def['module']) ? '' : $layout_def['module']; |
|
54 | + $module = empty($layout_def['module']) ? '' : $layout_def['module']; |
|
55 | 55 | |
56 | - if(isset($layout_def['varname'])) |
|
57 | - { |
|
58 | - $key = strtoupper($layout_def['varname']); |
|
59 | - } |
|
60 | - else |
|
61 | - { |
|
62 | - $key = $this->_get_column_alias($layout_def); |
|
63 | - $key = strtoupper($key); |
|
64 | - } |
|
56 | + if(isset($layout_def['varname'])) |
|
57 | + { |
|
58 | + $key = strtoupper($layout_def['varname']); |
|
59 | + } |
|
60 | + else |
|
61 | + { |
|
62 | + $key = $this->_get_column_alias($layout_def); |
|
63 | + $key = strtoupper($key); |
|
64 | + } |
|
65 | 65 | |
66 | - $value = $layout_def['fields'][$key]; |
|
67 | - // cn: bug 5813, removing double-derivation of lang-pack value |
|
68 | - return $value; |
|
69 | - } |
|
66 | + $value = $layout_def['fields'][$key]; |
|
67 | + // cn: bug 5813, removing double-derivation of lang-pack value |
|
68 | + return $value; |
|
69 | + } |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | ?> |
73 | 73 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $module = empty($layout_def['module']) ? '' : $layout_def['module']; |
55 | 55 | |
56 | - if(isset($layout_def['varname'])) |
|
56 | + if (isset($layout_def['varname'])) |
|
57 | 57 | { |
58 | 58 | $key = strtoupper($layout_def['varname']); |
59 | 59 | } |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,8 +58,7 @@ discard block |
||
56 | 58 | if(isset($layout_def['varname'])) |
57 | 59 | { |
58 | 60 | $key = strtoupper($layout_def['varname']); |
59 | - } |
|
60 | - else |
|
61 | + } else |
|
61 | 62 | { |
62 | 63 | $key = $this->_get_column_alias($layout_def); |
63 | 64 | $key = strtoupper($key); |
@@ -45,121 +45,121 @@ |
||
45 | 45 | |
46 | 46 | class SugarWidgetSubPanelTopScheduleMeetingButton extends SugarWidgetSubPanelTopButtonQuickCreate |
47 | 47 | { |
48 | - function &_get_form($defines, $additionalFormFields = null, $asUrl = false) |
|
49 | - { |
|
50 | - global $app_strings; |
|
51 | - global $currentModule; |
|
52 | - |
|
53 | - $this->module="Meetings"; |
|
54 | - $this->subpanelDiv = "activities"; |
|
55 | - |
|
56 | - // Create the additional form fields with real values if they were not passed in |
|
57 | - if(empty($additionalFormFields) && $this->additional_form_fields) |
|
58 | - { |
|
59 | - foreach($this->additional_form_fields as $key=>$value) |
|
60 | - { |
|
61 | - if(!empty($defines['focus']->$value)) |
|
62 | - { |
|
63 | - $additionalFormFields[$key] = $defines['focus']->$value; |
|
64 | - } |
|
65 | - else |
|
66 | - { |
|
67 | - $additionalFormFields[$key] = ''; |
|
68 | - } |
|
69 | - } |
|
70 | - } |
|
71 | - |
|
72 | - if(!empty($this->module)) |
|
73 | - { |
|
74 | - $defines['child_module_name'] = $this->module; |
|
75 | - } |
|
76 | - else |
|
77 | - { |
|
78 | - $defines['child_module_name'] = $defines['module']; |
|
79 | - } |
|
80 | - |
|
81 | - if(!empty($this->subpanelDiv)) |
|
82 | - { |
|
83 | - $defines['subpanelDiv'] = $this->subpanelDiv; |
|
84 | - } |
|
85 | - |
|
86 | - $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
87 | - |
|
88 | - $form = 'form' . $defines['child_module_name']; |
|
89 | - $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n"; |
|
90 | - |
|
91 | - //module_button is used to override the value of module name |
|
92 | - $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n"; |
|
93 | - $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n"; |
|
94 | - |
|
95 | - if(isset($defines['focus']->name)) |
|
96 | - { |
|
97 | - $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>"; |
|
98 | - } |
|
99 | - |
|
100 | - $button .= '<input type="hidden" name="to_pdf" value="true" />'; |
|
48 | + function &_get_form($defines, $additionalFormFields = null, $asUrl = false) |
|
49 | + { |
|
50 | + global $app_strings; |
|
51 | + global $currentModule; |
|
52 | + |
|
53 | + $this->module="Meetings"; |
|
54 | + $this->subpanelDiv = "activities"; |
|
55 | + |
|
56 | + // Create the additional form fields with real values if they were not passed in |
|
57 | + if(empty($additionalFormFields) && $this->additional_form_fields) |
|
58 | + { |
|
59 | + foreach($this->additional_form_fields as $key=>$value) |
|
60 | + { |
|
61 | + if(!empty($defines['focus']->$value)) |
|
62 | + { |
|
63 | + $additionalFormFields[$key] = $defines['focus']->$value; |
|
64 | + } |
|
65 | + else |
|
66 | + { |
|
67 | + $additionalFormFields[$key] = ''; |
|
68 | + } |
|
69 | + } |
|
70 | + } |
|
71 | + |
|
72 | + if(!empty($this->module)) |
|
73 | + { |
|
74 | + $defines['child_module_name'] = $this->module; |
|
75 | + } |
|
76 | + else |
|
77 | + { |
|
78 | + $defines['child_module_name'] = $defines['module']; |
|
79 | + } |
|
80 | + |
|
81 | + if(!empty($this->subpanelDiv)) |
|
82 | + { |
|
83 | + $defines['subpanelDiv'] = $this->subpanelDiv; |
|
84 | + } |
|
85 | + |
|
86 | + $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
87 | + |
|
88 | + $form = 'form' . $defines['child_module_name']; |
|
89 | + $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n"; |
|
90 | + |
|
91 | + //module_button is used to override the value of module name |
|
92 | + $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n"; |
|
93 | + $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n"; |
|
94 | + |
|
95 | + if(isset($defines['focus']->name)) |
|
96 | + { |
|
97 | + $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>"; |
|
98 | + } |
|
99 | + |
|
100 | + $button .= '<input type="hidden" name="to_pdf" value="true" />'; |
|
101 | 101 | $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />'; |
102 | - $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n"; |
|
103 | - $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n"; |
|
104 | - $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n"; |
|
105 | - $button .= '<input type="hidden" name="record" value="" />'; |
|
106 | - |
|
107 | - // TODO: move this out and get $additionalFormFields working properly |
|
108 | - if(empty($additionalFormFields['parent_type'])) |
|
109 | - { |
|
110 | - if($defines['focus']->object_name=='Contact') { |
|
111 | - $additionalFormFields['parent_type'] = 'Accounts'; |
|
112 | - } |
|
113 | - else { |
|
114 | - $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
|
115 | - } |
|
116 | - } |
|
117 | - if(empty($additionalFormFields['parent_name'])) |
|
118 | - { |
|
119 | - if($defines['focus']->object_name=='Contact') { |
|
120 | - $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
|
121 | - $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
122 | - } |
|
123 | - else { |
|
124 | - $additionalFormFields['parent_name'] = $defines['focus']->name; |
|
125 | - } |
|
126 | - } |
|
127 | - if(empty($additionalFormFields['parent_id'])) |
|
128 | - { |
|
129 | - if($defines['focus']->object_name=='Contact') { |
|
130 | - $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
|
131 | - $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
132 | - } |
|
133 | - else { |
|
134 | - $additionalFormFields['parent_id'] = $defines['focus']->id; |
|
135 | - } |
|
136 | - } |
|
137 | - |
|
138 | - $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n"; |
|
139 | - $button .= '<input type="hidden" name="module" value="Home" />' . "\n"; |
|
140 | - $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n"; |
|
141 | - |
|
142 | - // fill in additional form fields for all but action |
|
143 | - foreach($additionalFormFields as $key => $value) |
|
144 | - { |
|
145 | - if($key != 'action') |
|
146 | - { |
|
147 | - $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n"; |
|
148 | - } |
|
149 | - } |
|
150 | - $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n"; |
|
151 | - $button .= getVersionedScript('cache/include/javascript/sugar_grp_jsolait.js')."\n"; |
|
152 | - |
|
153 | - return $button; |
|
154 | - } |
|
155 | - |
|
156 | - function display($defines, $additionalFormFields = null, $nonbutton = false) |
|
157 | - { |
|
158 | - $focus = new Meeting; |
|
159 | - if ( !$focus->ACLAccess('EditView') ) { |
|
160 | - return ''; |
|
161 | - } |
|
162 | - |
|
163 | - return parent::display($defines, $additionalFormFields); |
|
164 | - } |
|
102 | + $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n"; |
|
103 | + $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n"; |
|
104 | + $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n"; |
|
105 | + $button .= '<input type="hidden" name="record" value="" />'; |
|
106 | + |
|
107 | + // TODO: move this out and get $additionalFormFields working properly |
|
108 | + if(empty($additionalFormFields['parent_type'])) |
|
109 | + { |
|
110 | + if($defines['focus']->object_name=='Contact') { |
|
111 | + $additionalFormFields['parent_type'] = 'Accounts'; |
|
112 | + } |
|
113 | + else { |
|
114 | + $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
|
115 | + } |
|
116 | + } |
|
117 | + if(empty($additionalFormFields['parent_name'])) |
|
118 | + { |
|
119 | + if($defines['focus']->object_name=='Contact') { |
|
120 | + $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
|
121 | + $additionalFormFields['account_name'] = $defines['focus']->account_name; |
|
122 | + } |
|
123 | + else { |
|
124 | + $additionalFormFields['parent_name'] = $defines['focus']->name; |
|
125 | + } |
|
126 | + } |
|
127 | + if(empty($additionalFormFields['parent_id'])) |
|
128 | + { |
|
129 | + if($defines['focus']->object_name=='Contact') { |
|
130 | + $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
|
131 | + $additionalFormFields['account_id'] = $defines['focus']->account_id; |
|
132 | + } |
|
133 | + else { |
|
134 | + $additionalFormFields['parent_id'] = $defines['focus']->id; |
|
135 | + } |
|
136 | + } |
|
137 | + |
|
138 | + $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n"; |
|
139 | + $button .= '<input type="hidden" name="module" value="Home" />' . "\n"; |
|
140 | + $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n"; |
|
141 | + |
|
142 | + // fill in additional form fields for all but action |
|
143 | + foreach($additionalFormFields as $key => $value) |
|
144 | + { |
|
145 | + if($key != 'action') |
|
146 | + { |
|
147 | + $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n"; |
|
148 | + } |
|
149 | + } |
|
150 | + $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n"; |
|
151 | + $button .= getVersionedScript('cache/include/javascript/sugar_grp_jsolait.js')."\n"; |
|
152 | + |
|
153 | + return $button; |
|
154 | + } |
|
155 | + |
|
156 | + function display($defines, $additionalFormFields = null, $nonbutton = false) |
|
157 | + { |
|
158 | + $focus = new Meeting; |
|
159 | + if ( !$focus->ACLAccess('EditView') ) { |
|
160 | + return ''; |
|
161 | + } |
|
162 | + |
|
163 | + return parent::display($defines, $additionalFormFields); |
|
164 | + } |
|
165 | 165 | }?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | global $app_strings; |
51 | 51 | global $currentModule; |
52 | 52 | |
53 | - $this->module="Meetings"; |
|
53 | + $this->module = "Meetings"; |
|
54 | 54 | $this->subpanelDiv = "activities"; |
55 | 55 | |
56 | 56 | // Create the additional form fields with real values if they were not passed in |
57 | - if(empty($additionalFormFields) && $this->additional_form_fields) |
|
57 | + if (empty($additionalFormFields) && $this->additional_form_fields) |
|
58 | 58 | { |
59 | - foreach($this->additional_form_fields as $key=>$value) |
|
59 | + foreach ($this->additional_form_fields as $key=>$value) |
|
60 | 60 | { |
61 | - if(!empty($defines['focus']->$value)) |
|
61 | + if (!empty($defines['focus']->$value)) |
|
62 | 62 | { |
63 | 63 | $additionalFormFields[$key] = $defines['focus']->$value; |
64 | 64 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - if(!empty($this->module)) |
|
72 | + if (!empty($this->module)) |
|
73 | 73 | { |
74 | 74 | $defines['child_module_name'] = $this->module; |
75 | 75 | } |
@@ -78,45 +78,45 @@ discard block |
||
78 | 78 | $defines['child_module_name'] = $defines['module']; |
79 | 79 | } |
80 | 80 | |
81 | - if(!empty($this->subpanelDiv)) |
|
81 | + if (!empty($this->subpanelDiv)) |
|
82 | 82 | { |
83 | 83 | $defines['subpanelDiv'] = $this->subpanelDiv; |
84 | 84 | } |
85 | 85 | |
86 | - $defines['parent_bean_name'] = get_class( $defines['focus']); |
|
86 | + $defines['parent_bean_name'] = get_class($defines['focus']); |
|
87 | 87 | |
88 | - $form = 'form' . $defines['child_module_name']; |
|
89 | - $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_' . strtolower($defines['subpanelDiv']) . '\', \'' . addslashes($app_strings['LBL_LOADING']) . '\');" action="index.php" method="post" name="form" id="form' . $form . "\">\n"; |
|
88 | + $form = 'form'.$defines['child_module_name']; |
|
89 | + $button = '<form onsubmit="return SUGAR.subpanelUtils.sendAndRetrieve(this.id, \'subpanel_'.strtolower($defines['subpanelDiv']).'\', \''.addslashes($app_strings['LBL_LOADING']).'\');" action="index.php" method="post" name="form" id="form'.$form."\">\n"; |
|
90 | 90 | |
91 | 91 | //module_button is used to override the value of module name |
92 | 92 | $button .= "<input type='hidden' name='target_module' value='".$defines['child_module_name']."'>\n"; |
93 | 93 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_id' value='".$defines['focus']->id."'>\n"; |
94 | 94 | |
95 | - if(isset($defines['focus']->name)) |
|
95 | + if (isset($defines['focus']->name)) |
|
96 | 96 | { |
97 | 97 | $button .= "<input type='hidden' name='".strtolower($defines['parent_bean_name'])."_name' value='".$defines['focus']->name."'>"; |
98 | 98 | } |
99 | 99 | |
100 | 100 | $button .= '<input type="hidden" name="to_pdf" value="true" />'; |
101 | 101 | $button .= '<input type="hidden" name="tpl" value="QuickCreate.tpl" />'; |
102 | - $button .= '<input type="hidden" name="return_module" value="' . $currentModule . "\" />\n"; |
|
103 | - $button .= '<input type="hidden" name="return_action" value="' . $defines['action'] . "\" />\n"; |
|
104 | - $button .= '<input type="hidden" name="return_id" value="' . $defines['focus']->id . "\" />\n"; |
|
102 | + $button .= '<input type="hidden" name="return_module" value="'.$currentModule."\" />\n"; |
|
103 | + $button .= '<input type="hidden" name="return_action" value="'.$defines['action']."\" />\n"; |
|
104 | + $button .= '<input type="hidden" name="return_id" value="'.$defines['focus']->id."\" />\n"; |
|
105 | 105 | $button .= '<input type="hidden" name="record" value="" />'; |
106 | 106 | |
107 | 107 | // TODO: move this out and get $additionalFormFields working properly |
108 | - if(empty($additionalFormFields['parent_type'])) |
|
108 | + if (empty($additionalFormFields['parent_type'])) |
|
109 | 109 | { |
110 | - if($defines['focus']->object_name=='Contact') { |
|
110 | + if ($defines['focus']->object_name == 'Contact') { |
|
111 | 111 | $additionalFormFields['parent_type'] = 'Accounts'; |
112 | 112 | } |
113 | 113 | else { |
114 | 114 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
115 | 115 | } |
116 | 116 | } |
117 | - if(empty($additionalFormFields['parent_name'])) |
|
117 | + if (empty($additionalFormFields['parent_name'])) |
|
118 | 118 | { |
119 | - if($defines['focus']->object_name=='Contact') { |
|
119 | + if ($defines['focus']->object_name == 'Contact') { |
|
120 | 120 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
121 | 121 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
122 | 122 | } |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
125 | 125 | } |
126 | 126 | } |
127 | - if(empty($additionalFormFields['parent_id'])) |
|
127 | + if (empty($additionalFormFields['parent_id'])) |
|
128 | 128 | { |
129 | - if($defines['focus']->object_name=='Contact') { |
|
129 | + if ($defines['focus']->object_name == 'Contact') { |
|
130 | 130 | $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
131 | 131 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
132 | 132 | } |
@@ -135,16 +135,16 @@ discard block |
||
135 | 135 | } |
136 | 136 | } |
137 | 137 | |
138 | - $button .= '<input type="hidden" name="action" value="SubpanelCreates" />' . "\n"; |
|
139 | - $button .= '<input type="hidden" name="module" value="Home" />' . "\n"; |
|
140 | - $button .= '<input type="hidden" name="target_action" value="QuickCreate" />' . "\n"; |
|
138 | + $button .= '<input type="hidden" name="action" value="SubpanelCreates" />'."\n"; |
|
139 | + $button .= '<input type="hidden" name="module" value="Home" />'."\n"; |
|
140 | + $button .= '<input type="hidden" name="target_action" value="QuickCreate" />'."\n"; |
|
141 | 141 | |
142 | 142 | // fill in additional form fields for all but action |
143 | - foreach($additionalFormFields as $key => $value) |
|
143 | + foreach ($additionalFormFields as $key => $value) |
|
144 | 144 | { |
145 | - if($key != 'action') |
|
145 | + if ($key != 'action') |
|
146 | 146 | { |
147 | - $button .= '<input type="hidden" name="' . $key . '" value="' . $value . '" />' . "\n"; |
|
147 | + $button .= '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n"; |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | $button .= getVersionedScript('include/SugarFields/Fields/Datetimecombo/Datetimecombo.js')."\n"; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | function display($defines, $additionalFormFields = null, $nonbutton = false) |
157 | 157 | { |
158 | 158 | $focus = new Meeting; |
159 | - if ( !$focus->ACLAccess('EditView') ) { |
|
159 | + if (!$focus->ACLAccess('EditView')) { |
|
160 | 160 | return ''; |
161 | 161 | } |
162 | 162 |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -61,8 +63,7 @@ discard block |
||
61 | 63 | if(!empty($defines['focus']->$value)) |
62 | 64 | { |
63 | 65 | $additionalFormFields[$key] = $defines['focus']->$value; |
64 | - } |
|
65 | - else |
|
66 | + } else |
|
66 | 67 | { |
67 | 68 | $additionalFormFields[$key] = ''; |
68 | 69 | } |
@@ -72,8 +73,7 @@ discard block |
||
72 | 73 | if(!empty($this->module)) |
73 | 74 | { |
74 | 75 | $defines['child_module_name'] = $this->module; |
75 | - } |
|
76 | - else |
|
76 | + } else |
|
77 | 77 | { |
78 | 78 | $defines['child_module_name'] = $defines['module']; |
79 | 79 | } |
@@ -109,8 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | if($defines['focus']->object_name=='Contact') { |
111 | 111 | $additionalFormFields['parent_type'] = 'Accounts'; |
112 | - } |
|
113 | - else { |
|
112 | + } else { |
|
114 | 113 | $additionalFormFields['parent_type'] = $defines['focus']->module_dir; |
115 | 114 | } |
116 | 115 | } |
@@ -119,8 +118,7 @@ discard block |
||
119 | 118 | if($defines['focus']->object_name=='Contact') { |
120 | 119 | $additionalFormFields['parent_name'] = $defines['focus']->account_name; |
121 | 120 | $additionalFormFields['account_name'] = $defines['focus']->account_name; |
122 | - } |
|
123 | - else { |
|
121 | + } else { |
|
124 | 122 | $additionalFormFields['parent_name'] = $defines['focus']->name; |
125 | 123 | } |
126 | 124 | } |
@@ -129,8 +127,7 @@ discard block |
||
129 | 127 | if($defines['focus']->object_name=='Contact') { |
130 | 128 | $additionalFormFields['parent_id'] = $defines['focus']->account_id; |
131 | 129 | $additionalFormFields['account_id'] = $defines['focus']->account_id; |
132 | - } |
|
133 | - else { |
|
130 | + } else { |
|
134 | 131 | $additionalFormFields['parent_id'] = $defines['focus']->id; |
135 | 132 | } |
136 | 133 | } |
@@ -45,34 +45,34 @@ |
||
45 | 45 | //TODO Rename this to close button field |
46 | 46 | class SugarWidgetSubPanelCloseButton extends SugarWidgetField |
47 | 47 | { |
48 | - function displayList($layout_def) |
|
49 | - { |
|
50 | - global $app_strings; |
|
48 | + function displayList($layout_def) |
|
49 | + { |
|
50 | + global $app_strings; |
|
51 | 51 | global $subpanel_item_count; |
52 | - $return_module = $_REQUEST['module']; |
|
53 | - $return_id = $_REQUEST['record']; |
|
54 | - $module_name = $layout_def['module']; |
|
55 | - $record_id = $layout_def['fields']['ID']; |
|
52 | + $return_module = $_REQUEST['module']; |
|
53 | + $return_id = $_REQUEST['record']; |
|
54 | + $module_name = $layout_def['module']; |
|
55 | + $record_id = $layout_def['fields']['ID']; |
|
56 | 56 | $unique_id = $layout_def['subpanel_id']."_close_".$subpanel_item_count; //bug 51512 |
57 | 57 | |
58 | - // calls and meetings are held. |
|
59 | - $new_status = 'Held'; |
|
58 | + // calls and meetings are held. |
|
59 | + $new_status = 'Held'; |
|
60 | 60 | |
61 | - switch($module_name) |
|
62 | - { |
|
63 | - case 'Tasks': |
|
64 | - $new_status = 'Completed'; |
|
65 | - break; |
|
66 | - } |
|
61 | + switch($module_name) |
|
62 | + { |
|
63 | + case 'Tasks': |
|
64 | + $new_status = 'Completed'; |
|
65 | + break; |
|
66 | + } |
|
67 | 67 | |
68 | - if ($layout_def['EditView']) { |
|
69 | - $html = "<a id=\"$unique_id\" onclick='SUGAR.util.closeActivityPanel.show(\"$module_name\",\"$record_id\",\"$new_status\",\"subpanel\",\"{$layout_def['subpanel_id']}\");' >".$app_strings['LNK_CLOSE']."</a>"; |
|
70 | - return $html; |
|
71 | - } else { |
|
72 | - return ''; |
|
73 | - } |
|
68 | + if ($layout_def['EditView']) { |
|
69 | + $html = "<a id=\"$unique_id\" onclick='SUGAR.util.closeActivityPanel.show(\"$module_name\",\"$record_id\",\"$new_status\",\"subpanel\",\"{$layout_def['subpanel_id']}\");' >".$app_strings['LNK_CLOSE']."</a>"; |
|
70 | + return $html; |
|
71 | + } else { |
|
72 | + return ''; |
|
73 | + } |
|
74 | 74 | |
75 | - } |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | // calls and meetings are held. |
59 | 59 | $new_status = 'Held'; |
60 | 60 | |
61 | - switch($module_name) |
|
61 | + switch ($module_name) |
|
62 | 62 | { |
63 | 63 | case 'Tasks': |
64 | 64 | $new_status = 'Completed'; |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -44,40 +44,40 @@ |
||
44 | 44 | |
45 | 45 | class SugarWidgetSubPanelDeleteButton extends SugarWidgetField |
46 | 46 | { |
47 | - function displayList($layout_def) |
|
48 | - { |
|
49 | - global $app_strings; |
|
47 | + function displayList($layout_def) |
|
48 | + { |
|
49 | + global $app_strings; |
|
50 | 50 | global $subpanel_item_count; |
51 | - $return_module = $_REQUEST['module']; |
|
52 | - $return_id = $_REQUEST['record']; |
|
53 | - $module_name = $layout_def['module']; |
|
54 | - $record_id = $layout_def['fields']['ID']; |
|
51 | + $return_module = $_REQUEST['module']; |
|
52 | + $return_id = $_REQUEST['record']; |
|
53 | + $module_name = $layout_def['module']; |
|
54 | + $record_id = $layout_def['fields']['ID']; |
|
55 | 55 | $unique_id = $layout_def['subpanel_id']."_delete_".$subpanel_item_count; //bug 51512 |
56 | 56 | |
57 | - // calls and meetings are held. |
|
58 | - $new_status = 'Held'; |
|
57 | + // calls and meetings are held. |
|
58 | + $new_status = 'Held'; |
|
59 | 59 | |
60 | - switch($module_name) |
|
61 | - { |
|
62 | - case 'Tasks': |
|
63 | - $new_status = 'Completed'; |
|
64 | - break; |
|
65 | - } |
|
66 | - $subpanel = $layout_def['subpanel_id']; |
|
67 | - if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) { |
|
68 | - $linked_field= $layout_def['linked_field_set'] ; |
|
69 | - } else { |
|
70 | - $linked_field = $layout_def['linked_field']; |
|
71 | - } |
|
72 | - $refresh_page = 0; |
|
73 | - if(!empty($layout_def['refresh_page'])){ |
|
74 | - $refresh_page = 1; |
|
75 | - } |
|
60 | + switch($module_name) |
|
61 | + { |
|
62 | + case 'Tasks': |
|
63 | + $new_status = 'Completed'; |
|
64 | + break; |
|
65 | + } |
|
66 | + $subpanel = $layout_def['subpanel_id']; |
|
67 | + if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) { |
|
68 | + $linked_field= $layout_def['linked_field_set'] ; |
|
69 | + } else { |
|
70 | + $linked_field = $layout_def['linked_field']; |
|
71 | + } |
|
72 | + $refresh_page = 0; |
|
73 | + if(!empty($layout_def['refresh_page'])){ |
|
74 | + $refresh_page = 1; |
|
75 | + } |
|
76 | 76 | |
77 | - $html = "<a id=\"$unique_id\" onclick='return sp_del_conf();' href=\"javascript:sub_p_del('$subpanel', '$module_name', '$record_id', $refresh_page);\">".$app_strings['LNK_DELETE']."</a>"; |
|
78 | - return $html; |
|
77 | + $html = "<a id=\"$unique_id\" onclick='return sp_del_conf();' href=\"javascript:sub_p_del('$subpanel', '$module_name', '$record_id', $refresh_page);\">".$app_strings['LNK_DELETE']."</a>"; |
|
78 | + return $html; |
|
79 | 79 | |
80 | - } |
|
80 | + } |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | ?> |
84 | 84 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | // calls and meetings are held. |
58 | 58 | $new_status = 'Held'; |
59 | 59 | |
60 | - switch($module_name) |
|
60 | + switch ($module_name) |
|
61 | 61 | { |
62 | 62 | case 'Tasks': |
63 | 63 | $new_status = 'Completed'; |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | } |
66 | 66 | $subpanel = $layout_def['subpanel_id']; |
67 | 67 | if (isset($layout_def['linked_field_set']) && !empty($layout_def['linked_field_set'])) { |
68 | - $linked_field= $layout_def['linked_field_set'] ; |
|
68 | + $linked_field = $layout_def['linked_field_set']; |
|
69 | 69 | } else { |
70 | 70 | $linked_field = $layout_def['linked_field']; |
71 | 71 | } |
72 | 72 | $refresh_page = 0; |
73 | - if(!empty($layout_def['refresh_page'])){ |
|
73 | + if (!empty($layout_def['refresh_page'])) { |
|
74 | 74 | $refresh_page = 1; |
75 | 75 | } |
76 | 76 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | class SugarWidgetFieldURL extends SugarWidgetFieldVarchar |
43 | 43 | { |
44 | - /* Display item as link |
|
44 | + /* Display item as link |
|
45 | 45 | * @param array $layout_def definition of field which we want to display as link |
46 | 46 | * @return string html code |
47 | 47 | */ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | function displayList($layout_def) |
49 | 49 | { |
50 | 50 | $urlValue = trim($this->_get_list_value($layout_def)); |
51 | - return '<a target="_blank" href="' . $urlValue . '">' . $urlValue . "</a>"; |
|
51 | + return '<a target="_blank" href="'.$urlValue.'">'.$urlValue."</a>"; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -42,9 +42,9 @@ |
||
42 | 42 | class SugarWidgetFieldImage extends SugarWidgetFieldVarchar |
43 | 43 | { |
44 | 44 | |
45 | - function displayListPlain($layout_def) { |
|
46 | - $value = $this->_get_list_value($layout_def); |
|
47 | - return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">" |
|
48 | - . translate("LBL_VIEW_IMAGE") . '</a>'; |
|
49 | - } |
|
45 | + function displayListPlain($layout_def) { |
|
46 | + $value = $this->_get_list_value($layout_def); |
|
47 | + return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">" |
|
48 | + . translate("LBL_VIEW_IMAGE") . '</a>'; |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | function displayListPlain($layout_def) { |
46 | 46 | $value = $this->_get_list_value($layout_def); |
47 | 47 | return "<a href=\"javascript:SUGAR.image.lightbox('index.php?entryPoint=download&id=$value&type=SugarFieldImage&isTempFile=1')\">" |
48 | - . translate("LBL_VIEW_IMAGE") . '</a>'; |
|
48 | + . translate("LBL_VIEW_IMAGE").'</a>'; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | $currency = new Currency(); |
83 | 83 | $currency->retrieve($value); |
84 | - $currencies[$value] = $currency->symbol . ' ' . $currency->iso4217; |
|
84 | + $currencies[$value] = $currency->symbol.' '.$currency->iso4217; |
|
85 | 85 | } |
86 | 86 | return $currencies[$value]; |
87 | 87 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $list = array(); |
99 | 99 | foreach ($tmpList as $bean) |
100 | 100 | { |
101 | - $list[$bean->id] = $bean->symbol . ' ' . $bean->iso4217; |
|
101 | + $list[$bean->id] = $bean->symbol.' '.$bean->iso4217; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | $field_def = $this->reporter->all_fields[$layout_def['column_key']]; |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -58,8 +60,7 @@ discard block |
||
58 | 60 | if (is_array($list)) |
59 | 61 | { |
60 | 62 | $list = array_merge(array($currency), $list); |
61 | - } |
|
62 | - else |
|
63 | + } else |
|
63 | 64 | { |
64 | 65 | $list = array($currency); |
65 | 66 | } |
@@ -105,8 +106,7 @@ discard block |
||
105 | 106 | if (!empty ($field_def['sort_on'])) |
106 | 107 | { |
107 | 108 | $order_by = $layout_def['table_alias'].".".$field_def['sort_on']; |
108 | - } |
|
109 | - else |
|
109 | + } else |
|
110 | 110 | { |
111 | 111 | $order_by = $this->_get_column_select($layout_def); |
112 | 112 | } |
@@ -114,8 +114,7 @@ discard block |
||
114 | 114 | if (empty ($layout_def['sort_dir']) || $layout_def['sort_dir'] == 'a') |
115 | 115 | { |
116 | 116 | $order_dir = "ASC"; |
117 | - } |
|
118 | - else |
|
117 | + } else |
|
119 | 118 | { |
120 | 119 | $order_dir = "DESC"; |
121 | 120 | } |
@@ -45,38 +45,38 @@ |
||
45 | 45 | //this widget is used only by the document subpanel under contracts. |
46 | 46 | class SugarWidgetSubPanelLoadSignedButton extends SugarWidgetField |
47 | 47 | { |
48 | - function displayHeaderCell($layout_def) |
|
49 | - { |
|
50 | - return ' '; |
|
51 | - } |
|
48 | + function displayHeaderCell($layout_def) |
|
49 | + { |
|
50 | + return ' '; |
|
51 | + } |
|
52 | 52 | |
53 | - function displayList($layout_def) |
|
54 | - { |
|
55 | - global $app_strings; |
|
53 | + function displayList($layout_def) |
|
54 | + { |
|
55 | + global $app_strings; |
|
56 | 56 | |
57 | 57 | |
58 | - $href = 'index.php?module=' . 'Documents' |
|
59 | - . '&action=' . 'EditView' |
|
60 | - . '&record=' . $layout_def['fields']['ID'] |
|
61 | - . '&return_module=' . $_REQUEST['module'] |
|
62 | - . '&return_action=' . 'DetailView' |
|
63 | - . '&return_id=' . $_REQUEST['record'] |
|
64 | - . '&load_signed_id=' . $layout_def['fields']['LINKED_ID'] |
|
65 | - . '&parent_id=' . $_REQUEST['record'] |
|
66 | - . '&parent_name=' . $layout_def['fields']['CONTRACT_NAME'] |
|
67 | - . '&parent_type=' . $_REQUEST['module'] |
|
68 | - . '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID'] |
|
69 | - ; |
|
58 | + $href = 'index.php?module=' . 'Documents' |
|
59 | + . '&action=' . 'EditView' |
|
60 | + . '&record=' . $layout_def['fields']['ID'] |
|
61 | + . '&return_module=' . $_REQUEST['module'] |
|
62 | + . '&return_action=' . 'DetailView' |
|
63 | + . '&return_id=' . $_REQUEST['record'] |
|
64 | + . '&load_signed_id=' . $layout_def['fields']['LINKED_ID'] |
|
65 | + . '&parent_id=' . $_REQUEST['record'] |
|
66 | + . '&parent_name=' . $layout_def['fields']['CONTRACT_NAME'] |
|
67 | + . '&parent_type=' . $_REQUEST['module'] |
|
68 | + . '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID'] |
|
69 | + ; |
|
70 | 70 | |
71 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']); |
|
72 | - //if the contract state is executed or document is not a template hide this action. |
|
73 | - if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or |
|
74 | - empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) { |
|
75 | - return ""; |
|
76 | - } |
|
77 | - return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'" |
|
78 | - . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_LOAD_SIGNED'] .'</a> '; |
|
79 | - } |
|
71 | + $edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']); |
|
72 | + //if the contract state is executed or document is not a template hide this action. |
|
73 | + if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or |
|
74 | + empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) { |
|
75 | + return ""; |
|
76 | + } |
|
77 | + return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'" |
|
78 | + . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_LOAD_SIGNED'] .'</a> '; |
|
79 | + } |
|
80 | 80 | |
81 | 81 | } |
82 | 82 | ?> |
83 | 83 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,27 +55,27 @@ discard block |
||
55 | 55 | global $app_strings; |
56 | 56 | |
57 | 57 | |
58 | - $href = 'index.php?module=' . 'Documents' |
|
59 | - . '&action=' . 'EditView' |
|
60 | - . '&record=' . $layout_def['fields']['ID'] |
|
61 | - . '&return_module=' . $_REQUEST['module'] |
|
62 | - . '&return_action=' . 'DetailView' |
|
63 | - . '&return_id=' . $_REQUEST['record'] |
|
64 | - . '&load_signed_id=' . $layout_def['fields']['LINKED_ID'] |
|
65 | - . '&parent_id=' . $_REQUEST['record'] |
|
66 | - . '&parent_name=' . $layout_def['fields']['CONTRACT_NAME'] |
|
67 | - . '&parent_type=' . $_REQUEST['module'] |
|
68 | - . '&selected_revision_id=' . $layout_def['fields']['SELECTED_REVISION_ID'] |
|
58 | + $href = 'index.php?module='.'Documents' |
|
59 | + . '&action='.'EditView' |
|
60 | + . '&record='.$layout_def['fields']['ID'] |
|
61 | + . '&return_module='.$_REQUEST['module'] |
|
62 | + . '&return_action='.'DetailView' |
|
63 | + . '&return_id='.$_REQUEST['record'] |
|
64 | + . '&load_signed_id='.$layout_def['fields']['LINKED_ID'] |
|
65 | + . '&parent_id='.$_REQUEST['record'] |
|
66 | + . '&parent_name='.$layout_def['fields']['CONTRACT_NAME'] |
|
67 | + . '&parent_type='.$_REQUEST['module'] |
|
68 | + . '&selected_revision_id='.$layout_def['fields']['SELECTED_REVISION_ID'] |
|
69 | 69 | ; |
70 | 70 | |
71 | - $edit_icon_html = SugarThemeRegistry::current()->getImage( 'loadSignedDocument','align="absmiddle" border="0"',null,null,'.gif',$app_strings['LNK_LOAD_SIGNED']); |
|
71 | + $edit_icon_html = SugarThemeRegistry::current()->getImage('loadSignedDocument', 'align="absmiddle" border="0"', null, null, '.gif', $app_strings['LNK_LOAD_SIGNED']); |
|
72 | 72 | //if the contract state is executed or document is not a template hide this action. |
73 | - if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS']=='executed') or |
|
74 | - empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE']==0) { |
|
73 | + if ((!empty($layout_def['fields']['CONTRACT_STATUS']) && $layout_def['fields']['CONTRACT_STATUS'] == 'executed') or |
|
74 | + empty($layout_def['fields']['IS_TEMPLATE']) or $layout_def['fields']['IS_TEMPLATE'] == 0) { |
|
75 | 75 | return ""; |
76 | 76 | } |
77 | - return '<a href="' . $href . '"' . "title ='". $app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'" |
|
78 | - . 'class="listViewTdToolsS1">' . $edit_icon_html . ' ' . $app_strings['LNK_LOAD_SIGNED'] .'</a> '; |
|
77 | + return '<a href="'.$href.'"'."title ='".$app_strings['LNK_LOAD_SIGNED_TOOLTIP']."'" |
|
78 | + . 'class="listViewTdToolsS1">'.$edit_icon_html.' '.$app_strings['LNK_LOAD_SIGNED'].'</a> '; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | } |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -42,18 +42,18 @@ discard block |
||
42 | 42 | class SugarWidgetFieldBool extends SugarWidgetReportField |
43 | 43 | { |
44 | 44 | |
45 | - function queryFilterEquals(&$layout_def) |
|
46 | - { |
|
45 | + function queryFilterEquals(&$layout_def) |
|
46 | + { |
|
47 | 47 | |
48 | - $bool_val = $layout_def['input_name0'][0]; |
|
49 | - if ($bool_val == 'yes' || $bool_val == '1') |
|
50 | - { |
|
51 | - return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n"; |
|
52 | - } else { |
|
53 | - //return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n"; |
|
48 | + $bool_val = $layout_def['input_name0'][0]; |
|
49 | + if ($bool_val == 'yes' || $bool_val == '1') |
|
50 | + { |
|
51 | + return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n"; |
|
52 | + } else { |
|
53 | + //return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n"; |
|
54 | 54 | return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n"; |
55 | - } |
|
56 | - } |
|
55 | + } |
|
56 | + } |
|
57 | 57 | |
58 | 58 | function displayListPlain($layout_def) |
59 | 59 | { |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | return $cell; |
86 | 86 | } |
87 | 87 | |
88 | - function queryFilterStarts_With(&$layout_def) |
|
89 | - { |
|
88 | + function queryFilterStarts_With(&$layout_def) |
|
89 | + { |
|
90 | 90 | return $this->queryFilterEquals($layout_def); |
91 | - } |
|
91 | + } |
|
92 | 92 | |
93 | 93 | function displayInput(&$layout_def) |
94 | 94 | { |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return "(".$this->_get_column_select($layout_def)." LIKE 'on' OR ".$this->_get_column_select($layout_def)."='1')\n"; |
52 | 52 | } else { |
53 | 53 | //return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0' OR ".$this->_get_column_select($layout_def)."='off')\n"; |
54 | - return "(".$this->_get_column_select($layout_def)." is null OR ". $this->_get_column_select($layout_def)."='0')\n"; |
|
54 | + return "(".$this->_get_column_select($layout_def)." is null OR ".$this->_get_column_select($layout_def)."='0')\n"; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $key = $this->_get_column_alias($layout_def); |
64 | 64 | $key = strtoupper($key); |
65 | 65 | |
66 | - if(empty($layout_def['fields'][$key])) |
|
66 | + if (empty($layout_def['fields'][$key])) |
|
67 | 67 | { |
68 | 68 | $layout_def['name'] = $name; |
69 | 69 | global $app_list_strings; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | $on_or_off = 'CHECKED'; |
80 | - if ( empty($value) || $value == 'off') |
|
80 | + if (empty($value) || $value == 'off') |
|
81 | 81 | { |
82 | 82 | $on_or_off = ''; |
83 | 83 | } |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -69,8 +71,7 @@ discard block |
||
69 | 71 | global $app_list_strings; |
70 | 72 | if (empty($value)) { |
71 | 73 | $value = $app_list_strings['dom_switch_bool']['off']; |
72 | - } |
|
73 | - else { |
|
74 | + } else { |
|
74 | 75 | $value = $app_list_strings['dom_switch_bool']['on']; |
75 | 76 | } |
76 | 77 | return $value; |
@@ -97,11 +98,9 @@ discard block |
||
97 | 98 | $yes = $no = $default = ''; |
98 | 99 | if (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 1) { |
99 | 100 | $yes = ' selected="selected"'; |
100 | - } |
|
101 | - elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') { |
|
101 | + } elseif (isset($layout_def['input_name0']) && $layout_def['input_name0'] == 'off') { |
|
102 | 102 | $no = ' selected="selected"'; |
103 | - } |
|
104 | - else { |
|
103 | + } else { |
|
105 | 104 | $default = ' selected="selected"'; |
106 | 105 | } |
107 | 106 |