]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/SavedSearch/SavedSearchForm.tpl
Release 6.5.0
[Github/sugarcrm.git] / modules / SavedSearch / SavedSearchForm.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2012 SugarCRM Inc.
6  * 
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.
13  * 
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
17  * details.
18  * 
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
22  * 02110-1301 USA.
23  * 
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.
26  * 
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.
30  * 
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  ********************************************************************************/
37
38
39
40
41 *}
42
43 <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-top: 0px none; margin-bottom: 4px" >
44 <tr valign='top'>
45         <td width='34%' align='left' rowspan='4' colspan='2'>
46                 <input id='displayColumnsDef' type='hidden' name='displayColumns'>
47                 <input id='hideTabsDef' type='hidden' name='hideTabs'>
48                 {$columnChooser}
49                 <br>
50         </td>
51         <td scope='row' align='left' width='10%'>
52                 {sugar_translate label='LBL_ORDER_BY_COLUMNS' module='SavedSearch'}
53
54         </td>
55         <td width='23%'>
56                 <select name='orderBy' id='orderBySelect'>
57                 </select>
58         </td>
59         <td scope='row' width='10%'>
60                 {sugar_translate label='LBL_DIRECTION' module='SavedSearch'}
61         </td>
62         <td width='23%'>
63                 <div><input id='sort_order_desc_radio' type='radio' name='sortOrder' value='DESC' {if $selectedSortOrder == 'DESC'}checked{/if}>&nbsp;<span onclick='document.getElementById("sort_order_desc_radio").checked = true' style="cursor: pointer; cursor: hand">{$MOD.LBL_DESCENDING}</span></div>
64                 
65                 <div><input id='sort_order_asc_radio' type='radio' name='sortOrder' value='ASC' {if $selectedSortOrder == 'ASC'}checked{/if}>&nbsp;<span onclick='document.getElementById("sort_order_asc_radio").checked = true' style="cursor: pointer; cursor: hand">{$MOD.LBL_ASCENDING}</span>
66                 </div>
67         </td>
68         </tr>
69
70 </table>
71 <script>
72         SUGAR.savedViews.columnsMeta = {$columnsMeta};
73         columnsMeta = {$columnsMeta};
74         saved_search_select = "{$SAVED_SEARCH_SELECT}";
75         selectedSortOrder = "{$selectedSortOrder|default:'DESC'}";
76         selectedOrderBy = "{$selectedOrderBy}";
77
78
79 {literal}
80         //this populates the label that shows the name of the current saved view
81         //The label is located under the update/delete buttons
82         function fillInLabels(){
83                 //this javascript runs and populates values in savedSearchForm.tpl
84                 x = document.getElementById('saved_search_select');
85                 if ((typeof(x) != 'undefined' && x != null) && x.selectedIndex !=0) {
86                         document.getElementById('curr_search_name').innerHTML = '"'+x.options[x.selectedIndex].text+'"';
87                         document.getElementById('ss_update').disabled = false;
88                         document.getElementById('ss_delete').disabled = false;
89                 }else{
90                         document.getElementById('ss_update').disabled = true;
91                         document.getElementById('ss_delete').disabled = true;
92                         document.getElementById('curr_search_name').innerHTML = '';
93                 }
94         }
95         //call scripts that need to get run onload of this form.  This function is called when image
96         //to collapse/show subpanels is loaded
97         function loadSSL_Scripts(){
98                 //this will fill in the name of the current module, and enable/disable update/delete buttons
99                 fillInLabels();
100                 //this populates the order by dropdown, and activates the chooser widget.
101                 SUGAR.savedViews.handleForm();
102         }
103
104 {/literal}
105 </script>
106
107