]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Calendar/tpls/shared_users.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / Calendar / tpls / shared_users.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 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
39 <div width="100%">
40 <div align="right"><button type="button" class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');">{$MOD.LBL_EDIT_USERLIST}</button></div>        
41 </div>
42
43 <script language="javascript">
44 {literal}
45                         function up(name){
46                                 var td = document.getElementById(name+'_td');
47                                 var obj = td.getElementsByTagName('select')[0];
48                                 obj =(typeof obj == "string") ? document.getElementById(obj) : obj;
49                                 if(obj.tagName.toLowerCase() != "select" && obj.length < 2)
50                                         return false;
51                                 var sel = new Array();
52                                                         
53                                 for(i = 0; i < obj.length; i++){
54                                         if(obj[i].selected == true) {
55                                                 sel[sel.length] = i;
56                                         }
57                                 }
58                                 for(i in sel){
59                                         if(sel[i] != 0 && !obj[sel[i]-1].selected) {
60                                                 var tmp = new Array(obj[sel[i]-1].text, obj[sel[i]-1].value);
61                                                 obj[sel[i]-1].text = obj[sel[i]].text;
62                                                 obj[sel[i]-1].value = obj[sel[i]].value;
63                                                 obj[sel[i]].text = tmp[0];
64                                                 obj[sel[i]].value = tmp[1];
65                                                 obj[sel[i]-1].selected = true;
66                                                 obj[sel[i]].selected = false;
67                                         }
68                                 }
69                         }                       
70                         function down(name){
71                                 var td = document.getElementById(name+'_td');
72                                 var obj = td.getElementsByTagName('select')[0];
73                                 if(obj.tagName.toLowerCase() != "select" && obj.length < 2)
74                                         return false;
75                                 var sel = new Array();
76                                 for(i=obj.length-1; i>-1; i--){
77                                         if(obj[i].selected == true) {
78                                                 sel[sel.length] = i;
79                                         }
80                                 }
81                                 for(i in sel){
82                                         if(sel[i] != obj.length-1 && !obj[sel[i]+1].selected) {
83                                                 var tmp = new Array(obj[sel[i]+1].text, obj[sel[i]+1].value);
84                                                 obj[sel[i]+1].text = obj[sel[i]].text;
85                                                 obj[sel[i]+1].value = obj[sel[i]].value;
86                                                 obj[sel[i]].text = tmp[0];
87                                                 obj[sel[i]].value = tmp[1];
88                                                 obj[sel[i]+1].selected = true;
89                                                 obj[sel[i]].selected = false;
90                                         }
91                                 }
92                         }
93 {/literal}
94 </script>
95
96 <div id="shared_cal_edit" style="{$style}">
97         <form name="shared_cal" action="index.php" method="post">
98         <input type="hidden" name="module" value="Calendar">
99         <input type="hidden" name="action" value="index">
100         <input type="hidden" name="edit_shared" value="">
101         <input type="hidden" name="view" value="shared">
102         
103         
104         <table cellpadding="0" cellspacing="3" border="0" align="center">
105                 <tr><th valign="top" align="center" colspan="2">{$MOD.LBL_SELECT_USERS}</th></tr>
106                 <tr><td valign="top"></td><td valign="top">
107                         <table cellpadding="1" cellspacing="1" border="0" class="edit view" align="center">
108                                 <tr>
109                                         <td valign="top" nowrap=""><b>{$MOD.LBL_USERS}:</b></td>
110                                         <td valign="top" id="shared_ids_td">
111                                                 <select id="shared_ids" name="shared_ids[]" multiple size="8">{$users_options}</select>
112                                         </td>                                   
113                                         <td>
114                                                 <a onclick="up('shared_ids');">{$UP}</a><br>
115                                                 <a onclick="down('shared_ids');">{$DOWN}</a>
116                                         </td>
117                                 </tr>
118                                 <tr>
119                                         <td align="right" colspan="2">
120                                                 <input class="button" type="submit" title="{$APP.LBL_SELECT_BUTTON_TITLE}" accesskey="{$APP.LBL_SELECT_BUTTON_KEY}" value="{$APP.LBL_SELECT_BUTTON_LABEL}"> 
121                                                 <input class="button" onclick="javascript: CAL.toggle_shared_edit('shared_cal_edit');" type="button" title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accesskey="{$APP.LBL_CANCEL_BUTTON_KEY}" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
122                                         </td>
123                                 </tr>
124                         </table>
125                 </td></tr>
126         </table>
127         </form>
128 </div>