Add TPL files

This commit is contained in:
2025-05-12 15:46:37 +00:00
parent 4a4ed02e8a
commit b4d54ba40b
894 changed files with 120580 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
<?PHP
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/**
* THIS CLASS IS GENERATED BY MODULE BUILDER
* PLEASE DO NOT CHANGE THIS CLASS
* PLACE ANY CUSTOMIZATIONS IN {{$class.name}}
*/
{{foreach from=$class.requires item='require'}}
require_once('{{$require}}');
{{/foreach}}
class {{$class.name}}_sugar extends {{$class.extends}} {
var $new_schema = true;
var $module_dir = '{{$class.name}}';
var $object_name = '{{$class.name}}';
var $table_name = '{{$class.table_name}}';
var $importable = {{if $class.importable}}true{{else}}false{{/if}};
var $disable_row_level_security = true ; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
{{foreach from=$class.fields key='field' item='def'}}
var ${{$field}};
{{/foreach}}
function {{$class.name}}_sugar(){
parent::{{$class.extends}}();
}
{{if $class.acl}}
function bean_implements($interface){
switch($interface){
case 'ACL': return true;
}
return false;
}
{{/if}}
}
?>

View File

@@ -0,0 +1,47 @@
<?PHP
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/**
* THIS CLASS IS FOR DEVELOPERS TO MAKE CUSTOMIZATIONS IN
*/
require_once('modules/{{$class.name}}/{{$class.name}}_sugar.php');
class {{$class.name}} extends {{$class.name}}_sugar {
function {{$class.name}}(){
parent::{{$class.name}}_sugar();
}
}
?>

View File

