]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/ModuleBuilder/tpls/MBPackage/package.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / ModuleBuilder / tpls / MBPackage / package.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 *}
38 <form name='CreatePackage' id='CreatePackage'>
39 <input type='hidden' name='module' value='ModuleBuilder'>
40 <input type='hidden' name='action' value='SavePackage'>
41 <input type='hidden' name='duplicate' value='0'>
42 <input type='hidden' name='to_pdf' value='1'>
43 <input type='hidden' name='original_name' value='{$package->name}'>
44
45 <h2>{$package->title}</h2>
46 <table class='mbTable' >
47         <tr><td></td><td><input style="padding-bottom:0px;" type='button' name='savebtn' value='{$mod_strings.LBL_BTN_SAVE}' class='button' onclick="document.CreatePackage.action.value='SavePackage';ModuleBuilder.handleSave('CreatePackage');">&nbsp;
48                 {if !empty($package->name)}
49                         <input style="padding-bottom:0px;" type='button' name='duplicatebtn' value='{$mod_strings.LBL_BTN_DUPLICATE}' class='button' onclick="document.CreatePackage.action.value='SavePackage';document.CreatePackage.duplicate.value=1;ModuleBuilder.handleSave('CreatePackage');">
50             &nbsp;<input style="padding-bottom:0px;" type='button' name='deploybtn' value='{$mod_strings.LBL_BTN_DEPLOY}' class='button' onclick="ModuleBuilder.packageDeploy('CreatePackage', {$package_already_deployed});">
51                         &nbsp;<input style="padding-bottom:0px;" type='button' name='publishbtn' value='{$mod_strings.LBL_BTN_PUBLISH}' class='button' onclick="ModuleBuilder.packagePublish('CreatePackage');">
52                         &nbsp;<input style="padding-bottom:0px;" type='button' name='exportbtn' value='{$mod_strings.LBL_BTN_EXP}' class='button' onclick="ModuleBuilder.packageExport('CreatePackage');">
53                         &nbsp;<input style="padding-bottom:0px;" type='button' name='deletebtn' value='{$mod_strings.LBL_BTN_DELETE}' class='button' onclick="ModuleBuilder.packageDelete('{$package->name}');">{/if}</td></tr>
54         <tr>
55                 <td height='100%'>&nbsp;</td><td>&nbsp;</td>
56         </tr>
57         {if !empty($package->name)}
58         <tr><td class='mbLBL'  ><b>{$mod_strings.LBL_LAST_MODIFIED}</b></td><td>{$package->date_modified}</td></tr>
59         {/if}
60         <tr>
61                 <td class='mbLBL' ><font color="#ff0000"> * </font><b>{$mod_strings.LBL_PACKAGE_NAME}</b></td><td>
62                 <input type='text' name='name' size='36' maxlength='36' value='{$package->name}'>
63                 </td>
64         </tr>
65         <tr>
66                 <td class='mbLBL' ><b>{$mod_strings.LBL_AUTHOR}</b></td><td><input type='text' name='author' size='36' maxlength='36' value='{$package->author}'></td>
67         </tr>
68         
69         <tr>
70         
71                 <td class='mbLBL' ><font color="#ff0000"> * </font><b>{$mod_strings.LBL_KEY}</b></td>
72                 <td>
73                 {if empty($package->key)}
74                 <input type='text' name='key' size='5' maxlength='5' value='{$package->key}'>
75                 {else}
76                         {$package->key}<input type='hidden' name='key' size='5' maxlength='5' value='{$package->key}'>
77                 {/if}
78                 </td>
79         </tr>
80
81         <tr>
82                 <td class='mbLBL'  ><b>{$mod_strings.LBL_DESCRIPTION}</b></td><td><textarea name='description' cols='60' rows='5'>{$package->description}</textarea></td>
83         </tr>
84
85         <tr>    
86                 <td></td><td id='readme'>{sugar_getimage name="advanced_search" ext=".gif" alt=$mod_strings.LBL_HIDEOPTIONS other_attributes='border="0" id="options" '}<a style="text-decoration:none" href="javascript: void(0)" onclick ="toggleEl('readmefield');"><b>{$mod_strings.LBL_ADD_README}</b></a></td>
87         </tr>
88         <tr>
89                 <td height='100%'>&nbsp;</td><td>&nbsp;</td>
90         </tr>
91         <tr id='readmefield' style="display:none;">
92                 <td></td>
93                 <td ><textarea name='readme' cols='60' rows='10'>{$package->readme}</textarea></td>
94         </tr>
95         
96         {if !empty($package->name)}
97         
98         <tr>
99                 <td class='mbLBL'><b>{$mod_strings.LBL_MODULES}</b></td>
100                 <td >
101                         <table>
102                                 <tr id="package_modules">
103                                         {counter name='items' assign='items' start=1}
104                                         <td align='center'>
105                                                 <table id="new_module" onclick="ModuleBuilder.addModule('{$package->name}')" class='wizardButton' onmousedown="ModuleBuilder.buttonDown(this);return false;" onmouseout="ModuleBuilder.buttonOut(this);">
106                                                 <tr>
107                                                 <td  align='center'>{sugar_image name="NewModule" width=48 height=48}</td>
108                                                 </tr>
109                                                 <tr><td>
110                                                   <a  class='studiolink' href="javascript:void(0)" onclick="ModuleBuilder.addModule('{$package->name}')">
111                                                       {$mod_strings.LBL_NEW_MODULE}</a>
112                                                 </td></tr>
113                                                 </table>
114                                                 
115                                                 
116                                         </td>
117                                         {foreach from=$package->moduleTypes key='name' item='type'}
118                                         {assign var='imgurl' value=$type|cat:'_32'}
119                                                 {if $items % 4 == 0 && $items != 0}
120                                                         </tr><tr>
121                                                 {/if}
122                                                 <td align='center'>
123                                                 <table id= "existing_module" onclick="ModuleBuilder.viewModule('{$package->name}', '{$name}')" class='wizardButton' onmousedown="ModuleBuilder.buttonDown(this);return false;" onmouseout="ModuleBuilder.buttonOut(this);">
124                                                   <tr>
125                                                       <td  align='center'>{sugar_image name=$type width=48 height=48}</td>
126                                                   </tr><tr><td align='center'>
127                                                       <a  class='studiolink' href="javascript:void(0)" onclick="ModuleBuilder.viewModule('{$package->name}', '{$name}')">
128                                               {$name}</a>
129                                           </td></tr>
130                                         </table></td>
131                                         {counter name='items'}  
132                                         {/foreach}
133                                            
134                                         </tr>
135         </table>
136                 </td>
137         </tr>
138         
139         {/if}
140         
141         <tr>
142                 <td height='100%'>&nbsp;</td><td>&nbsp;</td>
143         </tr>
144 </table>
145 </form>
146 {literal}
147 <script>
148 addForm('CreatePackage');
149 addToValidate('CreatePackage', 'name', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_NAME}{literal}');
150 addToValidateIsInArray('CreatePackage', 'name', 'in_array', false, '{/literal}{$mod_strings.LBL_JS_VALIDATE_PACKAGE_NAME}','{$package_labels}'{literal}, 'u==');
151 addToValidate('CreatePackage', 'key', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_KEY}{literal}');
152
153 ModuleBuilder.helpRegister('CreatePackage');
154 ModuleBuilder.helpRegisterByID('CreatePackage','td');
155 if(document.getElementById('package_modules'))
156         ModuleBuilder.helpRegisterByID('package_modules', 'table');
157 ModuleBuilder.helpSetup({/literal}'{$package->help.group}','{$package->help.default}'{literal});
158 function toggleEl(){
159                 var display = document.getElementById('readmefield').style.display;
160                 if(display=='table-row' || display=='inline-block'){
161                         document.getElementById('options').src = "{/literal}{sugar_getimagepath file='advanced_search.gif'}{literal}";
162                         document.getElementById('readmefield').style.display ='none';
163                 }else if (display=='none'){
164                         document.getElementById('options').src = "{/literal}{sugar_getimagepath file='basic_search.gif'}{literal}";
165                         document.getElementById('readmefield').style.display = (navigator.appName=="Microsoft Internet Explorer")? 'inline-block' : 'table-row';
166                 }
167         }
168 </script>
169 {/literal}
170 {include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}