2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
39 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_yui_widgets.js'}"></script>
40 <script type="text/javascript" src="{sugar_getjspath file='modules/Connectors/Connector.js'}"></script>
41 <link rel="stylesheet" type="text/css" href="{sugar_getjspath file='modules/Connectors/tpls/tabs.css'}"/>
45 <script language="javascript">
48 var _sourceArray = new Array();
52 _tabView = new YAHOO.widget.TabView();
55 {counter assign=source_count start=0 print=0}
56 {foreach name=connectors from=$SOURCES key=name item=source}
57 {counter assign=source_count}
59 tab = new YAHOO.widget.Tab({
60 label: '{/literal}{$source.name}{literal} ',
61 dataSrc: {/literal}'index.php?module=Connectors&action=SourceProperties&source_id={$source.id}&to_pdf=true'{literal},
64 {if $source_count == 1}
73 tab.id = '{$source.id}';
74 //tab.addListener('beforeContentChange', SourceTabs.tabClicked);
75 tab.addListener('click', SourceTabs.afterContentChange);
76 _sourceArray[{$source_count}-1] = '{$source.id}';
79 _tabView.appendTo('container');
82 afterContentChange: function(info) {
84 if(typeof validate != 'undefined') {
85 validate = new Array();
86 validate["ModifyProperties"] = new Array();
89 tab = _tabView.get('activeTab');
90 if(typeof tab.get('content') != 'undefined') {
91 SUGAR.util.evalScript(tab.get('content'));
94 _timer = setTimeout(SourceTabs.afterContentChange, 1000);
98 fitContainer: function() {
99 content_div = _tabView.getElementsByClassName('yui-content', 'div')[0];
100 content_div.style.overflow='auto';
101 content_div.style.height='405px';
104 YAHOO.util.Event.onDOMReady(SourceTabs.init);
107 <form name="ModifyProperties" method="POST">
108 <input type="hidden" name="modify" value="true">
109 <input type="hidden" name="module" value="Connectors">
110 <input type="hidden" name="action" value="SaveModifyProperties">
111 <input type="hidden" name="source_id" value="">
112 <input type="hidden" name="reset_to_default" value="">
114 {counter assign=source_count start=0 print=0}
115 {foreach name=connectors from=$SOURCES key=name item=source}
116 {counter assign=source_count}
117 <input type="hidden" name="source{$source_count}" value="{$source.id}">
120 <table border="0" class="actionsContainer">
122 <input id="connectors_top_save" title="{$APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" value="{$APP.LBL_SAVE_BUTTON_LABEL}" onclick="return check_form('ModifyProperties') || confirm('{$mod.LBL_CONFIRM_CONTINUE_SAVE}');">
123 <input id="connectors_top_cancel" title="{$APP.LBL_CANCEL_BUTTON_LABEL}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="document.ModifyProperties.action.value='ConnectorSettings'; document.ModifyProperties.module.value='Connectors';" type="submit" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
128 <table cellspacing="0" cellpadding="0" border="0" width="100%">
129 <tr><td class="tabDetailViewDF">
131 <div id="container" style="height: 465px">
137 <table border="0" class="actionsContainer">
139 <input id="connectors_bottom_save" title="{$APP.LBL_SAVE_BUTTON_LABEL}" class="button" type="submit" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}" onclick="return check_form('ModifyProperties') || confirm('{$mod.LBL_CONFIRM_CONTINUE_SAVE}');">
140 <input id="connectors_bottom_cancel" title="{$APP.LBL_CANCEL_BUTTON_LABEL}" class="button" onclick="document.ModifyProperties.action.value='ConnectorSettings'; document.ModifyProperties.module.value='Connectors';" type="submit" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
145 <script type="text/javascript">
147 YAHOO.util.Event.onDOMReady(SourceTabs.fitContainer);
150 {foreach name=required_fields from=$REQUIRED_FIELDS key=id item=fields}
151 {foreach from=$fields key=field_key item=field_label}
152 addToValidate("ModifyProperties", "{$id}_{$field_key}", "alpha", true, "{$field_label}");