@@ -0,0 +1,43 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
global $mod_strings, $app_strings, $sugar_config;
if(ACLController::checkAccess('{$moduleName}', 'edit', true))$module_menu[]=Array("index.php?module={$moduleName}&action=EditView&return_module={$moduleName}&return_action=DetailView", $mod_strings['LNK_NEW_RECORD'],"Create{$moduleName}", '{$moduleName}');
{if $showvCard}if(ACLController::checkAccess('{$moduleName}', 'edit', true))$module_menu[]=Array("index.php?module={$moduleName}&action=ImportVCard", $mod_strings['LNK_IMPORT_VCARD'],"Create{$moduleName}", '{$moduleName}');{/if}
if(ACLController::checkAccess('{$moduleName}', 'list', true))$module_menu[]=Array("index.php?module={$moduleName}&action=index&return_module={$moduleName}&return_action=DetailView", $mod_strings['LNK_LIST'],"{$moduleName}", '{$moduleName}');
{if $showimport}if(ACLController::checkAccess('{$moduleName}', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module={$moduleName}&return_module={$moduleName}&return_action=index", $app_strings['LBL_IMPORT'],"Import", '{$moduleName}');{/if}

View File

@@ -0,0 +1,40 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
/**
* This file adds support for studio
*/
?>

View File

@@ -0,0 +1,159 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<div>&nbsp;
<link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/ListEditor.css"></link>
<link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/MBModule/dropdown.css"></link>
<form name='dropdown_form'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='{$action}'>
<input type='hidden' name='to_pdf' value='true'>
<input type='hidden' name='view_module' value='{$module->name}'>
<input type='hidden' name='view_package' value='{$package_name}'>
<input type='hidden' id='list_value' name='list_value' value=''>
{if ($refreshTree)}
<input type='hidden' name='refreshTree' value='1'>
{/if}
<table>
<tr>
<td colspan='3'>
<input id = "saveBtn" type='button' class='button' onclick='SimpleList.handleSave()' value='{$APP.LBL_SAVE_BUTTON_LABEL}'>
<input type='button' class='button' onclick='SimpleList.undo()' value='{$MOD.LBL_BTN_UNDO}'>
<input type='button' class='button' onclick='SimpleList.redo()' value='{$MOD.LBL_BTN_REDO}'>
<input type='button' class='button' name='cancel' value='{$MOD.LBL_BTN_CANCEL}' onclick='ModuleBuilder.tabPanel.get("activeTab").close()'>
</td>
</tr>
<tr>
<td colspan='2'>
<hr/>
</td>
</tr>
<tr>
<td>
<span class='mbLBLL'>{$MOD.LBL_DROPDOWN_TITLE_NAME}:&nbsp;</span>
{if $name }
<input type='hidden' id='dropdown_name' name='dropdown_name' value='{$dropdown_name}'>{$dropdown_name}
{else}
<input type='text' id='dropdown_name' name='dropdown_name' value={$prepopulated_name}>
{/if}
</td>
</tr>
<tr>
<td class='mbLBLL'>
{$MOD.LBL_DROPDOWN_LANGUAGE}:&nbsp;
{html_options name='dropdown_lang' options=$available_languages selected=$selected_lang onchange='this.form.action.value="dropdown";ModuleBuilder.handleSave("dropdown_form")'}
</td>
</tr>
<tr>
<td style='padding-top:10px;' class='mbLBLL'>{$MOD.LBL_DROPDOWN_ITEMS}:</td>
</tr>
<tr>
<td><b>{$MOD.LBL_DROPDOWN_ITEM_NAME}</b><span class='fieldValue'>[{$MOD.LBL_DROPDOWN_ITEM_LABEL}]<span></td>
</tr>
<tr>
<td colspan='3'>
<ul id="ul1" class="listContainer">
{foreach from=$options key='name' item='val'}
{if (!isset($val) || $val =='')}{assign var='name' value=$MOD.LBL_BLANK}{/if}
<li class="draggable" id="{$name}" >
<table width='100%'>
<tr>
<td>
<b>{$name}</b>
<input id='value_{$name}' value='{$name}' type = 'hidden'>
<span class='fieldValue' id='span_{$name}'>
{if (!isset($val) || $val =='')}[{$MOD.LBL_BLANK}]{else}[{$val}]{/if}
</span>
<span class='fieldValue' id='span_edit_{$name}' style='display:none'>
<input type='text' id='input_{$name}' value="{$val|escape}" onBlur='SimpleList.setDropDownValue("{$name}", this.value, true)' >
</span>
</td>
<td align='right'>
<a href='javascript:void(0)' onclick='SimpleList.editDropDownValue("{$name}", true)'>
{$editImage}</a>
&nbsp;
<a href='javascript:void(0)' onclick='SimpleList.deleteDropDownValue("{$name}", true)'>
{$deleteImage}</a>
</td>
</tr>
</table>
</li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td colspan='3'>
<table width='100%'>
<tr>
<td class='mbLBLL'>{$MOD.LBL_DROPDOWN_ITEM_NAME}:</td><td class='mbLBLL'>{$MOD.LBL_DROPDOWN_ITEM_LABEL}:</td>
</tr>
<tr>
<td><input type='text' id='drop_name' name='drop_name'></td>
<td><input type='text' id='drop_value' name='drop_value'></td>
</tr>
<tr><td><input type='button' id='dropdownaddbtn' value='{$APP.LBL_ADD_BUTTON}' class='button'></td></tr>
</table>
</td>
</tr>
<tr>
<td colspan='3'>
<input type='button' class='button' value='{$MOD.LBL_BTN_SORT_ASCENDING}' onclick='SimpleList.sortAscending()'>
<input type='button' class='button' value='{$MOD.LBL_BTN_SORT_DESCENDING}' onclick='SimpleList.sortDescending()'>
</td>
</tr>
</table>
</form>
{literal}
<script>
addForm('dropdown_form');
addToValidate('dropdown_form', 'dropdown_name', 'DBName', false, SUGAR.language.get("ModuleBuilder", "LBL_JS_VALIDATE_NAME"));
addToValidate('dropdown_form', 'drop_value', 'varchar', false, SUGAR.language.get("ModuleBuilder", "LBL_JS_VALIDATE_LABEL"));
eval({/literal}{$ul_list}{literal});
SimpleList.ul_list = list;
SimpleList.init({/literal}'{$editImage}'{literal}, {/literal}'{$deleteImage}'{literal});
ModuleBuilder.helpSetup('dropdowns','editdropdown');
var addListenerFields = ['drop_name','drop_value' ]
YAHOO.util.Event.addListener(addListenerFields,"keydown", function(e){
if (e.keyCode == 13) {
YAHOO.util.Event.stopEvent(e);
}
});
</script>
{/literal}
</div>

View File

@@ -0,0 +1,71 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<div id='dropdowns'>
<input type='button' name='adddropdownbtn'
value='{$LBL_BTN_ADDDROPDOWN}' class='button'
onclick='ModuleBuilder.getContent("module=ModuleBuilder&action=dropdown&refreshTree=1");'>&nbsp;
<hr>
<table width='100%'>
<colgroup span='3' width='33%'>
<tr>
{counter name='items' assign='items' start=0} {foreach from=$dropdowns
key='name' item='def'} {if $items % 3 == 0 && $items != 0}
</tr>
<tr>
{/if}
<td><a class='mbLBLL' href='javascript:void(0)'
onclick='ModuleBuilder.getContent("module=ModuleBuilder&action=dropdown&dropdown_name={$name}")'>{$name}</a></td>
{counter name='items'} {/foreach} {if $items == 0}
<td class='mbLBLL'>{$mod_strings.LBL_NONE}</td>
{elseif $items % 3 == 1}
<td>&nbsp;</td>
<td>&nbsp;</td>
{elseif $items % 3 == 2}
<td>&nbsp;</td>
{/if}
</tr>
</table>
<script>
ModuleBuilder.helpRegisterByID('dropdowns', 'input');
ModuleBuilder.helpSetup('dropdowns','default');
</script> {include
file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}

View File

@@ -0,0 +1,120 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000"></div>
{literal}
<script>
addForm('popup_form');
</script>
{/literal}
<form name='popup_form' id='popup_form_id' onsubmit='return false;'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='{$action}'>
<input type='hidden' name='new_dropdown' value=''>
<input type='hidden' name='to_pdf' value='true'>
<input type='hidden' name='view_module' value='{$module->name}'>
{if isset($package->name)}
<input type='hidden' name='view_package' value='{$package->name}'>
{/if}
<input type='hidden' name='is_update' value='true'>
{if $hideLevel < 5}
&nbsp;
<input type='button' class='button' name='fsavebtn' value='{$mod_strings.LBL_BTN_SAVE}' onclick='{literal}if(validate_type_selection() && check_form("popup_form")){ {/literal}{$preSave} {literal}ModuleBuilder.submitForm("popup_form_id"); }{/literal}'>
<input type='button' name='cancelbtn' value='{$mod_strings.LBL_BTN_CANCEL}' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.findTabById("east"));' class='button'>
{if !empty($vardef.name)}
{if $hideLevel < 3}
{literal}
&nbsp;<input type='button' class='button' name='fdeletebtn' value='{/literal}{$mod_strings.LBL_BTN_DELETE}{literal}' onclick='if(confirm("{/literal}{$mod_strings.LBL_CONFIRM_FIELD_DELETE}{literal}")){document.popup_form.action.value="DeleteField";ModuleBuilder.submitForm("popup_form_id");}'>
{/literal}
{/if}
{if !$no_duplicate}
{literal}
&nbsp;<input type='button' class='button' name='fclonebtn' value='{/literal}{$mod_strings.LBL_BTN_CLONE}{literal}' onclick='document.popup_form.action.value="CloneField";ModuleBuilder.submitForm("popup_form_id");'>
{/literal}
{/if}
{/if}
{else}
{literal}
<input type='button' class='button' name='lsavebtn' value='{/literal}{$mod_strings.LBL_BTN_SAVE}{literal}' onclick='if(check_form("popup_form")){this.form.action.value = "{/literal}{$action}{literal}";ModuleBuilder.submitForm("popup_form_id")};'>
{/literal}
{literal}
&nbsp;<input type='button' class='button' name='fclonebtn' value='{/literal}{$mod_strings.LBL_BTN_CLONE}{literal}' onclick='document.popup_form.action.value="CloneField";ModuleBuilder.submitForm("popup_form_id");'>
{/literal}
{literal}
&nbsp;<input type='button' class='button' name='cancel' value='{/literal}{$mod_strings.LBL_BTN_CANCEL}{literal}' onclick='ModuleBuilder.tabPanel.get("activeTab").close()'>
{/literal}
{/if}
<hr>
<table width="400px" >
<tr>
<td class="mbLBL" style="width:92px;">{$MOD.COLUMN_TITLE_DATA_TYPE}:</td>
<td >{if empty($vardef.name) && $isClone == 0}
{html_options name="type" id="type" options=$field_types selected=$vardef.type onchange='ModuleBuilder.moduleLoadField("", this.options[this.selectedIndex].value);'}
{sugar_help text=$mod_strings.LBL_POPHELP_FIELD_DATA_TYPE FIXX=250 FIXY=80}
{else}
{$field_types[$vardef.type]}
{/if}
{if empty($field_types[$vardef.type]) && !empty($vardef.type)}({$vardef.type}){/if}
<input type='hidden' name='type' value={$vardef.type}>
</td>
</tr>
</table>
{$fieldLayout}
</form>
<script>
{literal}
function validate_type_selection(){
var typeSel = document.getElementById('type');
if(typeSel && typeSel.options){
if(typeSel.options[typeSel.selectedIndex].value == ''){
alert('{/literal}{$MOD.ERR_SELECT_FIELD_TYPE}{literal}');
return false;
}
}
if (document.getElementById("customTypeValidate")){
return document.getElementById("customTypeValidate").onchange();
}
return true;
}
{/literal}
ModuleBuilder.helpSetup('fieldsEditor','{$help_group}');
</script>

View File

@@ -0,0 +1,79 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<div id='studiofields'>
<input type='button' name='addfieldbtn' value='{$mod_strings.LBL_BTN_ADDFIELD}' class='button' onclick='ModuleBuilder.moduleLoadField("");'>&nbsp;
{if $editLabelsMb=='1'}
<input type='button' name='addfieldbtn' value='{$mod_strings.LBL_BTN_EDLABELS}' class='button' onclick='ModuleBuilder.moduleLoadLabels("mb");'>
{else}
<input type='button' name='addfieldbtn' value='{$mod_strings.LBL_BTN_EDLABELS}' class='button' onclick='ModuleBuilder.moduleLoadLabels("studio");'>
{/if}
{foreach from=$module->mbvardefs->vardefs.fields key='group' item='fields'}
<hr>
<h2>{$title[$group]}</h2>
<table width='100%'>
<colgroup span='3' width='33%'>
<tr>
{counter name='items' assign='items' start=0}
{foreach from=$fields key='name' item='def'}
{if $items % 3 == 0 && $items != 0}
</tr><tr>
{/if}
<td>
<a class='mbLBLL' href='javascript:void(0)' onclick='ModuleBuilder.moduleLoadField("{$name}")'>{$name}</a>
</td>
{counter name='items'}
{/foreach}
{if $items == 0}
<td class='mbLBLL'>{$mod_strings.LBL_NONE}</td>
{elseif $items % 3 == 1}
<td>&nbsp;</td><td>&nbsp;</td>
{elseif $items % 3 == 2}
<td>&nbsp;</td>
{/if}
</tr>
</table>
{/foreach}
<script>
ModuleBuilder.module = '{$module->name}';
ModuleBuilder.MBpackage = '{$package->name}';
ModuleBuilder.helpRegisterByID('studiofields', 'input');
{if $package->name != 'studio'}
ModuleBuilder.helpSetup('fieldsEditor','mbDefault');
{else}
ModuleBuilder.helpSetup('fieldsEditor','default');
{/if}
</script>

View File

View File

@@ -0,0 +1,38 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$mod_strings = array(
);

View File

View File

@@ -0,0 +1,128 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/MB.css" />
<form name='CreateModule'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='SaveModule'>
<input type='hidden' name='package' value='{$package->name}'>
<input type='hidden' name='original_name' value='{$module->name}'>
<input type='hidden' name='duplicate' value='0'>
<input type='hidden' name='to_pdf' value='1'>
<table class='mbTable' >
<tr><td></td><td colspan=4><input type='button' name='savebtn' value='{$mod_strings.LBL_BTN_SAVE}' class='button' onclick="ModuleBuilder.handleSave('CreateModule');">&nbsp;
{if !empty($module->name)}
<input type='button' name='duplicatebtn' value='{$mod_strings.LBL_BTN_DUPLICATE}' class='button' onclick="document.CreateModule.duplicate.value=1;ModuleBuilder.handleSave('CreateModule');">
<input type='button' name='viewfieldsbtn' value='{$mod_strings.LBL_BTN_VIEW_FIELDS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewFields);">
<input type='button' name='viewrelsbtn' value='{$mod_strings.LBL_BTN_VIEW_RELATIONSHIPS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewRelationships);">
<input type='button' name='viewlayoutsbtn' value='{$mod_strings.LBL_BTN_VIEW_LAYOUTS}' class='button' onclick="ModuleBuilder.handleSave('CreateModule', ModuleBuilder.moduleViewLayouts);">
&nbsp;<input type='button' name='deletebtn' value='{$mod_strings.LBL_BTN_DELETE}' class='button' onclick="ModuleBuilder.moduleDelete('{$package->name}', '{$module->name}');">{/if}</td></tr>
<tr>
<td height='100%'>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr>
<tr><td class='mbLBL'><b>{$mod_strings.LBL_PACKAGE}</b></td><td colspan='5'>{$package->name}</td></tr>
<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=50></td></tr>
<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=50></td></tr>
<tr>
<tr>
<td class='mbLBL' width='5%' nowrap>{sugar_translate label='LBL_MB_IMPORTABLE' module='ModuleBuilder'}:</td>
<td>&nbsp;<input type='checkbox' name='importable' value=1 {if !empty($module->config.importable)}checked{/if}></td>
</tr>
{counter name='items' assign='items' start=0}
{foreach from=$module->implementable key='name' item='label'}
</tr><tr>
<td class='mbLBL' width='5%' nowrap>{$label}:</td>
<td >&nbsp;<input type='checkbox' name='{$name}' value=1 {if !empty($module->config[$name])}checked{/if}></td>
{counter name='items'}
{/foreach}
</tr>
<tr>
<td class='mbLBL'><font color="#ff0000"> * </font><b>{$mod_strings.LBL_TYPE}</b></td>
{counter name='items' assign='items' start=0}
<td>
<table>
<tr{if empty($module->name)} id="factory_modules"{/if}>
{if empty($module->name)}<input type='hidden' name='type'>{/if}
{foreach from=$types key='type' item='name'}
{assign var='imgurl' value=$type|cat:'_32'}
{if empty($module->name) || $type != 'basic' || count($module->mbvardefs->templates) == 1}
{if $items % 6 == 0 && $items != 0}
</tr>
<tr>
{/if}
<td>
{if empty($module->name)}
<td align='center'>
<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");'>
<tr>
<td align='center'>{sugar_image name=$type width=48 height=48}</td>
</tr>
</table>
<a class='studiolink' href="javascript:void(0)" onclick='ModuleBuilder.buttonDown(this,"{$type}", "type"); ModuleBuilder.buttonToForm("CreateModule", "type", "type");'>{$name}</a>
<script>ModuleBuilder.buttonAdd('type_{$type}', '{$type}', 'type');</script>
</td>
{else}
<td align='center'>{sugar_image name=$type width=48 height=48}<br>
{$name}
{/if}
</td>
{/if}
{counter name='items'}
{/foreach}
</tr>
</table>
</td>
</tr>
<tr>
<td height='100%'>&nbsp;</td><td>&nbsp;</td>
</tr>
</table>
{literal}
<script>
addForm('CreateModule');
addToValidate('CreateModule', 'name', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_NAME}{literal}');
addToValidate('CreateModule', 'label', 'varchar', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_LABEL}{literal}');
addToValidate('CreateModule', 'type', 'varchar', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_TYPE}{literal}');
ModuleBuilder.helpRegister('CreateModule');
if(document.getElementById('factory_modules'))
ModuleBuilder.helpRegisterByID('factory_modules', 'table');
ModuleBuilder.helpSetup({/literal}'{$module->help.group}','{$module->help.default}'{literal});
ModuleBuilder.MBpackage = '{/literal}{$module->package}{literal}';
ModuleBuilder.module = '{/literal}{$module->name}{literal}';
</script>
{/literal}
{include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}

View File

@@ -0,0 +1,46 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
$dictionary['{{$class.name}}'] = array(
'table'=>'{{$class.table_name}}',
'audited'=>{{$class.audited}},
'fields'=>{{$class.fields_string}},
'relationships'=>{{$class.relationships}},
'optimistic_locking'=>true,
);
if (!class_exists('VardefManager')){
require_once('include/SugarObjects/VardefManager.php');
}
VardefManager::createVardef('{{$class.name}}','{{$class.name}}', array({{$class.templates}}));

View File

@@ -0,0 +1,38 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<img src="{sugar_getimagepath file='img_loading.gif'}" align="absmiddle" />&nbsp;{$message} {$package}
<script type='text/javascript' language='Javascript'>ModuleBuilder.beginDeploy('{$package}');</script>

View File

@@ -0,0 +1,167 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name='CreatePackage' id='CreatePackage'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='SavePackage'>
<input type='hidden' name='duplicate' value='0'>
<input type='hidden' name='to_pdf' value='1'>
<input type='hidden' name='original_name' value='{$package->name}'>
<h2>{$package->title}</h2>
<table class='mbTable' >
<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;
{if !empty($package->name)}
<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');">
&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});">
&nbsp;<input style="padding-bottom:0px;" type='button' name='publishbtn' value='{$mod_strings.LBL_BTN_PUBLISH}' class='button' onclick="ModuleBuilder.packagePublish('CreatePackage');">
&nbsp;<input style="padding-bottom:0px;" type='button' name='exportbtn' value='{$mod_strings.LBL_BTN_EXP}' class='button' onclick="ModuleBuilder.packageExport('CreatePackage');">
&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>
<tr>
<td height='100%'>&nbsp;</td><td>&nbsp;</td>
</tr>
{if !empty($package->name)}
<tr><td class='mbLBL' ><b>{$mod_strings.LBL_LAST_MODIFIED}</b></td><td>{$package->date_modified}</td></tr>
{/if}
<tr>
<td class='mbLBL' ><font color="#ff0000"> * </font><b>{$mod_strings.LBL_PACKAGE_NAME}</b></td><td>
<input type='text' name='name' size=50 value={$package->name}>
</td>
</tr>
<tr>
<td class='mbLBL' ><b>{$mod_strings.LBL_AUTHOR}</b></td><td><input type='text' name='author' size=50 value={$package->author}></td>
</tr>
<tr>
<td class='mbLBL' ><font color="#ff0000"> * </font><b>{$mod_strings.LBL_KEY}</b></td>
<td>
{if empty($package->key)}
<input type='text' name='key' size=5 maxlength=5 value={$package->key}>
{else}
{$package->key}<input type='hidden' name='key' size=5 maxlength=5 value={$package->key}>
{/if}
</td>
</tr>
<tr>
<td class='mbLBL' ><b>{$mod_strings.LBL_DESCRIPTION}</b></td><td><textarea name='description' cols=60 rows=5>{$package->description}</textarea></td>
</tr>
<tr>
<td></td><td id='readme'><img id="options" border="0" alt="Hide Options" src="{sugar_getimagepath file='advanced_search.gif'}"><a style="text-decoration:none" href="javascript: void(0)" onclick ="toggleEl('readmefield');"><b>{$mod_strings.LBL_ADD_README}</b></a></td>
</tr>
<tr>
<td height='100%'>&nbsp;</td><td>&nbsp;</td>
</tr>
<tr id='readmefield' style="display:none;">
<td></td>
<td ><textarea name='readme' cols=60 rows=10>{$package->readme}</textarea></td>
</tr>
{if !empty($package->name)}
<tr>
<td class='mbLBL'><b>{$mod_strings.LBL_MODULES}</b></td>
<td >
<table>
<tr id="package_modules">
{counter name='items' assign='items' start=1}
<td align='center'>
<table id="new_module" onclick="ModuleBuilder.addModule('{$package->name}')" class='wizardButton' onmousedown="ModuleBuilder.buttonDown(this);return false;" onmouseout="ModuleBuilder.buttonOut(this);">
<tr>
<td align='center'>{sugar_image name="NewModule" width=48 height=48}</td>
</tr>
<tr><td>
<a class='studiolink' href="javascript:void(0)" onclick="ModuleBuilder.addModule('{$package->name}')">
{$mod_strings.LBL_NEW_MODULE}</a>
</td></tr>
</table>
</td>
{foreach from=$package->moduleTypes key='name' item='type'}
{assign var='imgurl' value=$type|cat:'_32'}
{if $items % 4 == 0 && $items != 0}
</tr><tr>
{/if}
<td align='center'>
<table id= "existing_module" onclick="ModuleBuilder.viewModule('{$package->name}', '{$name}')" class='wizardButton' onmousedown="ModuleBuilder.buttonDown(this);return false;" onmouseout="ModuleBuilder.buttonOut(this);">
<tr>
<td align='center'>{sugar_image name=$type width=48 height=48}</td>
</tr><tr><td align='center'>
<a class='studiolink' href="javascript:void(0)" onclick="ModuleBuilder.viewModule('{$package->name}', '{$name}')">
{$name}</a>
</td></tr>
</table></td>
{counter name='items'}
{/foreach}
</tr>
</table>
</td>
</tr>
{/if}
<tr>
<td height='100%'>&nbsp;</td><td>&nbsp;</td>
</tr>
</table>
</form>
{literal}
<script>
addForm('CreatePackage');
addToValidate('CreatePackage', 'name', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_NAME}{literal}');
addToValidate('CreatePackage', 'key', 'DBName', true, '{/literal}{$mod_strings.LBL_JS_VALIDATE_KEY}{literal}');
ModuleBuilder.helpRegister('CreatePackage');
ModuleBuilder.helpRegisterByID('CreatePackage','td');
if(document.getElementById('package_modules'))
ModuleBuilder.helpRegisterByID('package_modules', 'table');
ModuleBuilder.helpSetup({/literal}'{$package->help.group}','{$package->help.default}'{literal});
function toggleEl(){
var display = document.getElementById('readmefield').style.display;
if(display=='table-row' || display=='inline-block'){
document.getElementById('options').src = "{/literal}{sugar_getimagepath file='advanced_search.gif'}{literal}";
document.getElementById('readmefield').style.display ='none';
}else if (display=='none'){
document.getElementById('options').src = "{/literal}{sugar_getimagepath file='basic_search.gif'}{literal}";
document.getElementById('readmefield').style.display = (navigator.appName=="Microsoft Internet Explorer")? 'inline-block' : 'table-row';
}
}
</script>
{/literal}
{include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}

