]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/ModuleBuilder/tpls/MBModule/module.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / ModuleBuilder / tpls / MBModule / module.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 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 <link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/MB.css" />
39 <form name='CreateModule'>
40 <input type='hidden' name='module' value='ModuleBuilder'>
41 <input type='hidden' name='action' value='SaveModule'>
42 <input type='hidden' name='package' value='{$package->name}'>
43 <input type='hidden' name='original_name' value='{$module->name}'>
44 <input type='hidden' name='duplicate' value='0'>
45 <input type='hidden' name='to_pdf' value='1'>
46 <table class='mbTable'  >
47         <tr><td></td><td colspan=4><input type='button' name='savebtn' value='{$mod_strings.LBL_BTN_SAVE}' class='button' onclick="ModuleBuilder.handleSave('CreateModule');">&nbsp;
48                 {if !empty($module->name)}
49                         <input type='button' name='duplicatebtn' value='{$mod_strings.LBL_BTN_DUPLICATE}' class='button' onclick="document.CreateModule.duplicate.value=1;ModuleBuilder.handleSave('CreateModule');">
50                         <input type='button' name='viewfieldsbtn' value='{$mod_strings.LBL_BTN_VIEW_FIELDS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewFields);">
51                         <input type='button' name='viewrelsbtn' value='{$mod_strings.LBL_BTN_VIEW_RELATIONSHIPS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewRelationships);">
52                         <input type='button' name='viewlayoutsbtn' value='{$mod_strings.LBL_BTN_VIEW_LAYOUTS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewLayouts);">
53                         &nbsp;<input type='button' name='deletebtn' value='{$mod_strings.LBL_BTN_DELETE}' class='button' onclick="ModuleBuilder.moduleDelete('{$package->name}', '{$module->name}');">{/if}</td></tr>
54         <tr>
55                 <td height='100%'>&nbsp;</td><td>&nbsp;</td>
56         </tr>
57         <tr>
58         <tr><td class='mbLBL'><b>{$mod_strings.LBL_PACKAGE}</b></td><td colspan='5'>{$package->name}</td></tr>
59         <tr><td class='mbLBL'><font color="#ff0000"> * </font><b>{$mod_strings.LBL_MODULE_NAME}</b></td><td colspan='5'><input type='text' name='name' value='{$module->name}' size='36' maxlength='36'></td></tr>
60         <tr><td class='mbLBL'><font color="#ff0000"> * </font><b>{$mod_strings.LBL_LABEL}</b></td><td colspan='5'><input type='text' name='label' value='{$module->config.label}' size='36' maxlength='36'></td></tr>
61         <tr>
62         <tr>
63            <td class='mbLBL' width='5%' nowrap>{sugar_translate label='LBL_MB_IMPORTABLE' module='ModuleBuilder'}:</td>
64        <td>&nbsp;<input type='checkbox' name='importable' value=1 {if !empty($module->config.importable)}checked{/if}></td>
65     </tr>
66         {counter name='items' assign='items' start=0}
67         {foreach from=$module->implementable key='name' item='label'}
68         </tr><tr>
69         <td class='mbLBL' width='5%' nowrap>{$label}:</td>
70         <td >&nbsp;<input type='checkbox' name='{$name}' value=1 {if !empty($module->config[$name])}checked{/if}></td>
71         {counter name='items'}  
72         {/foreach}
73         </tr>
74         <tr>
75         <td class='mbLBL'><font color="#ff0000"> * </font><b>{$mod_strings.LBL_TYPE}</b></td>
76         {counter name='items' assign='items' start=0}
77         <td>
78             <table>
79                 <tr{if empty($module->name)} id="factory_modules"{/if}>
80                 {if empty($module->name)}<input type='hidden' name='type'>{/if}
81                 {foreach from=$types key='type' item='name'}
82                                         {assign var='imgurl' value=$type|cat:'_32'}
83                     {if empty($module->name) || $type != 'basic' || count($module->mbvardefs->templates) == 1}
84                         {if $items % 6 == 0 && $items != 0}
85                 </tr>
86                 <tr>
87                         {/if}
88                     <td>
89                         {if empty($module->name)}
90                     <td align='center'>
91                         <table id='type_{$type}' onclick='ModuleBuilder.buttonDown(this,"{$type}", "type"); ModuleBuilder.buttonToForm("CreateModule", "type", "type");' class='wizardButton' onmousedown='return false;' onmouseout='ModuleBuilder.buttonOut(this,"{$type}", "type");'>
92                                                   <tr>
93                                                       <td  align='center'>{sugar_image name=$type width=48 height=48}</td>
94                                                   </tr>
95                                            </table>
96                                            <a class='studiolink' href="javascript:void(0)" onclick='ModuleBuilder.buttonDown(this,"{$type}", "type"); ModuleBuilder.buttonToForm("CreateModule", "type", "type");'>{$name}</a>
97                         <script>ModuleBuilder.buttonAdd('type_{$type}', '{$type}', 'type');</script>
98                     </td>
99                     {else}
100                     <td align='center'>{sugar_image name=$type width=48 height=48}<br>
101                     {$name}
102                     {/if}
103                     </td>
104                     {/if}
105                 {counter name='items'}  
106                 {/foreach}
107                 </tr>
108             </table>
109         </td>
110         </tr>   
111         <tr>
112                 <td height='100%'>&nbsp;</td><td>&nbsp;</td>
113         </tr>
114 </table>
115 {literal}
116 <script>
117 addForm('CreateModule');
118 addToValidate('CreateModule', 'name', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_NAME}{literal}');
119 addToValidate('CreateModule', 'label', 'varchar', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_LABEL}{literal}');
120 addToValidate('CreateModule', 'type', 'varchar', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_TYPE}{literal}');
121 ModuleBuilder.helpRegister('CreateModule');
122 if(document.getElementById('factory_modules'))
123         ModuleBuilder.helpRegisterByID('factory_modules', 'table');
124 ModuleBuilder.helpSetup({/literal}'{$module->help.group}','{$module->help.default}'{literal});
125 ModuleBuilder.MBpackage = '{/literal}{$module->package}{literal}';
126 ModuleBuilder.module = '{/literal}{$module->name}{literal}';    
127 </script>
128 {/literal}
129 {include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}