]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Studio/Forms.php
Release 6.4.0
[Github/sugarcrm.git] / modules / Studio / Forms.php
1 <?php
2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Affero General Public License version 3 as published by the
9  * Free Software Foundation with the addition of the following permission added
10  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13  * 
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
17  * details.
18  * 
19  * You should have received a copy of the GNU Affero General Public License along with
20  * this program; if not, see http://www.gnu.org/licenses or write to the Free
21  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22  * 02110-1301 USA.
23  * 
24  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26  * 
27  * The interactive user interfaces in modified source and object code versions
28  * of this program must display Appropriate Legal Notices, as required under
29  * Section 5 of the GNU Affero General Public License version 3.
30  * 
31  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32  * these Appropriate Legal Notices must retain the display of the "Powered by
33  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34  * technical reasons, the Appropriate Legal Notices must display the words
35  * "Powered by SugarCRM".
36  ********************************************************************************/
37
38
39
40
41 //for users
42 function user_get_validate_record_js() {
43 }
44 function user_get_chooser_js() {
45 }
46 function user_get_confsettings_js() {
47 };
48 //end for users
49 function get_chooser_js() {
50         // added here for compatibility
51 }
52 function get_validate_record_js() {
53 }
54 function get_new_record_form() {
55
56         if(empty($_SESSION['studio']['module']))return '';
57
58         global $mod_strings;
59         $module_name = $_SESSION['studio']['module'];
60         $debug = true;
61         $html = "";
62
63
64         $html = get_left_form_header($mod_strings['LBL_TOOLBOX']);
65         $add_field_icon = SugarThemeRegistry::current()->getImage("plus_inline", 'style="margin-left:4px;margin-right:4px;" border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_ADD_FIELD']);
66         $minus_field_icon = SugarThemeRegistry::current()->getImage("minus_inline", 'style="margin-left:4px;margin-right:4px;" border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_ADD_FIELD']);
67         $edit_field_icon = SugarThemeRegistry::current()->getImage("edit_inline", 'style="margin-left:4px;margin-right:4px;" border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_ADD_FIELD']);
68         $delete = SugarThemeRegistry::current()->getImage("delete_inline", "border='0' style='margin-left:4px;margin-right:4px;'",null,null,'.gif',$mod_strings['LBL_DELETE']);
69         $show_bin = true;
70         if (isset ($_REQUEST['edit_subpanel_MSI']))
71         global $sugar_version, $sugar_config;
72                 $show_bin = false;
73
74         $html .= "
75
76                         <script type=\"text/javascript\" src=\"modules/DynamicLayout/DynamicLayout_3.js\">
77                         </script>
78                         <p>
79                 ";
80
81         if (isset ($_REQUEST['edit_col_MSI'])) {
82                 // do nothing
83         } else {
84                 $html .= <<<EOQ
85
86
87            <link rel="stylesheet" type="text/css" href="include/javascript/yui-old/assets/container.css" />
88                                 <script type="text/javascript" src="include/javascript/yui-old/container.js"></script>
89                                         <script type="text/javascript" src="include/javascript/yui-old/PanelEffect.js"></script>
90
91
92
93 EOQ;
94
95                 $field_style = '';
96                 $bin_style = '';
97
98                 $add_icon = SugarThemeRegistry::current()->getImage("plus_inline", 'style="margin-left:4px;margin-right:4px;" border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_MAXIMIZE']);
99                 $min_icon = SugarThemeRegistry::current()->getImage("minus_inline", 'style="margin-left:4px;margin-right:4px;"  border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_MINIMIZE']);
100            $del_icon = SugarThemeRegistry::current()->getImage("delete_inline", 'style="margin-left:4px;margin-right:4px;" border="0" align="absmiddle"',null,null,'.gif',$mod_strings['LBL_MINIMIZE']);
101                 $html .=<<<EOQ
102                               <br><br><table  cellpadding="0" cellspacing="0" border="1" width="100%"   id='s_field_delete'>
103                                                         <tr><td colspan='2' align='center'>
104                                                $del_icon <br>Drag Fields Here To Delete
105                                                 </td></tr></table>
106                                         <div id="s_fields_MSIlink" style="display:none">
107                                                 <a href="#" onclick="toggleDisplay('s_fields_MSI');">
108                                                          $add_icon {$mod_strings['LBL_VIEW_SUGAR_FIELDS']}
109                                                 </a>
110                                         </div>
111                                         <div id="s_fields_MSI" style="display:inline">
112
113                                                 <table  cellpadding="0" cellspacing="0" border="0" width="100%" id="studio_fields">
114                                                         <tr><td colspan='2'>
115
116                                                                         <a href="#" onclick="toggleDisplay('s_fields_MSI');">$min_icon</a>{$mod_strings['LBL_SUGAR_FIELDS_STAGE']}
117                                                                     <br><select id='studio_display_type' onChange='filterStudioFields(this.value)'><option value='all'>All<option value='custom'>Custom</select>
118                                                                         </td>
119                                                         </tr>
120                                                 </table>
121                                         </div>
122
123 EOQ;
124
125         }
126         $html .= get_left_form_footer();
127         if (!$debug)
128                 return $html;
129         return $html.<<<EOQ
130
131 EOQ;
132 }
133 ?>