View File

@@ -0,0 +1,119 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<table id='layoutEditorButtons' cellspacing='2'>
<tr>
{$buttons}
</tr>
</table>
<div id='layoutEditor' style="width:675px;">
<div id='toolbox' style='display:none';>
</div>
<div id='panels' style='float:left; overflow-y:auto; overflow-x:hidden'>
<h3>{$layouttitle}</h3>
{foreach from=$layout item='panel' key='panelid'}
<div class='le_panel' id='{$idCount}'>
<div class='panel_label' id='le_panellabel_{$idCount}'>
<span class='panel_name' id='le_panelname_{$idCount}'>
{capture name=panel_upper assign=panel_upper}{$panelid|upper}{/capture}
{if $panelid eq 'default'}
{$mod.LBL_DEFAULT}
{elseif $from_mb && isset($current_mod_strings.$panel_upper)}
{$current_mod_strings.$panel_upper}
{elseif !empty($translate)}
{sugar_translate label=$panelid|upper module=$language}
{else}
{$panelid}
{/if}</span>
<span class='panel_id' id='le_panelid_{$idCount}'>{$panelid}</span>
</div>
{if $panelid ne 'default'}
{/if}
{counter name='idCount' assign='idCount' print=false}
{foreach from=$panel item='row' key='rid'}
<div class='le_row' id='{$idCount}'>
{counter name='idCount' assign='idCount' print=false}
{foreach from=$row item='col' key='cid'}
<div class='le_field' id='{$idCount}'>
{if ! $fromModuleBuilder && ($col.name != '(filler)')}
{/if}
{if isset($col.type) && ($col.type == 'address')}
{$icon_address}
{/if}
{if isset($col.type) && ($col.type == 'phone')}
{$icon_phone}
{/if}
<span id='le_label_{$idCount}'>
{eval var=$col.label assign='label'}
{if !empty($translate) && !empty($col.label)}
{sugar_translate label=$label module=$language}
{else}
{if !empty($current_mod_strings[$label])}
{$current_mod_strings[$label]}
{elseif !empty($mod[$label])}
{$mod[$label]}
{else}
{$label}
{/if}
{/if}</span>
<span class='field_name'>{$col.name}</span>
<span class='field_label'>{$col.label}</span>
<span id='le_tabindex_{$idCount}' class='field_tabindex'>{$col.tabindex}</span>
</div>
{counter name='idCount' assign='idCount' print=false}
{/foreach}
</div>
{/foreach}
</div>
{/foreach}
</div>
<input type='hidden' id='idCount' value='{$idCount}'>
</div>

