]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Relationships/editFields.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / Relationships / editFields.tpl
1 \{*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 *}
38 <table width="100%" border="0" cellspacing="1" cellpadding="0"  class="edit view">
39 {{assign var='rowCount' value=0}}
40 {{foreach name=rowIteration from=$panel key=row item=rowData}}
41 {counter name="fieldsUsed" start=0 print=false assign="fieldsUsed"}
42 {capture name="tr" assign="tableRow"}
43 <tr>
44         <td valign="top" id='{{$colData.field.name}}_label' scope="row">
45                         {{if isset($colData.field.customLabel)}}
46                            {{$colData.field.customLabel}}
47                         {{elseif isset($colData.field.label)}}
48                            {capture name="label" assign="label"}
49                            {sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}
50                            {/capture}
51                            {$label|strip_semicolon}:
52                         {{elseif isset($fields[$colData.field.name])}}
53                            {capture name="label" assign="label"}
54                            {sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}
55                            {/capture}
56                            {$label|strip_semicolon}:
57                         {{/if}}
58                         {{* Show the required symbol if field is required, but override not set.  Or show if override is set *}}
59                                 {{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) ||
60                                      (isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}}
61                             <span class="required">{{$APP.LBL_REQUIRED_SYMBOL}}</span>
62                         {{/if}}
63                 </td>
64                 {{/if}}
65                 {counter name="fieldsUsed"}
66                 <td valign="top" width='{{$def.templateMeta.widths[$smarty.foreach.colIteration.index].field}}%' {{if $colData.colspan}}colspan='{{$colData.colspan}}'{{/if}}>
67                         {{if !empty($def.templateMeta.labelsOnTop)}}
68                                 {{if isset($colData.field.label)}}
69                                     {{if !empty($colData.field.label)}}
70                                             {sugar_translate label='{{$colData.field.label}}' module='{{$module}}'}:
71                                     {{/if}}
72                                 {{elseif isset($fields[$colData.field.name])}}
73                                         {sugar_translate label='{{$fields[$colData.field.name].vname}}' module='{{$module}}'}:
74                                 {{/if}}
75
76                                 {{* Show the required symbol if field is required, but override not set.  Or show if override is set *}}
77                                 {{if ($fields[$colData.field.name].required && (!isset($colData.field.displayParams.required) || $colData.field.displayParams.required)) ||
78                                      (isset($colData.field.displayParams.required) && $colData.field.displayParams.required)}}
79                                     <span class="required" title="{{$APP.LBL_REQUIRED_TITLE}}">{{$APP.LBL_REQUIRED_SYMBOL}}</span>
80                                 {{/if}}
81                                 {{if !isset($colData.field.label) || !empty($colData.field.label)}}
82                                 <br>
83                                 {{/if}}
84                         {{/if}}
85
86
87                         {{if $fields[$colData.field.name] && !empty($colData.field.fields) }}
88                             {{foreach from=$colData.field.fields item=subField}}
89                                 {{if $fields[$subField.name]}}
90                                         {counter name="panelFieldCount"}
91                                     {{sugar_field parentFieldArray='fields' tabindex=$colData.field.tabindex vardef=$fields[$subField.name] displayType='EditView' displayParams=$subField.displayParams formName=$form_name}}&nbsp;
92                                 {{/if}}
93                             {{/foreach}}
94                         {{elseif !empty($colData.field.customCode)}}
95                                 {counter name="panelFieldCount"}
96                                 {{sugar_evalcolumn var=$colData.field.customCode colData=$colData tabindex=$colData.field.tabindex}}
97                         {{elseif $fields[$colData.field.name]}}
98                                 {counter name="panelFieldCount"}
99                             {{$colData.displayParams}}
100                                 {{sugar_field parentFieldArray='fields' tabindex=$colData.field.tabindex vardef=$fields[$colData.field.name] displayType='EditView' displayParams=$colData.field.displayParams typeOverride=$colData.field.type formName=$form_name}}
101                         {{/if}}
102     {{if !empty($colData.field.hideIf)}}
103                 {else}
104                 <td></td><td></td>
105                 {/if}
106     {{/if}}
107
108         {{/foreach}}
109 </tr>
110 {/capture}
111 {if $fieldsUsed > 0 }
112 {$tableRow}
113 {/if}
114 {{/foreach}}
115 </table>