3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
39 /*********************************************************************************
41 ********************************************************************************/
46 <!-- --------------------------------------------------------------------------- -->
47 <!-- BEGIN: merge_cell_label -->
48 <td width="{CELL_WIDTH}" valign="top" >{FIELD_LABEL} {REQUIRED_SYMBOL}</td>
49 <!-- END: merge_cell_label -->
50 <!-- --------------------------------------------------------------------------- -->
51 <!-- BEGIN: merge_cell_edit_text -->
52 <td width="{CELL_WIDTH}" valign="top" ><slot><input name="{EDIT_FIELD_NAME}" id="{EDIT_FIELD_NAME}" tabindex="{TAB_INDEX}" size="35" maxlength="150" type="text" value="{EDIT_FIELD_VALUE}"></slot></td>
53 <!-- END: merge_cell_edit_text -->
54 <!-- BEGIN: merge_cell_edit_textarea -->
55 <td width="{CELL_WIDTH}" valign="top" ><slot><textarea name="{EDIT_FIELD_NAME}" id="{EDIT_FIELD_NAME}" tabindex="{TAB_INDEX}" cols="35" rows="4">{EDIT_FIELD_VALUE}</textarea></slot></td>
56 <!-- END: merge_cell_edit_textarea -->
57 <!-- BEGIN: merge_cell_edit_checkbox -->
58 <td width="{CELL_WIDTH}" valign="top" ><slot><input name="{EDIT_FIELD_NAME}" id="{EDIT_FIELD_NAME}" class="checkbox" tabindex="{TAB_INDEX}" type="checkbox" {EDIT_FIELD_VALUE}/></slot></td>
59 <!-- END: merge_cell_edit_checkbox -->
60 <!-- BEGIN: merge_cell_edit_datetime -->
61 <td valign="top" width="{CELL_WIDTH}"><slot><input name='{EDIT_FIELD_NAME}' id='{EDIT_FIELD_NAME}_date' type="text" tabindex='{TAB_INDEX}' size='11' maxlength='10' value="{EDIT_FIELD_VALUE}"> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="{EDIT_FIELD_NAME}_trigger" align="absmiddle"> <span class="dateFormat"></span><span id='{EDIT_FIELD_NAME}_time_section' ></span><input type="hidden" name='{EDIT_FIELD_NAME}' id='{EDIT_FIELD_NAME}'></slot></td>
62 <script type="text/javascript" src="include/SugarFields/Fields/Datetimecombo/Datetimecombo.js?v={VERSION_MARK}"></script>
63 <script type="text/javascript">
64 var combo_{EDIT_FIELD_NAME} = new Datetimecombo("{EDIT_FIELD_VALUE}", "{EDIT_FIELD_NAME}", "{USER_DATEFORMAT}", '','','');
65 //Render the remaining widget fields
66 text = combo_{EDIT_FIELD_NAME}.html('');
67 document.getElementById('{EDIT_FIELD_NAME}_time_section').innerHTML = text;
69 //Call eval on the update function to handle updates to calendar picker object
70 eval(combo_{EDIT_FIELD_NAME}.jsscript(''));
72 function update_{EDIT_FIELD_NAME}_available() {
73 YAHOO.util.Event.onAvailable("{EDIT_FIELD_NAME}_date", this.handleOnAvailable, this);
76 update_{EDIT_FIELD_NAME}_available.prototype.handleOnAvailable = function(me) {
78 onClose : update_{EDIT_FIELD_NAME},
79 inputField : "{EDIT_FIELD_NAME}_date",
80 daFormat : "{CALENDAR_DATEFORMAT}",
81 ifFormat : "{CALENDAR_DATEFORMAT}",
82 button : "{EDIT_FIELD_NAME}_trigger",
88 //Call update for first time to round hours and minute values
89 combo_{EDIT_FIELD_NAME}.update();
92 var obj_{EDIT_FIELD_NAME} = new update_{EDIT_FIELD_NAME}_available();
94 <!-- END: merge_cell_edit_datetime -->
95 <!-- BEGIN: merge_cell_edit_date -->
96 <td valign="top" width="{CELL_WIDTH}"><slot><input name='{EDIT_FIELD_NAME}' id='{EDIT_FIELD_NAME}' type="text" tabindex='{TAB_INDEX}' size='11' maxlength='10' value="{EDIT_FIELD_VALUE}"> <img src="index.php?entryPoint=getImage&themeName={THEME}&imageName=jscalendar.gif" alt="{APP.LBL_ENTER_DATE}" id="{EDIT_FIELD_NAME}_trigger" align="absmiddle"> <span class="dateFormat">{USER_DATEFORMAT}</span></slot></td>
97 <script type="text/javascript">
99 inputField : "{EDIT_FIELD_NAME}", daFormat : "{CALENDAR_DATEFORMAT}", ifFormat : "{CALENDAR_DATEFORMAT}", showsTime : false, button : "{EDIT_FIELD_NAME}_trigger", singleClick : true, step : 1
102 <!-- END: merge_cell_edit_date -->
103 <!-- BEGIN: merge_cell_edit_dropdown -->
104 <td width="{CELL_WIDTH}" valign="top" ><slot><select tabindex="{TAB_INDEX}" name="{EDIT_FIELD_NAME}" id="{EDIT_FIELD_NAME}">{SELECT_OPTIONS}</select></slot></td>
105 <!-- END: merge_cell_edit_dropdown -->
106 <!-- BEGIN: merge_cell_edit_multidropdown -->
107 <td width="{CELL_WIDTH}" valign="top" ><slot><select tabindex="{TAB_INDEX}" name="{EDIT_FIELD_NAME}[]" id="{EDIT_FIELD_NAME}" multiple="true" size="6">{SELECT_OPTIONS}</select></slot></td>
108 <!-- END: merge_cell_edit_multidropdown -->
109 <!-- BEGIN: merge_cell_edit_popup -->
110 <td width="{CELL_WIDTH}" valign="top" ><slot><input class="sqsEnabled" autocomplete="off" tabindex="{TAB_INDEX}" id="{POPUP_NAME_FIELD}" name="{POPUP_NAME_FIELD}" type="text" value="{POPUP_NAME_VALUE}"><input id='{POPUP_ID_FIELD}' name='{POPUP_ID_FIELD}' type="hidden" value="{POPUP_ID_VALUE}"/>
111 <input title="{APP.LBL_SELECT_BUTTON_TITLE}" type="button" tabindex='1' class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name=btn1
112 onclick='open_popup("{POPUP_MODULE}", 600, 400, "", true, false, {ENCODED_POPUP_DATA},"single",true);' /></slot></td>
113 <!-- END: merge_cell_edit_popup -->
115 <!-- --------------------------------------------------------------------------- -->
116 <!-- --------------------------------------------------------------------------- -->
118 <!-- --------------------------------------------------------------------------- -->
119 <!-- BEGIN: merge_cell_field_value -->
120 <td width="{CELL_WIDTH}" valign="top" ><slot><input title="{HOVER_TEXT}" class="button" onclick='copy_value({ENCODED_JSON_DATA});' type="button" name="copyValue" value="<<"/> {FIELD_VALUE}</slot></td>
121 <!-- END: merge_cell_field_value -->
122 <!-- BEGIN: merge_cell_field_value_checkbox -->
123 <td width="{CELL_WIDTH}" valign="top" ><slot><input title="{HOVER_TEXT}" class="button" onclick='copy_value({ENCODED_JSON_DATA});' type="button" name="copyValue" value="<<"/> <input disabled type="checkbox" class="checkbox" {FIELD_VALUE}/></slot></td>
124 <!-- END: merge_cell_field_value_checkbox -->
125 <!-- --------------------------------------------------------------------------- -->