View File

@@ -0,0 +1,86 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/ListEditor.css" />
<table class="preview-content">
<td>
{counter start=0 name="groupCounter" print=false assign="groupCounter"}
{foreach from=$groups key='label' item='list'}
{counter name="groupCounter"}
{/foreach}
{math assign="groupWidth" equation="100/$groupCounter-5"}
{counter start=0 name="slotCounter" print=false assign="slotCounter"}
{counter start=0 name="modCounter" print=false assign="modCounter"}
{foreach from=$groups key='label' item='list'}
<div style="float: left; border: 1px gray solid; padding:4px; margin-right:4px; margin-top: 8px; width:{$groupWidth}%;">
<h3 >{$label}</h3>
<ul>
{foreach from=$list key='key' item='value'}
<li name="width={$value.width}%" class='draggable' style='cursor:default;'>
<table width='100%'>
<tr>
<td style="font-weight: bold;">{if !empty($value.label)}{sugar_translate label=$value.label module=$language}{else}{$key}{/if}</td>
<td></td>
</tr>
<tr class='fieldValue' style='cursor:default;'>
{if empty($hideKeys)}<td>[{$key}]</td>{/if}
<td align="right" colspan="2"><span>{$value.width}</span><span>%</span></td>
</tr>
</table>
</li>
{counter name="modCounter"}
{/foreach}
<li class='noBullet'>&nbsp;</li>
</ul>
</div>
{counter name="slotCounter"}
{/foreach}
</td>
</tr></table>

View File

@@ -0,0 +1,54 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<script>
{literal}
if(typeof(Assistant)!="undefined" && Assistant.mbAssistant){
//Assistant.mbAssistant.render(document.body);
{/literal}
{if $userPref }
Assistant.processUserPref("{$userPref}");
{/if}
{if $assistant.key && $assistant.group}
Assistant.mbAssistant.setBody(SUGAR.language.get('ModuleBuilder','assistantHelp').{$assistant.group}.{$assistant.key});
{/if}
{literal}
if(Assistant.mbAssistant.visible){
Assistant.mbAssistant.show();
}
}
{/literal}
</script>

View File

@@ -0,0 +1,108 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name="editProperty" id="editProperty" onsubmit='return false;'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='saveProperty'>
<input type='hidden' name='view_module' value='{$view_module}'>
{if isset($view_package)}<input type='hidden' name='view_package' value='{$view_package}'>{/if}
<input type='hidden' name='subpanel' value='{$subpanel}'>
<input type='hidden' name='to_pdf' value='true'>
{if isset($MB)}
<input type='hidden' name='MB' value='{$MB}'>
<input type='hidden' name='view_package' value='{$view_package}'>
{/if}
{literal}
<script>
function saveAction() {
for(var i=0;i<document.editProperty.elements.length;i++)
{
var field = document.editProperty.elements[i];
if (field.className.indexOf('save') != -1 )
{
if (field.value != 'no_change')
{
var property = field.name.substring('editProperty_'.length);
var id = field.id.substring('editProperty_'.length);
document.getElementById(id).innerHTML = field.value;
}
}
}
}
function switchLanguage( language )
{
{/literal}
var request = 'module=ModuleBuilder&action=editProperty&view_module={$editModule}&selected_lang=' + language ;
{foreach from=$properties key='key' item='property'}
request += '&id_{$key}={$property.id}&name_{$key}={$property.name}&title_{$key}={$property.title}&label_{$key}={$property.label}' ;
{/foreach}
{literal}
ModuleBuilder.getContent( request ) ;
}
</script>
{/literal}
<table>
{foreach from=$properties key='key' item='property'}
<tr>
<td width = "50%" align='right'>{if isset($property.title)}{$property.title}{else}{$property.name}{/if}:</td>
<td>
<input class='save' type='hidden' name='{$property.name}' id='editProperty_{$id}{$property.id}' value='no_change'>
{if isset($property.hidden)}
{$property.value}
{else}
<input onchange='document.getElementById("editProperty_{$id}{$property.id}").value = this.value' value='{$property.value}'>
{/if}
</td>
</tr>
{/foreach}
<tr>
<td><input class="button" type="Button" name="save" value="{$APP.LBL_SAVE_BUTTON_LABEL}" onclick="saveAction(); ModuleBuilder.submitForm('editProperty'); ModuleBuilder.closeAllTabs();"></td>
</tr>
</table>
</form>
<script>
ModuleBuilder.helpSetup('layoutEditor','property', 'east');
</script>

View File

@@ -0,0 +1,114 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name="exportcustom" id="exportcustom">
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='ExportCustom'>
<div align="left">
<input type="submit" class="button" name="exportCustomBtn" value="{$mod_strings.LBL_EC_EXPORTBTN}" onclick="return check_form('exportcustom');">
</div>
<br>
<table class="mbTable">
<tbody>
<tr>
<td class="mbLBL">
<b><font color="#ff0000">*</font> {$mod_strings.LBL_EC_NAME} </b>
</td>
<td>
<input type="text" value="" size="50" name="name"/>
</td>
</tr>
<tr>
<td class="mbLBL">
<b>{$mod_strings.LBL_EC_AUTHOR} </b>
</td>
<td>
<input type="text" value="" size="50" name="author"/>
</td>
</tr>
<tr>
<td class="mbLBL">
<b>{$mod_strings.LBL_EC_DESCRIPTION} </b>
</td>
<td>
<textarea rows="3" cols="60" name="description"></textarea>
</td>
</tr>
<tr>
<td height="100%"/>
<td/>
</tr>
</tbody>
</table>
<table border="0" CELLSPACING="15" WIDTH="100%">
<TR><input type="hidden" name="hiddenCount"></TR>
{foreach from=$modules key=k item=i}
<TR>
<TD><h3 style='margin-bottom:20px;'>{if $i != ""}<INPUT onchange="updateCount(this);" type="checkbox" name="modules[]" value={$k}>{/if}{$moduleList[$k]}</h3></TD>
<TD VALIGN="top">
{foreach from=$i item=j}
{$j}<br>
{/foreach}
</TD>
</TR>
{/foreach}
</table>
<br>
</form>
{literal}
<script type="text/javascript">
var boxChecked = 0;
function updateCount(box) {
boxChecked = box.checked == true ? ++boxChecked : --boxChecked;
document.exportcustom.hiddenCount.value = (boxChecked == 0 ? "" : "CHECKED");
}
{/literal}
ModuleBuilder.helpRegister('exportcustom');
ModuleBuilder.helpSetup('exportcustom','exportHelp');
addToValidate('exportcustom', 'hiddenCount', 'varchar', true, '{$mod_strings.LBL_EC_CHECKERROR}');
addToValidate('exportcustom', 'name', 'varchar', true, '{$mod_strings.LBL_PACKAGE_NAME}'{literal});
</script>
{/literal}
{include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}

View File

@@ -0,0 +1,49 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<table class="tabform" ><tr><th>{sugar_translate label='LBL_HISTORY_TIMESTAMP' module='ModuleBuilder'}</th><th>&nbsp;</th><th>&nbsp;</th></tr>
{if empty($snapshots)}
<tr><td class='mbLBLL'>{sugar_translate label='ERROR_NO_HISTORY' module='ModuleBuilder'}</td></tr>
{/if}
{foreach from=$snapshots item='timestamp' key='id'}
<tr>
<td class="oddListRowS1"><a onclick="ModuleBuilder.history.preview('{$view_module}', '{$view}', '{$id}', '{$subpanel}');" href="javascript:void(0);">
{$timestamp}</a></td>
<td width="1%"><input type='button' value="{sugar_translate label='LBL_MB_PREVIEW' module='ModuleBuilder'}" onclick="ModuleBuilder.history.preview('{$view_module}', '{$view}', '{$id}', '{$subpanel}');"/></td>
<td width="1%"><input type='button' value="{sugar_translate label='LBL_MB_RESTORE' module='ModuleBuilder'}" onclick="ModuleBuilder.history.revert('{$view_module}', '{$view}', '{$id}', '{$subpanel}');"/></td>
</tr>
{/foreach}
</table>

View File

@@ -0,0 +1,66 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<script type="text/javascript" src="modules/ModuleBuilder/javascript/JSTransaction.js" ></script>
<script>
var jstransaction = new JSTransaction();
{literal}
if (SUGAR.themes.tempHideLeftCol){
SUGAR.themes.tempHideLeftCol();
}
{/literal}
</script>
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file="modules/ModuleBuilder/tpls/LayoutEditor.css"}" />
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file="include/ytree/TreeView/css/folders/tree.css"}" />
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studio2.js'}' ></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studio2PanelDD.js'}' ></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studio2RowDD.js'}' ></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studio2FieldDD.js'}' ></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studiotabgroups.js'}'></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/studio2ListDD.js'}' ></script>
<!--end ModuleBuilder Assistant!-->
<script type="text/javascript" language="Javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/ModuleBuilder.js'}'></script>
<script type="text/javascript" language="Javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/SimpleList.js'}'></script>
<script type="text/javascript" src='{sugar_getjspath file ='modules/ModuleBuilder/javascript/JSTransaction.js'}' ></script>
<script type="text/javascript" src='{sugar_getjspath file ='include/javascript/tiny_mce/tiny_mce.js'}' ></script>
<script src='{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}' type="text/javascript"></script>
<!-- <script type="text/javascript" language="Javascript" src="modules/Studio/studio.js"></script> -->
<link rel="stylesheet" type="text/css" href="{sugar_getjspath file="modules/ModuleBuilder/tpls/MB.css"}" />

