source: sandbox/2.2.0.2/contactcenter/templates/default/full_add.tpl @ 4498

Revision 4498, 15.2 KB checked in by airton, 13 years ago (diff)

Ticket #1925 - Permitir associar um contato com um grupo na tela de criação do contato

  • Property svn:executable set to *
Line 
1{cc_api}
2
3<!-- JS MESSAGES -->
4<!--input id="cc_msg_err_empty_field" type="hidden" value="{cc_msg_err_empty_field}"-->
5<!--input id="cc_msg_type_state" type="hidden" value="{cc_msg_type_state}"-->
6<!--input id="cc_msg_type_city" type="hidden" value="{cc_msg_type_city}"-->
7<!-- END JS MESSAGES -->
8
9
10<!-- WINDOW CONTACT -->
11<iframe id="cc_photo_frame" style="position: absolute; top: 0px; left: 0px; visibility:hidden"></iframe>
12<input id="cc_contact_title" type="hidden" value="{cc_contact_title}">
13<input id="cc_contact_personal" type="hidden" value="{cc_contact_personal}">
14<input id="cc_contact_addrs" type="hidden" value="{cc_contact_addrs}">
15<input id="cc_contact_grps" type="hidden" value="{cc_contact_grps}">
16<input id="cc_contact_conns" type="hidden" value="{emails_telephones}">
17<input id="cc_pd_full_name" name="{cc_pd_full_name}" type="hidden">
18<input id="cc_pd_sex" name="{cc_pd_sex}" type="hidden">
19<input id="cc_addr_other" name="{cc_addr_other}" type="hidden">
20<input id="cc_addr_po_box" name="{cc_addr_po_box}" type="hidden">
21<!-- _PERSONAL DATA -->
22<div id="cc_contact_tab_0" class="row_off div_cc_contact_tab" style="left:-498;top:-347;position: absolute;visibility: hidden;height:197px">
23        <form id="cc_full_add_form_personal">
24        <input id="cc_full_add_contact_id" type="text" style="display: none">
25        <table align="center" width="498px" height="197px" class="row_off" border="0">
26                <tr class="row_off">
27                        <td align="right">{cc_pd_select_photo}:</td>
28                        <td align="left" colspan="2">
29                                <!-- Mozilla Method -->
30                                <input id="cc_pd_select_photo" type="file" accept="image/gif,image/jpeg,image/png" name="cc_pd_photo" onchange="Element('cc_pd_photo').src = 'file://'+Element('cc_pd_select_photo').value">
31                                <!-- IE Method -->
32                                <input id="cc_pd_select_photo_t" type="text" name="cc_pd_select_photo_t" readonly>
33                                <input id="cc_pd_select_photo_b" type="button" style="width: 60px" value="{cc_pd_select_photo_b}" onclick="Element('cc_photo_frame').contentWindow.document.all['cc_photo_input'].click();">
34                        </td>
35                        <td align="center" colspan="2" rowspan="3"><img id="cc_pd_photo" src="templates/default/images/photo.png" border="0" width="60px" height="80px"></td>
36                </tr>
37                <tr class="row_on">
38                        <td align="right">{cc_pd_alias}:</td>
39                        <td align="left" colspan="2"><input id="cc_pd_alias" name="{cc_pd_alias}" type="text" style="width:175px;z-index:-1" value="" maxlength="30"></td>
40                </tr>
41                <tr style="display:none" class="row_off">
42                        <td align="right">{cc_pd_prefix}:</td>
43                        <td align="left" colspan="2"><select id="cc_pd_prefix" name="{cc_pd_prefix}" style="width: 175px;"><option value='0'>{cc_pd_choose_prefix}</option></select></td>
44                </tr>
45                <tr class="row_on">
46                        <td align="right">{cc_pd_given_names}:</td>
47                        <td align="left" colspan="2"><input id="cc_pd_given_names" name="{cc_pd_given_names}" type="text" style="width: 175px;" value="" maxlength="100"></td>
48                </tr>
49                <tr class="row_on">
50                        <td align="right">{cc_pd_family_names}:</td>
51                        <td align="left"><input id="cc_pd_family_names" name="{cc_pd_family_names}" type="text" style="width: 175px;" value="" maxlength="100"></td>
52                        <td align="right">{cc_pd_birthdate}:</td>
53                        <td align="left">
54                                <input id="cc_pd_birthdate_0" style="text-align: center;" title="{cc_pd_birthdate_0}" name="{cc_pd_birthdate_0}" type="text" maxlength="{cc_pd_birth_size_0}" size="{cc_pd_birth_size_0}">
55                                <input id="cc_pd_birthdate_1" style="text-align: center;" title="{cc_pd_birthdate_1}" name="{cc_pd_birthdate_1}" type="text" maxlength="{cc_pd_birth_size_1}" size="{cc_pd_birth_size_1}">
56                                <input id="cc_pd_birthdate_2" style="text-align: center;" title="{cc_pd_birthdate_2}" name="{cc_pd_birthdate_2}" type="text" maxlength="{cc_pd_birth_size_2}" size="{cc_pd_birth_size_2}">
57                        </td>
58                </tr>
59                <tr style="display:none" class="row_off">
60                        <td align="right">{cc_pd_suffix}:</td>
61                        <td align="left" colspan="3"><select id="cc_pd_suffix" name="{cc_pd_suffix}" style="width: 175px;"><option value="0">{cc_pd_choose_suffix}</option></select></td>
62                </tr>
63                <tr class="row_on">
64                        <td align="right">{cc_pd_gpg_finger_print}:</td>
65                        <td colspan="3" align="left"><input id="cc_pd_gpg_finger_print" name="{cc_pd_gpg_finger_print}" type="text" style="width: 350px;" value="" maxlength=""></td>
66                </tr>
67                <tr class="row_off">
68                        <td align="right">{cc_pd_notes}:</td>
69                        <td colspan="3" align="left"><textarea id="cc_pd_notes" name="{cc_pd_notes}" style="width: 350px; height: 60px;"></textarea></td>
70                </tr>
71        </table>
72        </form>
73</div>
74
75<!-- _ADDRESSES -->
76<div id="cc_contact_tab_1" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:197px;">
77        <form id="cc_full_add_form_addrs">
78        <table align="center" width="498px" height="197px" border="0">
79                <tr class="row_off">
80                        <td align="right">{cc_addr_types}:</td>
81                        <td align="left" colspan="3">
82                                <select id="cc_addr_types" name="{cc_addr_types}" style="width: 200px;" onchange="updateAddressFields()">
83                                        <option value="_NONE_">{cc_addr_choose_types}</option>
84                                </select>
85                        </td>
86                </tr>
87                <tr class="row_on">
88                        <td align="right">{cc_addr_countries}:</td>
89                        <td align="left" colspan="3">
90                                <select id="cc_addr_countries" name="{cc_addr_countries}" style="width: 200px;" onchange="updateAddrStates()">
91                                        <option value="_NONE_">{cc_addr_choose_countries}</option>
92                                        {cc_addr_country_list}
93                                </select>
94                        </td>
95                </tr>
96                <tr class="row_off">
97                        <td align="right">{cc_addr_states}:</td>
98                        <td align="left" colspan="3">
99                                <select id="cc_addr_states" name="{cc_addr_states}" style="width: 200px;" onchange="updateAddrCities();">
100                                        <option value="_NONE_">{cc_addr_choose_states}</option>
101                                </select>
102                                <input id="cc_addr_states_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewStateOnMouseOver();" onmouseout="updateAddrNewStateOnMouseOut();">
103                        </td>
104                </tr>
105                <tr class="row_on">
106                        <td align="right">{cc_addr_cities}:</td>
107                        <td align="left" colspan="3">
108                                <select id="cc_addr_cities" style="width: 200px;" onchange="updateAddrFillingFields();">
109                                        <option value="_NONE_">{cc_addr_choose_cities}</option>
110                                </select>
111                                <input id="cc_addr_cities_new" style="display:none;width: 150px;" type="text" onmouseover="updateAddrNewCityOnMouseOver();" onmouseout="updateAddrNewCityOnMouseOut();">
112                        </td>
113                </tr>
114                <tr class="row_off">
115                        <td align="right">{cc_addr_1}:</td>
116                        <td align="left"><input id="cc_addr_1" name="{cc_addr_1}" style="width: 200px;" type="text" name="" value="" maxlength="60"></td>
117                        <td align="right">{cc_addr_complement}:</td>
118                        <td align="left"><input id="cc_addr_complement" name="{cc_addr_complement}" style="width: 100px;" type="text" name="" value="" maxlength="30"></td>
119                </tr>
120                <tr class="row_on">
121                        <td align="right">{cc_addr_2}:</td>
122                        <td align="left"><input id="cc_addr_2" name="{cc_addr_2}" style="width: 200px;" type="text" name="" value="" maxlength="60"></td>
123                        <td align="right">{cc_addr_postal_code}:</td>
124                        <td align="left"><input id="cc_addr_postal_code" name="{cc_addr_postal_code}"style="width: 70px;" type="text" name="" value="" maxlength="15"></td>
125                </tr>
126                <tr class="row_off">
127                        <td align="right">{cc_addr_is_default}:</td>
128                        <td colspan="3" align="left"><input id="cc_addr_is_default" type="checkbox" name=""></td>
129                </tr>
130                <tr style="visibility: hidden; position: absolute;">
131                        <td><input id="cc_addr_id" type="hidden"></td>
132                </tr>
133        </table>
134        </form>
135</div>
136
137<!-- _CONNECTIONS -->
138<div id="cc_contact_tab_2" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
139        <table align="left" width="100%"  height="247px" border=0>
140        <tbody>
141                <tr class="th" width="100%" align="center" height="10px">
142                        <td width="60px" noWrap><input type="radio"  name="cc_conn_type" id="cc_conn_type_1" value="Email" onclick="javascript:updateConnFields();">{email}</td>
143                        <td width="60px" noWrap><input type="radio" name="cc_conn_type" id="cc_conn_type_2" value="Telefone" onclick="javascript:updateConnFields();">{telephone}</td>
144                        <td width="*" align="left"><select style="width:160px" id="cc_conn_type_sel" onchange="javascript:connAddNewLine();"><option value="-1">{choose_email_telephone}</option></select></td>
145                </tr>
146                <tr class="row_off">                   
147                        <td valign="top" colspan="4" width="100%" style="border: 0px solid black" cellpadding="0" cellspacing="0">
148                                <table align="left" width="100%" style="border: 0px solid black">
149                                <tbody id="cc_conn">&nbsp;
150                                        <!-- Code inside here is inserted dynamically -->
151                                </tbody>                               
152                                </table>
153                        </td>
154                </tr>
155        </tbody>
156        <tbody>
157                <tr>
158                        <td align="center" colspan="4">&nbsp;</td>
159                </tr>
160        </tbody>
161        </table>
162        <div style="z-index:10000;position: absolute;display:none; top: 170px; left: 78px;" id="div_cc_conn_is_default"> {cc_default} &nbsp;<select id="cc_email_default" name="cc_email_default" disabled style="display:none"></select><select id="cc_phone_default" name="cc_phone_default" disabled style="display:none"></select></div>
163</div>
164
165<!-- _GROUPS -->
166<div id="cc_contact_groups_tab" class="row_off div_cc_contact_tab" style="position: absolute; visibility: hidden;height:247px;width:498px">
167        <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
168                <tr>
169                        <td  align="right">
170                                <table border="0" cellpadding="0" cellspacing="0">
171                                        <tr height="30" class="th">
172                                                <td  align="center">{cc_grps_available}</td>                                   
173                                        </tr>
174                                        <tr height="30" class="th">
175                                                <td  align="right"><select  id="id_grps_available" multiple name="grps_available[]" style="width:200px" size="10"></select></td>
176                                        </tr>
177                                </table>
178                        </td>
179                        <td id="buttons" width="95" align="center">
180                                <button type="button" onClick="javascript:selectGroup()"><img src="../phpgwapi/templates/celepar/images/add.png" style="vertical-align: middle;" >&nbsp;{txt_add}</button>
181                                <br><br>
182                                <button type="button" onClick="javascript:deselectGroup()"><img src="../phpgwapi/templates/celepar/images/rem.png" style="vertical-align: middle;" >&nbsp;{txt_rem}</button>
183                        </td>
184                        <td  align="left">
185                                <table border="0" cellpadding="0" cellspacing="0">
186                                        <tr height="30" class="th">
187                                                <td  align="center">{cc_grps_selected}</td>                                     
188                                        </tr>
189                                        <tr height="30" class="th">
190                                                <td  align="left"><select  id="id_grps_selected" multiple name="grps_selected[]" style="width:200px" size="10"></select></td>
191                                        </tr>
192                                </table>
193                        </td>
194                </tr>
195        </table>
196</div>
197
198<!-- _BOTTOM BUTTONS -->
199<div align="center" id="cc_contact_tab_buttons" style="position: absolute; visibility: hidden; top: 250px; left: 0px; width: 498px; height: 64px; border: 0px solid black">
200        <table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
201                <tr class="row_off" id="cc_contact_sharing">
202                        <td >{cc_contact_shared}: </td>
203                        <td colspan="2">
204                                        <select id="cc_contact_shared_types" name="{cc_contact_shared}" style="width: 390px;">
205                                                <option value="_NONE_">{cc_contact_shared_types}</option>
206                                        </select>
207                        </td>
208                </tr>
209        </table>
210        <table class="row_off" align="center" width="498px" cellpadding="2" cellspacing="0" border="0">
211                <tr>
212                        <td align="center">
213                                <input id="cc_contact_save" style="width: 100px;" type="button" value="{cc_contact_save}" onclick="javascript:postFullAdd();">
214                                <input id="cc_contact_reset" style="width: 100px;" type="button" value="{cc_contact_reset}" onclick="javascript:resetFullAdd();">
215                                <input id="cc_contact_cancel" style="width: 100px;" type="button" value="{cc_contact_cancel}" onclick="javascript:closeFullAdd();">
216                        </td>
217                </tr>
218        </table>
219</div>
220
221<script type="text/javascript">
222<!--
223//      Overloading some methods for fix cursor problem in Firefox.
224        if(!is_ie) {
225                dJSWin.prototype.close = function() {           
226                        dJSWin.state = 0;
227                        dd.elements[this.title.id].hide();
228                        if ( dd_div = document.getElementById('divScrollMain'))
229                                Element("divScrollMain").style.overflow = 'auto';       
230                }
231                dJSWin.prototype.open = function() {
232                        this.moveTo(window.innerWidth/2 + window.pageXOffset - dd.elements[this.title.id].w/2,
233                            window.innerHeight/2 + window.pageYOffset - dd.elements[this.clientArea.id].h/2);
234                        dd.elements[this.title.id].maximizeZ();
235                        dd.elements[this.title.id].show();
236                        if ( dd_div = document.getElementById('divScrollMain'))
237                                dd_div.style.overflow = 'hidden';
238                }
239        }       
240               
241        var fullAdd_onload = document.body.onload;
242        var tabs;
243        var fullAddWin;
244        var photo_frame, photo_form, photo_input;       
245
246        __f = function(e)
247        {
248               
249                tabs = new dTabsManager({'id': 'cc_contact_tab', 'width': '500px'});
250               
251                tabs.addTab({'id': 'cc_contact_tab_0',
252                                         'name': Element('cc_contact_personal').value,
253                                         'selectedClass': 'tab_box_active',
254                                         'unselectedClass': 'tab_box'});
255                                         
256                tabs.addTab({'id': 'cc_contact_tab_2',
257                                         'name': Element('cc_contact_conns').value,
258                                         'selectedClass': 'tab_box_active',
259                                         'unselectedClass': 'tab_box'});
260
261                tabs.addTab({'id': 'cc_contact_tab_1',
262                                         'name': Element('cc_contact_addrs').value,
263                                         'selectedClass': 'tab_box_active',
264                                         'unselectedClass': 'tab_box'});
265                tabs.addTab({'id': 'cc_contact_groups_tab',
266                                         'name': Element('cc_contact_grps').value,
267                                         'selectedClass': 'tab_box_active',
268                                         'unselectedClass': 'tab_box'});                         
269
270                fullAddWin = new dJSWin({'id': 'cc_full_add_window',
271                                         'content_id': 'cc_contact_tab',
272                                         'win_class': 'row_off',
273                                         'width': '500px',
274                                         'height': '295px',
275                                         'title_color': '#3978d6',
276                                         'title': Element('cc_contact_title').value,
277                                         'title_text_color': 'white',
278                                         'button_x_img': Element('cc_phpgw_img_dir').value+'/winclose.gif',
279                                         'include_contents': new Array('cc_contact_tab_0', 'cc_contact_tab_1', 'cc_contact_tab_2','cc_contact_groups_tab','cc_contact_tab_buttons'),
280                                         'border': true});
281
282                fullAddWin.draw();
283
284                if (is_ie)
285                {
286                        Element('cc_photo_frame').src = 'cc_photo_frame.html';
287                        Element('cc_pd_select_photo').style.display='none';
288                        fullAddWin.open();
289                        tabs._showTab('cc_contact_tab_0');
290                        fullAddWin.close();
291                }
292                else
293                {
294                        Element('cc_pd_select_photo_t').style.display='none';
295                        Element('cc_pd_select_photo_b').style.display='none';                   
296                }
297        };
298
299        if (is_ie) // || is_moz1_6)
300        {
301                       
302                document.body.onload = function(e) { setTimeout('__f()', 10); fullAdd_onload ? setTimeout('fullAdd_onload()'): false;};
303        }
304        else
305        {
306//              __f();
307        }
308
309//-->
310</script>
311<!-- END WINDOW CONTACT -->
312
313
314
315
316
317
318
319
320
321
322<!-- RELATIONS
323<div id="cc_contact_tab_3" class="row_off div_cc_contact_tab">
324        <table align="center" width="500px" height="100%" cellpadding="2" cellspacing="0" border="0">
325                <tr class="row_off">
326                        <td align="right"><input style="width: 240px;" type="text"></td>
327                        <td align="left"><input style="width: 150px;" type="button" value="{cc_btn_search}"></td>
328                </tr>
329                <tr class="row_on">
330                        <td align="left">{cc_results}:</td>
331                        <td align="left">{cc_is_my}:</td>
332                </tr>
333                <tr class="row_off">
334                        <td align="right"><select style="width: 240px; height: 150px;" multiple></select></td>
335                        <td align="left"><select id="cc_rels_type" style="width: 240px; height: 150px;" multiple></select></td>
336                </tr>
337                <tr class="row_on">
338                        <td align="right"><input style="width: 150px;" type="button" value="{cc_add_relation}"></td>
339                        <td align="left"><input style="width: 150px;" type="button" value="{cc_del_relation}"></td>
340                </tr>
341                <tr class="row_off">
342                        <td align="center" colspan="2"><select style="width: 480px; height: 120px;" multiple></select></td>
343                </tr>
344        </table>
345</div>
346-->
Note: See TracBrowser for help on using the repository browser.