studiorelationship.tpl

来自「SugarCRM5.1 开源PHP客户关系管理系统」· TPL 代码 · 共 182 行

TPL
182
字号
{*/********************************************************************************* * SugarCRM is a customer relationship management program developed by * SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc. *  * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU 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 General Public License for more * details. *  * You should have received a copy of the GNU 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 General Public License version 3. *  * In accordance with Section 7(b) of the GNU 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'>{if ! empty($module->package)}<input type='hidden' name='view_package' value='{$module->package}'>{/if}<input type='hidden' name='view_module' value='{$module->getModuleName()}' />{if $rel.relationship_only}<input type='hidden' name='relationship_only' value='1'>{/if}<!--<input type='hidden' id='new_rel' name='new' value='{$new}'>--><table style="width:100%;">	<tr>		<td colspan='2' style="padding:5px 5px 15px 5px">			<input type='button' name='cancelbtn' value='{$mod_strings.LBL_BTN_CANCEL}' onclick='ModuleBuilder.tabPanel.remove("relEditor");' class='button'>			{if !$rel.readonly}			{if empty($module->package)}			<input type='button' name='saverelbtn' value='{$mod_strings.LBL_BTN_DEPLOY}' onclick='if(check_form("relform") && confirm("{$mod_strings.LBL_CONFIRM_RELATIONSHIP_DEPLOY}"))			{else}			<input type='button' name='saverelbtn' value='{$mod_strings.LBL_BTN_SAVE}' onclick='if(check_form("relform"))			{/if}			ModuleBuilder.submitForm("relform");ModuleBuilder.tabPanel.remove("relEditor");' class='button'>			{if ! empty($module->package)}			&nbsp;			<input type='button' name='deleterelbtn' value='{$mod_strings.LBL_BTN_DELETE}' onclick='if(confirm("{$mod_strings.LBL_CONFIRM_RELATIONSHIP_DELETE}")) this.form.action.value="DeleteRelationship";ModuleBuilder.submitForm("relform");' class='button'>			{/if}			{/if}		</td>	</tr>	<tr >       {if !empty($rel.relationship_name)}       <td>       <span align="right" class="dataLabel">{$mod_strings.LBL_REL_NAME}:&nbsp;</span><span>{$rel.relationship_name}</span>       <input type="hidden" value="{$rel.relationship_name}" name="relationship_name" />       </td>       {/if}    </tr>    <tr>	<tr><td colspan=2>		<table>		    <tr><th align="center">{$mod_strings.LBL_LHS_MODULE}</th><th>{$mod_strings.LBL_REL_TYPE}</th><th>{$mod_strings.LBL_RHS_MODULE}</th></tr>			<tr>				<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.name.value);' }								{/if}								</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.name.value);'}					{/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>                    <td>{$mod_strings.LBL_SUBPANEL_FROM} {sugar_translate label=$rel.rhs_module}:</td>                    <td></td>                    <td>{if $rel.relationship_type == 'many-to-many'}{$mod_strings.LBL_SUBPANEL_FROM} {sugar_translate label=$rel.lhs_module}:{/if}</td>                </tr>                <tr>                <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>				<td></td>				<td>                {if $rel.relationship_type == 'many-to-many'}                    {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}                {/if}				</td>			</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>{$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><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>addForm('relform');addToValidate('relform', 'label', 'varchar', true, '{$mod_strings.LBL_JS_VALIDATE_REL_LABEL}');{if $fromModuleBuilder}ModuleBuilder.helpSetup('relationshipsHelp','addRelationship');{else}ModuleBuilder.helpSetup('studioWizard','relationshipsHelp');{/if}</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?