View File

@@ -0,0 +1,94 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<iframe id="yui-history-iframe" src="index.php?entryPoint=getImage&imageName=sugar-yui-sprites-grey.png"></iframe>
<input id="yui-history-field" type="hidden">
<div class='ytheme-gray' id='mblayout' style="position:relative; height:0px; overflow:visible;">
</div>
<div id='mbcenter'>
<div id='mbtabs'></div>
{$CENTER}
</div>
<div id='mbeast' class="x-layout-inactive-content">
{$PROPERTIES}
</div>
<div id='mbeast2' class="x-layout-inactive-content">
</div>
<div id='mbhelp' class="x-hidden"></div>
<div id='mbwest' class="x-hidden">
<div id='package_tree' class="x-hidden"></div>
{$TREE}
</div>
<div id='mbsouth' class="x-hidden">
</div>
{$tiny}
<script>
ModuleBuilder.setMode('{$TYPE}');
closeMenus();
{literal}
//document.getElementById('HideHandle').parentNode.style.display = 'none';
var MBLoader = new YAHOO.util.YUILoader({
require : ["layout", "element", "tabview", "treeview", "history", "cookie", "sugarwidgets"],
loadOptional: true,
skin: { base: 'blank', defaultSkin: '' },
onSuccess: ModuleBuilder.init,
allowRollup: true,
base: "include/javascript/yui/build/"
});
MBLoader.addModule({
name :"sugarwidgets",
type : "js",
fullpath: "include/javascript/sugarwidgets/SugarYUIWidgets.js",
varName: "YAHOO.SUGAR",
requires: ["datatable", "dragdrop", "treeview", "tabview"]
});
MBLoader.insert();
{/literal}
</script>
<div id="footerHTML" class="y-hidden">
<table width="100%" cellpadding="0" cellspacing="0"><tr><td nowrap="nowrap">
<input type="button" class="button" value="{$mod.LBL_HOME}" onclick="ModuleBuilder.main('home');">
{if $TEST_STUDIO == true}
<input type="button" class="button" value="{$mod.LBL_STUDIO}" onclick="ModuleBuilder.main('studio');">
{/if}
{if $ADMIN == true}
<input type="button" class="button" value="{$mod.LBL_MODULEBUILDER}" onclick="ModuleBuilder.main('mb');">
{/if}
<input type="button" class="button" value="{$mod.LBL_DROPDOWNEDITOR}" onclick="ModuleBuilder.main('dropdowns');">
</td></tr></table>
</div>
{include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}

View File

@@ -0,0 +1,79 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name = 'editlabels' id = 'editlabels' onsubmit='return false;'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='saveLabels'>
<input type='hidden' name='view_module' value='{$view_module}'>
{if $view_package}
<input type='hidden' name='view_package' value='{$view_package}'>
{/if}
{if $inPropertiesTab}
<input type='hidden' name='editLayout' value='{$editLayout}'>
{elseif $mb}
<input class='button' name = 'saveBtn' id = "saveBtn" type='button' value='{$mod_strings.LBL_BTN_SAVE}' onclick='ModuleBuilder.handleSave("editlabels" );'>
{else}
<input class='button' name = 'publishBtn' id = "publishBtn" type='button' value='{$mod_strings.LBL_BTN_SAVEPUBLISH}' onclick='ModuleBuilder.handleSave("editlabels" );'>
{/if}
<hr >
<input type='hidden' name='to_pdf' value='1'>
<table class='mbLBL'>
<tr>
<td align="right">
{$mod_strings.LBL_LANGUAGE}&nbsp&nbsp
</td>
<td align='left'>
{html_options name='selected_lang' options=$available_languages selected=$selected_lang onchange='this.form.action.value="EditLabels";ModuleBuilder.handleSave("editlabels")'}
</td>
{foreach from=$MOD item='label' key='key'}
<tr>
<td align="right">{$key}:&nbsp&nbsp</td>
<td><input type='hidden' name='label_{$key}' id='label_{$key}' value='no_change'><input onchange='document.getElementById("label_{$key}").value = this.value; ModuleBuilder.state.isDirty=true;' value='{$label}' size='60'></td>
</tr>
{/foreach}
</table>
{if $inPropertiesTab}
<input class='button' type='button' value='{$APP.LBL_CANCEL_BUTTON_LABEL}' onclick="ModuleBuilder.hidePropertiesTab();">
{/if}
</form>
<script>
//ModuleBuilder.helpRegisterByID('editlabels', 'a');
ModuleBuilder.helpRegister('editlabels');
ModuleBuilder.helpSetup('labelsHelp','default');
</script>

View File

@@ -0,0 +1,292 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<table id='layoutEditorButtons' cellspacing='2'>
<tr>
{$buttons}
{if empty($disable_tabs)}
<td><input type="checkbox" {if $displayAsTabs}checked="true"{/if} id="tabsCheckbox" onclick="document.forms.prepareForSave.panels_as_tabs.value=this.checked">
{sugar_translate label="LBL_TAB_PANELS" module="ModuleBuilder"}&nbsp;{sugar_help text=$mod.LBL_TAB_PANELS_HELP}
</input></td>
{/if}
</tr>
</table>
<div id='layoutEditor' style="width:675px;">
<input type='hidden' id='fieldwidth' value='{$fieldwidth}'>
<input type='hidden' id='maxColumns' value='{$maxColumns}'>
<input type='hidden' id='nextPanelId' value='{$nextPanelId}'>
<div id='toolbox' style='float:left; overflow-y:auto; overflow-x:hidden';>
<h2 style='margin-bottom:20px;'>{$mod.LBL_TOOLBOX}</h2>
<div id='delete'>
{sugar_image name=Delete width=48 height=48}
</div>
{if ! isset($fromPortal) && ! isset($wireless) && empty($single_panel)}
<div id='panelproxy'></div>
{/if}
<div id='rowproxy'></div>
<div id='availablefields'>
<p id='fillerproxy'></p>
{counter name='idCount' assign='idCount' start='1'}
{foreach from=$available_fields item='col' key='id'}
<div class='le_field' id='{$idCount}'>
{if ! $fromModuleBuilder && ($col.name != '(filler)')}
<img class='le_edit' src="{sugar_getimagepath file='edit_inline.gif'}" style='float:right; cursor:pointer;' onclick="editFieldProperties('{$idCount}', '{$col.label}');" />
{/if}
{if isset($col.type) && ($col.type == 'address')}
{$icon_address}
{/if}
{if isset($col.type) && ($col.type == 'phone')}
{$icon_phone}
{/if}
<span id='le_label_{$idCount}'>
{if !empty($translate) && !empty($col.label)}
{eval var=$col.label assign='newLabel'}
{if $from_mb}
{$current_mod_strings[$newLabel]}
{else}
{sugar_translate label=$newLabel module=$language}
{/if}
{else}
{assign var='label' value=$col.label}
{if !empty($current_mod_strings[$label])}
{$current_mod_strings[$label]}
{else}
{$label}
{/if}
{/if}</span>
<span class='field_name'>{$col.name}</span>
<span class='field_label'>{$col.label}</span>
<span id='le_tabindex_{$idCount}' class='field_tabindex'>{$col.tabindex}</span>
</div>
{counter name='idCount' assign='idCount' print=false}
{/foreach}
</div>
</div>
<div id='panels' style='float:left; overflow-y:auto; overflow-x:hidden'>
<h3>{$layouttitle}</h3>
{foreach from=$layout item='panel' key='panelid'}
<div class='le_panel' id='{$idCount}'>
<div class='panel_label' id='le_panellabel_{$idCount}'>
<span class='panel_name' id='le_panelname_{$idCount}'>
{capture name=panel_upper assign=panel_upper}{$panelid|upper}{/capture}
{if $panelid eq 'default'}
{$mod.LBL_DEFAULT}
{elseif $from_mb && isset($current_mod_strings.$panel_upper)}
{$current_mod_strings.$panel_upper}
{elseif !empty($translate)}
{sugar_translate label=$panelid|upper module=$language}
{else}
{$panelid}
{/if}</span>
<span class='panel_id' id='le_panelid_{$idCount}'>{$panelid}</span>
</div>
{if $panelid ne 'default'}
<img class='le_edit' src="{sugar_getimagepath file='edit_inline.gif'}" style='float:right; cursor:pointer;' onclick="editPanelProperties('{$idCount}')" />
{/if}
{counter name='idCount' assign='idCount' print=false}
{foreach from=$panel item='row' key='rid'}
<div class='le_row' id='{$idCount}'>
{counter name='idCount' assign='idCount' print=false}
{foreach from=$row item='col' key='cid'}
<div class='le_field' id='{$idCount}'>
{if ! $fromModuleBuilder && ($col.name != '(filler)')}
<img class='le_edit' src="{sugar_getimagepath file='edit_inline.gif'}"
style='float:right; cursor:pointer;'
onclick="editFieldProperties('{$idCount}', '{$col.label}');" />
{/if}
{if isset($col.type) && ($col.type == 'address')}
{$icon_address}
{/if}
{if isset($col.type) && ($col.type == 'phone')}
{$icon_phone}
{/if}
<span id='le_label_{$idCount}'>
{eval var=$col.label assign='label'}
{if !empty($translate) && !empty($col.label)}
{sugar_translate label=$label module=$language}
{else}
{if !empty($current_mod_strings[$label])}
{$current_mod_strings[$label]}
{elseif !empty($mod[$label])}
{$mod[$label]}
{else}
{$label}
{/if}
{/if}</span>
<span class='field_name'>{$col.name}</span>
<span class='field_label'>{$col.label}</span>
<span id='le_tabindex_{$idCount}' class='field_tabindex'>{$col.tabindex}</span>
</div>
{counter name='idCount' assign='idCount' print=false}
{/foreach}
</div>
{/foreach}
</div>
{/foreach}
</div>
<input type='hidden' id='idCount' value='{$idCount}'>
</div>
<form name='prepareForSave' id='prepareForSave' action='index.php'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='view_module' value='{$view_module}'>
<input type='hidden' name='view' value='{$view}'>
<input type='hidden' name="panels_as_tabs" value='{$displayAsTabs}'>
{if $fromPortal}
<input type='hidden' name='PORTAL' value='1'>
{/if}
{if $fromModuleBuilder}
<input type='hidden' name='MB' value='1'>
<input type='hidden' name='view_package' value='{$view_package}'>
{/if}
<input type='hidden' name='to_pdf' value='1'>
</form>
<script>
{literal}
function editPanelProperties(panelId, view) {
panelId = "" + panelId;
var key_label = document.getElementById('le_panelid_' + panelId).innerHTML.replace(/^\s+|\s+$/g,'');
var value_label = document.getElementById('le_panelname_' + panelId).innerHTML.replace(/^\s+|\s+$/g,'');
var params = "module=ModuleBuilder&action=editProperty&view_module=" + ModuleBuilder.module
+ (ModuleBuilder.package ? "&view_package=" + ModuleBuilder.package : "")
+ "&view=" + view + "&id_label=le_panelname_" + panelId + "&name_label=label_" + key_label.toUpperCase()
+ "&title_label=" + SUGAR.language.get("ModuleBuilder", "LBL_LABEL_TITLE") + "&value_label=" + value_label;
ModuleBuilder.getContent(params);
}
{/literal}
function editFieldProperties(idCount, label) {ldelim}
var value_label = document.getElementById('le_label_' + idCount).innerHTML.replace(/^\s+|\s+$/g,'');
var value_tabindex = document.getElementById('le_tabindex_' + idCount).innerHTML.replace(/^\s+|\s+$/g,'');
ModuleBuilder.getContent(
'module=ModuleBuilder&action=editProperty'
+ '&view_module={$view_module}' + '{if $fromModuleBuilder}&view_package={$view_package}{/if}'
+ '&view={$view}&id_label=le_label_' + idCount
+ '&name_label=label_' + label + '&title_label={sugar_translate label="LBL_LABEL_TITLE" module="ModuleBuilder"}'
+ '&value_label=' + value_label + '&id_tabindex=le_tabindex_' + idCount
+ '&title_tabindex={sugar_translate label="LBL_TAB_ORDER" module="ModuleBuilder"}'
+ '&name_tabindex=tabindex&value_tabindex=' + value_tabindex );
{rdelim}
Studio2.init();
if('{$view}'.toLowerCase() != 'editview')
ModuleBuilder.helpSetup('layoutEditor','default'+'{$view}'.toLowerCase());
if('{$from_mb}')
ModuleBuilder.helpUnregisterByID('saveBtn');
ModuleBuilder.MBpackage = "{$view_package}";
Studio2.requiredFields = [{$required_fields}];
{literal}
//rrs: this is for IE 7 which only supports javascript 1.6 and does not have indexOf support.
if (!Array.indexOf) {
Array.prototype.indexOf = function (obj, start) {
for (var i = (start || 0); i < this.length; i++) {
if (this[i] == obj) {
return i;
}
}
return -1;
}
}
Studio2.checkGridLayout = function()
{
if (Studio2.countGridFields() == 0) {
ModuleBuilder.layoutValidation.popup() ;
return false;
}
{/literal}
{if $view != "detailview"}
return Studio2.checkRequiredFields();
{else}
return true;
{/if}
{literal}
}
Studio2.countGridFields = function() {
var count = 0;
var divs = document.getElementById( 'panels' ).getElementsByTagName( 'div' ) ;
for ( var j=0;j<divs.length;j++) {
if (divs[j].className == 'le_field')
count++;
}
return count;
};
Studio2.checkRequiredFields = function(){
var Dom = YAHOO.util.Dom;
var availablefields = Dom.get('availablefields');
var fields = Dom.getElementsByClassName('field_name', '', 'availablefields');
var missing = [ ];
for(field in fields){
if (Studio2.requiredFields.indexOf(fields[field].innerHTML) != -1) {
missing[missing.length] = fields[field].innerHTML;
}
}
if (missing.length > 0)
{
var msg = SUGAR.language.get("ModuleBuilder", "ERROR_REQUIRED_FIELDS");
for (var i = 0; i < missing.length; i++) {
msg += '"' + missing[i] + '"';
if (i != missing.length - 1)
msg += ",";
}
return window.confirm(msg);
}
return true;
};
{/literal}
ModuleBuilder.module = "{$view_module}";
ModuleBuilder.package={if $fromModuleBuilder}"{$view_package}"{else}false{/if};
</script>

View File

@@ -0,0 +1,215 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name='edittabs' id='edittabs' method='POST' action='index.php'>
{literal}
<script>
studiotabs.reset();
</script>
{/literal}
<input type='hidden' name='action' value={$action}>
<input type='hidden' name='view' value={$view}>
<input type='hidden' name='module' value='{$module}'>
<input type='hidden' name='subpanel' value='{$subpanel}'>
<input type='hidden' name='local' value='{$local}'>
<input type='hidden' name='view_module' value='{$view_module}'>
{if $fromPortal}
<input type='hidden' name='PORTAL' value='1'>
{/if}
<input type='hidden' name='view_package' value='{$view_package}'>
<input type='hidden' name='to_pdf' value='1'>
<link rel="stylesheet" type="text/css" href="modules/ModuleBuilder/tpls/ListEditor.css"/>
<table id="editor-content" class="list-editor">
<tr><td colspan=3>{$buttons}</td></tr>
{if isset($subpanel) && isset($subpanel_label)}
<tr>
<td colspan=3>
<span class='mbLBL'>{sugar_translate label='LBL_SUBPANEL_TITLE'}</span>
<input id ="subpanel_title" type="text" name="subpanel_title" value="{$subpanel_title}">
<input id ="subpanel_title_key" type="hidden" name="subpanel_title_key" value="{$subpanel_label}">
</td>
</tr>
{/if}
<tr>
{counter start=0 name="groupCounter" print=false assign="groupCounter"}
{foreach from=$groups key='label' item='list'}
{counter name="groupCounter"}
{/foreach}
{math assign="groupWidth" equation="100/$groupCounter-3"}
{counter start=0 name="slotCounter" print=false assign="slotCounter"}
{counter start=0 name="modCounter" print=false assign="modCounter"}
{foreach from=$groups key='label' item='list'}
<td id={$label} style="float: left; border: 1px gray solid; padding:4px; margin-right:4px; margin-top: 8px; overflow-x: hidden; width: 30%; vertical-align: text-top;">
<h3 >{$label}</h3>
<ul id='ul{$slotCounter}' style="overflow-y: auto; overflow-x: hidden;">
{foreach from=$list key='key' item='value'}
<li name="width={$value.width}%" id='subslot{$modCounter}' class='draggable' >
<table width='100%'>
<tr>
<td id='subslot{$modCounter}label' style="font-weight: bold;">
{if $MB}
{if !empty($value.label)}{$current_mod_strings[$value.label]}{elseif !empty($value.vname)}{$current_mod_strings[$value.vname]}{else}{$key}{/if}
{else}
{if !empty($value.label)}{sugar_translate label=$value.label module=$language}{elseif !empty($value.vname)}{sugar_translate label=$value.vname module=$language}{else}{$key}{/if}
{/if}
</td>
<td></td>
<td align="right">
<img src="{sugar_getimagepath file='edit_inline.gif'}" style="cursor: pointer;"
onclick="var value_label = document.getElementById('subslot{$modCounter}label').innerHTML.replace(/^\s+|\s+$/g,'');
{if !($view|substr:-6 == "search") }
var value_width = document.getElementById('subslot{$modCounter}width').innerHTML;
{/if}
ModuleBuilder.getContent('module=ModuleBuilder&action=editProperty&view_module={$view_module}'+
'{if isset($subpanel)}&subpanel={$subpanel}{/if}'+
'{if $MB}&MB={$MB}&view_package={$view_package}{/if}'+
'&id_label=subslot{$modCounter}label'+
'&name_label=label_'+
'{if isset($value.label)}{$value.label}'+
'{elseif !empty($value.vname)}{$value.vname}'+
'{else}{$key}{/if}'+
'&title_label={$MOD.LBL_LABEL_TITLE}&value_label=' + value_label
{if ($view|substr:-6 != "search") }
+ '&id_width=subslot{$modCounter}width&name_width={$MOD.LBL_WIDTH}&value_width=' + value_width
{/if}
);"
>
</td>
</tr>
<tr class='fieldValue'>
{if empty($hideKeys)}<td>[{$key}]</td>{/if}
<td align="right" colspan="2">
{if $view|substr:-6 == "search" }
<span style="display:none" id='subslot{$modCounter}width'>{$value.width}</span> <span style="display:none">%</span>
{else}
<span id='subslot{$modCounter}width'>{$value.width}</span> <span>%</span>
{/if}
</td>
</tr>
</table>
</li>
<script>
studiotabs.tabLabelToValue['{$value.label}|{$key}'] = '{$key}';
if(typeof(studiotabs.subtabModules['subslot{$modCounter}']) == 'undefined')studiotabs.subtabModules['subslot{$modCounter}'] = '{$value.label}|{$key}';
</script>
{counter name="modCounter"}
{/foreach}
<li id='topslot{$slotCounter}' class='noBullet'>&nbsp;</li>
</ul>
</td>
{counter name="slotCounter"}
{/foreach}
</td>
</tr></table>
<script>
{literal}
function dragDropInit(){
studiotabs.fields = {};
studiotabs.slotCount = {/literal}{$slotCounter};
studiotabs.modCount = {$modCounter};
{literal}
for(msi = 0; msi < studiotabs.slotCount ; msi++){
studiotabs.fields["topslot"+ msi] = new Studio2.ListDD("topslot" + msi, "subTabs", true);
}
for(msi = 0; msi < studiotabs.modCount ; msi++){
studiotabs.fields["subslot"+ msi] = new Studio2.ListDD("subslot" + msi, "subTabs", false);
}
studiotabs.fields["subslot"+ (msi - 1) ].updateTabs();
};
resizeDDLists = function() {
var Dom = YAHOO.util.Dom;
var body = document.getElementById('mbtabs');
for(var msi = 0; msi < studiotabs.slotCount ; msi++){
var targetHeight = body.offsetHeight - (Dom.getY("ul" + msi) - Dom.getY(body)) - 20;
if (SUGAR.isIE) {
targetHeight -= 10;
}
if (targetHeight > 0 )
Dom.setStyle("ul" + msi, "height", targetHeight + "px");
}
};
function countListFields() {
var count = 0;
var divs = document.getElementById( 'ul0' ).getElementsByTagName( 'li' ) ;
for ( var j=0;j<divs.length;j++) {
if (divs[j].className == 'draggable') count++;
}
return count;
};
{/literal}
dragDropInit();
setTimeout(resizeDDLists, 100);
ModuleBuilder.helpRegister('edittabs');
ModuleBuilder.helpRegisterByID('content', 'div');
ModuleBuilder.helpSetup('{$helpName}', '{$helpDefault}');
if('{$from_mb}')
ModuleBuilder.helpUnregisterByID('savebtn');
ModuleBuilder.MBpackage = '{$view_package}';
</script>
<div id='logDiv' style='display:none'>
</div>
{$additionalFormData}
</form>

View File

@@ -0,0 +1,50 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<h1>Studio</h1>
<div align='center'>
<table cellspacing='40' >
<tr><td colspan='3'>
</td>
</tr>
<tr>
<td align='center' ><div class='button' onmouseout='ModuleBuilder.buttonOut(this, "app", "main");' onmouseover='ModuleBuilder.buttonOver(this);' onmousedown='ModuleBuilder.main("app");'>{sugar_image name='view_inline' height=80 width=80}<br><b>Application</b></div></td>
<td align='center'><div class='button' onmouseout='ModuleBuilder.buttonOut(this, "app", "main");' onmouseover='ModuleBuilder.buttonOver(this);' onmousedown='ModuleBuilder.main("studio");'>{sugar_image name='Themes' height=80 width=80}<br><b>Studio</b></div></td>
<td align='center'><div class='button' onmouseout='ModuleBuilder.buttonOut(this, "builder", "main");' onmouseover='ModuleBuilder.buttonOver(this);' onmousedown='ModuleBuilder.main("mb");'>{sugar_image name='Roles' height=80 width=80}<br><b>ModuleBuilder</b></div></td>
</tr>
</table>
</div>

View File

@@ -0,0 +1,54 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<h3>{sugar_translate label="LBL_REMOVE_CUSTOM"}</h3>
<form name="remove_custom">
<input type="hidden" name="module" value="ModuleBuilder">
<input type="hidden" name="action" value="resetmodule">
<input type="hidden" name="view_module" value="{$module}">
<input type="hidden" name="handle" value="execute">
<ul id="repair_actions">
{foreach from=$actions item='action'}
<li>
<input type="checkbox" name="{$action.name}" value="{$action.name}" checked="checked" />
{$action.label}
</li>
{/foreach}
</ul>
</form>
<button id="execute_repair" onclick="this.disabled = true;
ajaxStatus.showStatus(SUGAR.language.get('ModuleBuilder', 'LBL_AJAX_LOADING'));
ModuleBuilder.submitForm('remove_custom')">{sugar_translate label="LBL_RESET"}</button>

View File

@@ -0,0 +1,227 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<form name='relform' onsubmit='return false;'>
<input type='hidden' name='to_pdf' value='1'>
<input type='hidden' name='module' value='ModuleBuilder'>
<input type='hidden' name='action' value='SaveRelationship'>
<input type='hidden' name='remove_tables' value='true' id="rel_remove_tables">
{if ! empty($view_package)}
<input type='hidden' name='view_package' value='{$view_package}'>
{/if}
<input type='hidden' name='view_module' value='{$view_module}' />
{if $rel.relationship_only}
<input type='hidden' name='relationship_only' value='1'>
{/if}
<table style="width:100%;" class="relform">
<tr>
<td colspan='2' style="padding:5px 5px 15px 5px">
{if !$rel.readonly}
{if empty($view_package)}
<input type='button' name='saverelbtn' value='{$mod_strings.LBL_BTN_SAVEPUBLISH}' onclick='if(check_form("relform"))
{else}
<input type='button' name='saverelbtn' value='{$mod_strings.LBL_BTN_SAVE}' onclick='if(check_form("relform"))
{/if}
ModuleBuilder.submitForm("relform");' class='button'>
{if ! empty($view_package)}
&nbsp;
{/if}
{/if}
{if ($rel.from_studio || $rel.readonly && !$is_new) && $rel.relationship_type != 'one-to-one'}
<input type='button' name='saverelbtn' value='{$mod_strings.LBL_BTN_SAVE}' onclick='if(check_form("relform")){ldelim} this.form.action.value="SaveRelationshipLabel"; ModuleBuilder.submitForm("relform");{rdelim}' class='button'>
{/if}
<input type='button' name='cancelbtn' value='{$mod_strings.LBL_BTN_CANCEL}' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.findTabById("relEditor"));' class='button'>
{if $rel.from_studio || !$rel.readonly && !$is_new}
<input type='button' name='deleterelbtn' value='{$mod_strings.LBL_BTN_DELETE}' onclick='ModuleBuilder.deleteRel()' class='button'>
{/if}
</td>
</tr>
{if empty($view_package) && $rel.relationship_type != 'one-to-one'}
<tr>
<td class='mbLBLL'>
{$mod_strings.LBL_DROPDOWN_LANGUAGE}:&nbsp;
{html_options name='relationship_lang' id='relationship_lang' options=$available_languages selected=$selected_lang onchange='ModuleBuilder.moduleLoadRelationship2(document.relform.relationship_name.value, null, "true");'}
</td>
</tr>
{/if}
<tr >
<td>
{if !empty($rel.relationship_name)}
<span align="right" scope="row">{$mod_strings.LBL_REL_NAME}:&nbsp;</span><span>{$rel.relationship_name}</span>
{/if}
<input type="hidden" value="{$rel.relationship_name}" name="relationship_name" />
</td>
</tr>
<tr><td colspan=2>
<table class="edit view">
<tr><th align="center" colspan=2>{$mod_strings.LBL_LHS_MODULE}</th><th>{$mod_strings.LBL_REL_TYPE}</th><th colspan=2>{$mod_strings.LBL_RHS_MODULE}</th></tr>
<tr>
<td align="right" scope="row">
{sugar_translate label='LBL_MODULE'}:
</td>
<td>
<input name='ignore' value="{sugar_translate label=$module_key}" disabled >
<input type='hidden' name='lhs_module' value='{$module_key}'>
</td>
<td>
{if $rel.readonly}
{html_options disabled=true name="relationship_type" id="relationship_type_field" output=$translated_cardinality values=$cardinality selected=$selected_cardinality }
{else}
{html_options name="relationship_type" id="relationship_type_field" output=$translated_cardinality values=$cardinality selected=$selected_cardinality onchange='ModuleBuilder.moduleLoadRelationship2(document.relform.relationship_name.value);' }
{/if}
</td>
<td align="right" scope="row">
{sugar_translate label='LBL_MODULE'}:
</td>
<td>{if $rel.readonly}
<input name="rhs_module" id="rhs_mod_field" value="{$rel.rhs_module}" disabled>
{else}
{html_options name="rhs_module" id="rhs_mod_field" output=$translated_relatable values=$relatable selected=$rel.rhs_module onchange='ModuleBuilder.moduleLoadRelationship2(document.relform.relationship_name.value, true);'}
{/if}
</td>
</tr>
{if $rel.relationship_only}
<tr>
<td colspan=3>
{$mod_strings.LBL_RELATIONSHIP_ONLY}
</td>
</tr>
{else}
{* add in subpanels and optional extended relationship condition *}
{if !empty($rel.rhs_module) && $rel.relationship_type != 'one-to-one'}
<tr>
{if $rel.relationship_type == 'many-to-many' || $rel.relationship_type == 'many-to-one'}
<td align="right" scope="row">{sugar_translate label="LBL_REL_LABEL"}:</td>
<td><input name="lhs_label" id="lhs_label" value="{$rel.lhs_label}" ></td>
{else}<td></td><td></td>{/if}
<td></td>
{if $rel.relationship_type != 'many-to-one'}
<td align="right" scope="row">{sugar_translate label="LBL_REL_LABEL"}:</td>
<td><input name="rhs_label" id="rhs_label" value="{$rel.rhs_label}" ></td>
{/if}
</tr>
<tr>
{if $rel.relationship_type == 'many-to-many' || $rel.relationship_type == 'many-to-one'}
<td align="right" scope="row">{$mod_strings.LBL_SUBPANEL_FROM} {sugar_translate label=$rel.lhs_module}:</td>
<td> {if $rel.readonly}
<input name="lhs_subpanel" id="lhs_subpanel" value="{$rel.lhs_subpanel}" disabled>
{else}
{html_options name="lhs_subpanel" id="lhs_subpanel" output=$lhspanels values=$lhspanels selected=$rel.lhs_subpanel alt=$mod_strings.LBL_MSUB}
{/if}
</td>
{else}<td></td><td></td>{/if}
<td></td>
{if $rel.relationship_type != 'many-to-one'}
<td align="right" scope="row">{$mod_strings.LBL_SUBPANEL_FROM} {sugar_translate label=$rel.rhs_module}:</td>
<td>
{if $rel.readonly}
<input name="lhs_subpanel" id="lhs_subpanel" value="{$rel.rhs_subpanel}" disabled>
{else}
{html_options name="rhs_subpanel" id="rhs_subpanel" output=$rhspanels values=$rhspanels selected=$rel.rhs_subpanel alt=$mod_strings.LBL_RSUB}
{/if}
</td>
{/if}
</tr>
<tr>
{* add in the extended relationship condition *}
{* comment out for now as almost no expressed need for this - to revert, uncomment and test, test, test...
<td></td>
<td></td>
<td align="right" scope="row">{$mod_strings.LBL_RELATIONSHIP_ROLE_ENTRIES}:</td>
</tr>
{if $rel.relationship_type == 'one-to-many'}
<tr>
<td></td>
<td><span style='float:right;'>{$mod_strings.LBL_RELATIONSHIP_ROLE_COLUMN}:</span></td>
<td>
<input name="relationship_role_column" id="relationship_role_column_field" value="{$rel.relationship_role_column}" {if $rel.readonly}disabled{/if} />
</td>
</tr>
{/if} {* one-to-many *}
{*
<tr>
<td></td>
<td align="right" scope="row"><span style='float:right;'>{$mod_strings.LBL_RELATIONSHIP_ROLE_VALUE}:</span></td>
<td>
<input name="relationship_role_column_value" id="relationship_role_column__value_field" value="{$rel.relationship_role_column_value}" {if $rel.readonly}disabled{/if} />
</td>
</tr>
*}
{/if} {* subpanels etc for all but one-to-one relationships *}
{/if} {* if relationship_only *}
</table>
</td></tr>
</table>
</form>
<script>
{literal}
ModuleBuilder.deleteRel = function()
{
YAHOO.util.Dom.get("rel_remove_tables").value = true;
YAHOO.SUGAR.MessageBox.show(
{
type:'confirm',
width: 300,
{/literal}
msg:'<b>{sugar_translate label="LBL_CONFIRM_RELATIONSHIP_DELETE"}</b>' +
"<div style='height:1em;'>&nbsp;</div><p><input type='checkbox' onclick='YAHOO.util.Dom.get(\"rel_remove_tables\").value = this.checked ? \"\" : true;' />" +
"&nbsp;{sugar_translate label="ML_LBL_DO_NOT_REMOVE_TABLES" module="Administration"}</p>",
{literal}
fn: function(confirm) {
if (confirm == 'yes') {
document.forms.relform.action.value="DeleteRelationship";
ModuleBuilder.submitForm("relform");
ModuleBuilder.tabPanel.removeTab(ModuleBuilder.findTabById("relEditor"));
}
}
});
}
{/literal}
addForm('relform');
addToValidate('relform', 'label', 'varchar', true, '{$mod_strings.LBL_JS_VALIDATE_REL_LABEL}');
{if $fromModuleBuilder}
ModuleBuilder.helpSetup('relationshipsHelp','addRelationship');
{else}
ModuleBuilder.helpSetup('studioWizard','relationshipHelp');
{/if}
</script>

View File

@@ -0,0 +1,110 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
{if $view_module != 'KBDocuments'}
<input type='button' name='addrelbtn' value='{$mod_strings.LBL_BTN_ADD_RELATIONSHIP}'
class='button' onclick='ModuleBuilder.moduleLoadRelationship2("");' style="margin-bottom:5px;">
{/if}
<div id='relGrid'></div>
{if $studio}{sugar_translate label='LBL_CUSTOM_RELATIONSHIPS' module='ModuleBuilder'}</h3>{/if}
<script>
{literal}
//Workaround for YUI bug 2527707: http://yuilibrary.com/projects/yui2/ticket/913efafad48ce433199f3e72e4847b18, should be removed when YUI 2.8+ is used
YAHOO.widget.DataTable.prototype.getColumn = function(column) {
var oColumn = this._oColumnSet.getColumn(column);
if(!oColumn) {
// Validate TD element
var elCell = column.nodeName.toLowerCase() != "th" ? this.getTdEl(column) : false;
if(elCell) {
oColumn = this._oColumnSet.getColumn(elCell.cellIndex);
}
// Validate TH element
else {
elCell = this.getThEl(column);
if(elCell) {
// Find by TH el ID
var allColumns = this._oColumnSet.flat;
for(var i=0, len=allColumns.length; i<len; i++) {
if(allColumns[i].getThEl().id === elCell.id) {
oColumn = allColumns[i];
}
}
}
}
}
if(!oColumn) {
YAHOO.log("Could not get Column for column at " + column, "info", this.toString());
}
return oColumn;
};
{/literal}
var relationships = {ldelim}relationships:{$relationships}{rdelim};
var grid = new YAHOO.widget.ScrollingDataTable('relGrid',
[
{ldelim}key:'name', label: SUGAR.language.get('ModuleBuilder','LBL_REL_NAME'), width: 200, sortable: true{rdelim},
{ldelim}key:'lhs_module', label: SUGAR.language.get('ModuleBuilder','LBL_LHS_MODULE'), width: 120, sortable: true{rdelim},
{ldelim}key:'relationship_type', label: SUGAR.language.get('ModuleBuilder','LBL_REL_TYPE'), width: 120, sortable: true{rdelim},
{ldelim}key:'rhs_module', label: SUGAR.language.get('ModuleBuilder','LBL_RHS_MODULE'), width: 120, sortable: true{rdelim}
],{literal}
new YAHOO.util.LocalDataSource(relationships, {
responseSchema: {
resultsList : "relationships",
fields : [{key : "name"}, {key: "lhs_module"}, {key: "relationship_type"}, {key: "rhs_module"}]
}
}),
{MSG_EMPTY: SUGAR.language.get('ModuleBuilder','LBL_NO_RELS')}
);
grid.subscribe("rowMouseoverEvent", grid.onEventHighlightRow);
grid.subscribe("rowMouseoutEvent", grid.onEventUnhighlightRow);
grid.subscribe("rowClickEvent", function(args){
var rel = this.getRecord(args.target).getData();
var editTab = ModuleBuilder.findTabById("relEditor");
if (editTab) ModuleBuilder.tabPanel.removeTab(editTab);
var name = rel.name.indexOf("*") > -1 ? rel.name.substring(0, rel.name.length-1) : rel.name;
ModuleBuilder.moduleLoadRelationship2(name);
});
grid.render();
{/literal}
ModuleBuilder.module = '{$view_module}';
ModuleBuilder.MBpackage = '{$view_package}';
ModuleBuilder.helpRegisterByID('relGrid');
{if $fromModuleBuilder}
ModuleBuilder.helpSetup('relationshipsHelp','default');
{else}
ModuleBuilder.helpSetup('studioWizard','relationshipsHelp');
{/if}
</script>

View File

@@ -0,0 +1,95 @@
{*
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License version 3 as published by the
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "Powered by
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
* technical reasons, the Appropriate Legal Notices must display the words
* "Powered by SugarCRM".
********************************************************************************/
*}
<div class='wizard' width='100%' >
<div align='left' id='export'>{$actions}</div>
<div>{$question}</div>
<div id="Buttons">
<table align="center" cellspacing="7" width="90%"><tr>
{counter start=0 name="buttonCounter" print=false assign="buttonCounter"}
{foreach from=$buttons item='button' key='buttonName'}
{if $buttonCounter > 5}
</tr><tr>
{counter start=0 name="buttonCounter" print=false assign="buttonCounter"}
{/if}
{ if !isset($button.size)}
{assign var='buttonsize' value=''}
{else}
{assign var='buttonsize' value=$button.size}
{/if}
<td {if isset($button.help)}id="{$button.help}"{/if} width="16%" name=helpable" style="padding: 5px;" valign="top" align="center">
<table onclick='{if $button.action|substr:0:11 == "javascript:"}{$button.action|substr:11}{else}ModuleBuilder.getContent("{$button.action}");{/if}'
class='wizardButton' onmousedown="ModuleBuilder.buttonDown(this);return false;" onmouseout="ModuleBuilder.buttonOut(this);">
<tr>
<td align="center"><a class='studiolink' href="javascript:void(0)" >
{if isset($button.imageName)}
{if isset($button.altImageName)}
{sugar_image name=$button.imageTitle width=$button.size height=$button.size image=$button.imageName altimage=$button.altImageName}
{else}
{sugar_image name=$button.imageTitle width=$button.size height=$button.size image=$button.imageName}
{/if}
{else}
{sugar_image name=$button.imageTitle width=$button.size height=$button.size}
{/if}</a></td>
</tr>
<tr>
<td align="center"><a class='studiolink' href="javascript:void(0)">
{if (isset($button.imageName))}{$button.imageTitle}{else}{$buttonName}{/if}</a></td>
</tr>
</table>
</td>
{counter name="buttonCounter"}
{/foreach}
</tr></table>
<!-- Hidden div for hidden content so IE doesn't ignore it -->
<div style="float:left; left:-100px; display: hidden;">&nbsp;
{literal}
<style type='text/css'>
.wizard { padding: 5px; text-align:center; font-weight:bold}
.title{ color:#990033; font-weight:bold; padding: 0px 5px 0px 0px; font-size: 20pt}
.backButton {position:absolute; left:10px; top:35px}
</style>
{/literal}
<script>
ModuleBuilder.helpRegisterByID('export', 'input');
ModuleBuilder.helpRegisterByID('Buttons', 'td');
ModuleBuilder.helpSetup('studioWizard','{$defaultHelp}');
</script>
</div>
{include file='modules/ModuleBuilder/tpls/assistantJavascript.tpl'}