]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/conify/global/actor/org_unit.html
LP1873286: Fix Bad End Tags
[Evergreen.git] / Open-ILS / web / conify / global / actor / org_unit.html
1 <!--
2 # Copyright (C) 2008  Georgia Public Library Service / Equinox Software, Inc
3 # Mike Rylander <miker@esilibrary.com>
4
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 -->
15 <!DOCTYPE html PUBLIC 
16         "-//W3C//DTD XHTML 1.0 Transitional//EN" 
17         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
18         <!--#include virtual="/opac/locale/${locale}/conify.dtd"-->
19 ]>
20 <html xmlns="http://www.w3.org/1999/xhtml">
21         <head>
22                 <title>&conify.org_unit.title;</title>
23
24                 <style type="text/css">
25                         @import url('/js/dojo/dojo/resources/dojo.css');
26                         @import url('/js/dojo/dijit/themes/tundra/tundra.css');
27                         @import url('/js/dojo/dojox/widget/Toaster/Toaster.css');
28                 </style>
29
30                 <style type="text/css">
31                         html, body
32                         {
33                                 height: 100%;
34                                 width: 100%;
35                                 margin: 0px 0px 0px 0px;
36                                 padding: 0px 0px 0px 0px;
37                                 overflow: hidden;
38                         }
39
40                         th
41                         {
42                                 text-align: right;
43                                 font-weight: bold;
44                                 padding-left: 20px;
45                                 padding-right: 5px;
46                         }
47             /* this is a hack to get the right pane to display
48                in recent browsers when using this interface
49                embedded in the web staff client
50             */
51             .dijitLayoutContainer {
52                 position: static;
53             }
54                 </style>
55
56                 <!-- The OpenSRF API writ JS -->
57                 <script language='javascript' src='/IDL2js' type='text/javascript'></script>
58                 <script language='javascript' src='/opac/common/js/utils.js' type='text/javascript'></script>
59                 <script language='javascript' src='/opac/common/js/CGI.js' type='text/javascript'></script>
60                 <script language='javascript' src='/opac/common/js/JSON_v1.js' type='text/javascript'></script>
61
62                 <!-- Dojo goodness -->
63                 <script type="text/javascript" src="../admin.js"></script>
64
65                 <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
66                 <script type="text/javascript" src="/js/dojo/dojo/openils_dojo.js"></script>
67                 <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
68
69                 <script type="text/javascript" src="org_unit.js"></script>
70
71         </head>
72
73         <body class="tundra" id='pagebody'>
74
75                 <div dojoType="dijit.layout.SplitContainer" orientation="horizontal" style="height: 100%">
76
77                         <div dojoType="dijit.layout.ContentPane" sizeShare="100">
78                                 <script type="dojo/method">
79 <![CDATA[
80
81                     pcrud.retrieveAll( 'aou', {
82                         timeout : 10, order_by : { aou : 'shortname' },
83                         onerror : function (r) { status_update(aou_strings.ERROR_FETCHING_ORGS); },
84                         oncomplete : function (r) {
85                             var _ou_list = r.recv().content();
86                             var _ou_data = aou.toStoreData( _ou_list );
87                             ou_list_store = new dojo.data.ItemFileWriteStore({ data : _ou_data });
88
89                             ou_list_store.onSet = function (item, attr, o, n) {
90                                 if (attr == 'ischanged') return;
91                                 if ((n == o) || ((o == null) && (n == ''))) return;
92                                 this.setValue( item, 'ischanged', 1);
93                             };
94
95                             dojo.addOnUnload( function (event) {
96
97                                 ou_list_store.fetch({
98                                     query : { ischanged : 1 },
99                                     queryOptions : { deep : true },
100                                     onItem : function (item, req) {
101                                         try {
102                                             if (this.isItem( item )) window.dirtyStore.push( item );
103                                         } catch (e) {}
104                                     },
105                                     scope : window.ou_list_store
106                                 });
107
108                                 if (window.dirtyStore.length > 0) {
109                                     var confirmation = confirm(aou_strings.CONFIRM_EXIT_AOU);
110
111                                     if (confirmation) {
112                                         for (var i in dirtyStore) {
113                                             current_ou = window.dirtyStore[i];
114                                             save_org(true);
115                                         }
116                                     }
117                                 }
118                             });
119                         }
120                     });
121
122                     pcrud.retrieveAll( 'aout', {
123                         timeout : 10, order_by : { aout : 'depth' },
124                         onerror : function (r) { status_update(aou_strings.ERROR_FETCHING_TYPES_AOUT); },
125                         oncomplete : function (r) {
126                             window._ou_type_list = r.recv().content();
127                             window._ou_type_data = aout.toStoreData( window._ou_type_list );
128                             window.ou_type_store = new dojo.data.ItemFileReadStore({ data : window._ou_type_data });
129                        }
130                     });
131
132                                         highlighter.ou_tree = {};
133                                         highlighter.editor_pane = {};
134                                         highlighter.hoo_pane = {};
135                                         highlighter.addresses_pane = {};
136
137                                         highlighter.ou_tree.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'ou_tree', duration : 500 } );
138                                         highlighter.ou_tree.red = dojox.fx.highlight( { color : '#FF2018', node : 'ou_tree', duration : 500 } );
139
140                                         highlighter.editor_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'editor_pane', duration : 500 } );
141                                         highlighter.editor_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'editor_pane', duration : 500 } );
142
143                                         highlighter.hoo_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'hoo_pane', duration : 500 } );
144                                         highlighter.hoo_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'hoo_pane', duration : 500 } );
145
146                                         highlighter.addresses_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'addresses_pane', duration : 500 } );
147                                         highlighter.addresses_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'addresses_pane', duration : 500 } );
148 ]]>
149                                 </script>
150                                 <div
151                                   id="ou_tree"
152                                   label="&conify.org_unit.ou_tree.label;"
153                                   query="{'_top':'true'}"
154                                   dojoType="dijit.Tree"
155                                   store="ou_list_store"
156                                   minSize="200"
157                                   jsId="ou_tree"
158                                 >
159
160                                         <script type="dojo/method" event="onClick" args="item,node">
161 <![CDATA[
162                                                 right_pane_toggler.show();
163
164                                                 current_ou = item;
165                                                 window.current_fm_ou = new aou().fromStoreItem(item);
166
167                                                 highlighter.editor_pane.green.play();
168                                                 status_update( dojo.string.substitute( aou_strings.STATUS_EDITING, [this.store.getValue( item, 'name' )] ) );
169
170                                                 new_kid_button.disabled = false;
171                                                 save_ou_button.disabled = false;
172                                                 delete_ou_button.disabled = false;
173
174                                                 dojo.byId('current_ou_name').innerHTML = this.store.getValue( current_ou, 'name' );
175
176                                                 var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type' ];
177                                                 for ( var i in main_settings_fields ) {
178                                                         var field = main_settings_fields[i];
179                                                         var value = this.store.getValue( current_ou, field );
180
181                                                         if (!value) {
182                                                                 window["editor_pane_" + field].setValue( '' ); // unset the value
183                                                                 window["editor_pane_" + field].setDisplayedValue( '' ); // unset the value
184                                                         } else window["editor_pane_" + field].setValue( value );
185                                                 }
186
187                                                 if ( this.store.getValue( current_ou, '_trueRoot' ) == 'true' ) {
188                                                         editor_pane_parent_ou.disabled = true;
189                                                         editor_pane_parent_ou.setValue(null);
190                                                         editor_pane_parent_ou.setDisplayedValue('');
191                                                         editor_pane_parent_ou.validate(false);
192                                                 } else {
193                                                         editor_pane_parent_ou.disabled = false;
194                                                         editor_pane_parent_ou.validate(true);
195                                                         editor_pane_parent_ou.setValue( this.store.getValue( current_ou, 'parent_ou' ) );
196                                                 }
197
198                                                 editor_pane_opac_visible.setChecked( this.store.getValue( current_ou, 'opac_visible' ) == 't' ? true : false );
199
200                                                 hoo_load();
201                                                 addr_load();
202 ]]>
203                                         </script>
204
205                                         <script type="dojo/method" event="getLabel" args="item,pI">
206                                                 var label = this.store.getValue(item,'shortname') + ' : ' + this.store.getValue(item,'name');
207                                                 if (this.store.getValue(item,'ischanged') == 1) label = '* ' + label;
208                                                 return label;
209                                         </script>
210
211                                 </div>
212                         </div>
213
214                         <div jsId="right_pane" id="right_pane" dojoType="dijit.layout.ContentPane"  sizeShare="200">
215                                 <script type="dojo/method">
216                                         window.right_pane_toggler = new dojo.fx.Toggler({ node: 'right_pane'});
217                                         window.right_pane_toggler.hide();
218                                 </script>
219
220                                 <div id="right_tabpane" dojoType="dijit.layout.TabContainer">
221         
222                                         <div id="editor_pane" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.editor_pane.title;">
223
224                                                 <table class="tundra" style="margin:10px;">
225                                                         <tr>
226                                                                 <th>&conify.org_unit.editor_pane.org_unit_name;</th>
227                                                                 <td>
228                                                                         <span id="editor_pane_name" dojoType="dijit.form.ValidationTextBox" jsId="editor_pane_name" regExp=".+" required="true">
229                                                                                 <script type="dojo/connect" event="onChange">
230                                                                                         if (current_ou) ou_list_store.setValue( current_ou, "name", this.getValue() );
231                                                                                 </script>
232                                                                         </span>
233                                                                         <span dojoType="openils.widget.TranslatorPopup" targetObject="current_fm_ou" field="name"></span>
234                                                                 </td>
235                                                         </tr>
236                                                         <tr>
237                                                                 <th>&conify.org_unit.editor_pane.org_unit_code;</th>
238                                                                 <td>
239                                                                         <span id="editor_pane_shortname" dojoType="dijit.form.ValidationTextBox" jsId="editor_pane_shortname" uppercase="true" regExp=".+" required="true">
240                                                                                 <script type="dojo/connect" event="onChange">
241                                                                                         if (current_ou) ou_list_store.setValue( current_ou, "shortname", this.getValue() );
242                                                                                 </script>
243                                                                         </span>
244                                                                 </td>
245                                                         </tr>
246                                                         <tr>
247                                                                 <th>&conify.org_unit.editor_pane.main_email;</th>
248                                                                 <td>
249                                                                         <span id="editor_pane_email" dojoType="dijit.form.ValidationTextBox" jsId="editor_pane_email" regExp="[a-zA-Z0-9!#$%'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?">
250                                                                                 <script type="dojo/connect" event="onChange">
251                                                                                         if (current_ou) ou_list_store.setValue( current_ou, "email", this.getValue() );
252                                                                                 </script>
253                                                                         </span>
254                                                                 </td>
255                                                         </tr>
256                                                         <tr>
257                                                                 <th>&conify.org_unit.editor_pane.main_phone;</th>
258                                                                 <td>
259                                                                         <span id="editor_pane_phone" dojoType="dijit.form.ValidationTextBox" jsId="editor_pane_phone" regExp="^(?:(?:\d{1}[ -\.])?\(?\d{3}\)?[ -\.]{1})?\d{3}[ -\.]{1}\d{4}(| \S+.*)$">
260                                                                                 <script type="dojo/connect" event="onChange">
261                                                                                         if (current_ou) ou_list_store.setValue( current_ou, "phone", this.getValue() );
262                                                                                 </script>
263                                                                         </span>
264                                                                 </td>
265                                                         </tr>
266                                                         <tr>
267                                                                 <th>&conify.org_unit.editor_pane.org_unit_type;</th>
268                                                                 <td>
269                                                                         <div
270                                                                           id="editor_pane_ou_type"
271                                                                           dojoType="dijit.form.FilteringSelect"
272                                                                           jsId="editor_pane_ou_type"
273                                                                           store="ou_type_store"
274                                                                           searchAttr="name"
275                                                                           ignoreCase="true"
276                                                                           required="true"
277                                                                         >
278                                                                                 <script type="dojo/method" event="onChange">
279                                                                                         if (current_ou) ou_list_store.setValue( current_ou, "ou_type", this.getValue() );
280                                                                                 </script>
281                                                                         </div>
282                                                                 </td>
283                                                         </tr>
284                                                         <tr>
285                                                                 <th>&conify.org_unit.editor_pane.parent;</th>
286                                                                 <td>
287                                                                         <div
288                                                                           id="editor_pane_parent_ou"
289                                                                           dojoType="dijit.form.FilteringSelect"
290                                                                           jsId="editor_pane_parent_ou"
291                                                                           store="ou_list_store"
292                                                                           searchAttr="shortname"
293                                                                           ignoreCase="true"
294                                                                           required="true"
295                                                                         >
296                                                                                 <script type="dojo/method" event="onChange">
297 <![CDATA[
298                                                                                         if (current_ou && this.getValue()) this.store.setValue( current_ou, "parent_ou", this.getValue() );
299                                                                                         if ( this.store.getValue( current_ou, '_trueRoot' ) == 'true' ) this.required = false;
300                                                                                         else this.required = true;
301 ]]>
302                                                                                 </script>
303                                                                         </div>
304                                                                 </td>
305                                                         </tr>
306                                                         <tr>
307                                                                 <th>&conify.org_unit.editor_pane.opac_visible;</th>
308                                                                 <td>
309                                                                         <input
310                                                                           id="editor_pane_opac_visible"
311                                                                           jsId="editor_pane_opac_visible"
312                                                                           type="checkbox"
313                                                                           dojoType="dijit.form.CheckBox"
314                                                                           onChange="if (current_ou) ou_list_store.setValue( current_ou, 'opac_visible', this.checked ? 't' : 'f' );"
315                                                                         />
316                                                                 </td>
317                                                         </tr>
318                                                 </table>
319         
320                                                 <div dojoType="dijit.layout.ContentPane" orientation="horizontal" style="margin-bottom: 20px;">
321         
322                                                         <button jsId="save_ou_button" dojoType="dijit.form.Button" label="&conify.save_button.label;" onClick="save_org()">
323                                                                 <script type="dojo/connect" event="startup">
324                                                                         this.disabled = true;
325                                                                 </script>
326                                                         </button>
327         
328                                                         <button jsId="delete_ou_button" dojoType="dijit.form.Button" label="&conify.delete_button.label;">
329                                                                 <script type="dojo/connect" event="startup">
330                                                                         this.disabled = true;
331                                                                 </script>
332                                                                 <script type="dojo/connect" event="onClick">
333 <![CDATA[
334                                                                         var old_name = ou_list_store.getValue( current_ou, 'name' );
335
336                                                                         if (ou_list_store.getValue( current_ou, '_trueRoot' ) == 'true') {
337                                                                                 highlighter.editor_pane.red.play();
338                                                                                 status_update( dojo.string.substitute( aou_strings.ERROR_DELETING_LAST_AOU, [ou_list_store.getValue( current_ou, 'name' )] ) );
339                                                                                 return false;
340                                                                         }
341
342                                                                         if ( current_ou.children ) {
343                                                                                 var kids = current_ou.children;
344                                                                                 if (!dojo.isArray(kids)) kids = [kids];
345         
346                                                                                 var existing_kids = dojo.filter(
347                                                                                         kids,
348                                                                                         function(kid){ return kid.isdeleted[0] != 1 }
349                                                                                 );
350                                                                                 if ( existing_kids.length > 0) {
351                                                                                         highlighter.editor_pane.red.play();
352                                                                                         status_update( dojo.string.substitute( aou_strings.ERROR_ORPHANS, [ou_list_store.getValue( current_ou, 'name' ), existing_kids.length] ) );
353                                                                                         return;
354                                                                                 }
355                                                                         }
356         
357                                                                         if (confirm(dojo.string.substitute(aou_strings.CONFIRM_DELETE, [current_ou.name]))) {
358                                                                                 ou_list_store.setValue( current_ou, 'isdeleted', 1 );
359
360                                                                                 var modified_ou = new aou().fromStoreItem( current_ou );
361                                                                                 modified_ou.isdeleted( 1 );
362
363                                                                                 var objs = [];
364                                                                                 objs.push(modified_ou);
365                                                                                 if (!current_billing_address.isnew()) {
366                                                                                         current_billing_address.isdeleted( 1 );
367                                                                                         objs.push(current_billing_address);
368                                                                                 }
369
370                                                                                 if (!current_mailing_address.isnew()) {
371                                                                                         current_mailing_address.isdeleted( 1 );
372                                                                                         objs.push(current_mailing_address);
373                                                                                 }
374
375                                                                                 if (!current_holds_address.isnew()) {
376                                                                                         current_holds_address.isdeleted( 1 );
377                                                                                         objs.push(current_holds_address);
378                                                                                 }
379
380                                                                                 if (!current_ill_address.isnew()) {
381                                                                                         current_ill_address.isdeleted( 1 );
382                                                                                         objs.push(current_ill_address);
383                                                                                 }
384
385                                                                                 if (!current_ou_hoo.isnew()) {
386                                                                                         current_ou_hoo.isdeleted( 1 );
387                                                                                         objs.push(current_ou_hoo);
388                                                                                 }
389
390                                                                                 pcrud.apply(objs, {
391                                                                                         timeout : 10,
392                                                                                         onerror : function (r) {
393                                                                                                 highlighter.editor_pane.red.play();
394                                                                                                 status_update(dojo.string.substitute(aou_strings.ERROR_DELETING, [old_name]));
395                                                                                         },
396                                                                                         oncomplete : function (r) {
397                                                                                                 new_kid_button.disabled = true;
398                                                                                                 save_ou_button.disabled = true;
399                                                                                                 delete_ou_button.disabled = true;
400
401                                                                                                 var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type', 'parent_ou' ];
402                                                                                                 for ( var i in main_settings_fields ) {
403                                                                                                         var field = main_settings_fields[i];
404                                                                                                         window["editor_pane_" + field].setValue( '' ); // unset the value
405                                                                                                         window["editor_pane_" + field].setDisplayedValue( '' ); // unset the value
406                                                                                                 }
407
408                                                                                                 ou_list_store.fetch({
409                                                                                                         query : { id : ou_list_store.getValue( current_ou, 'id' ) },
410                                                                                                         queryOptions : { deep : true },
411                                                                                                         onItem : function (item, req) { try { if (this.isItem( item )) this.deleteItem( item ); } catch (e) { } },
412                                                                                                         scope : ou_list_store
413                                                                                                 });
414
415                                                                                                 current_billing_address = null;
416                                                                                                 current_mailing_address = null;
417                                                                                                 current_holds_address = null;
418                                                                                                 current_ill_address = null;
419                                                                                                 current_ou_hoo = null;
420                                                                                                 current_ou = null;
421
422                                                                                                 highlighter.editor_pane.green.play();
423                                                                                                 status_update(dojo.string.substitute(aou_strings.STATUS_DELETED, [old_name]));
424                                                                                         }
425                                                                                 });
426                                                                         }
427 ]]>
428                                                                 </script>
429                                                         </button>
430         
431                                                 </div>
432         
433                                                 <button jsId="new_kid_button" dojoType="dijit.form.Button" label="&conify.new_kid_button.label;">
434                                                         <script type="dojo/connect" event="startup">
435                                                                 this.disabled = true;
436                                                         </script>
437                                                         <script type="dojo/connect" event="onClick">
438 <![CDATA[
439                                                                 var new_fm_obj = new aou().fromHash({
440                                                                         isnew                   : 1,
441                                                                         name                    : aou_strings.LABEL_NEW_BRANCH + virgin_ou_id,
442                                                                         opac_visible    : 'f',
443                                                                         shortname               : ou_list_store.getValue( current_ou, 'shortname' ) + '-NEW' + virgin_ou_id--,
444                                                                         parent_ou               : ou_list_store.getValue( current_ou, 'id' ),
445                                                                         ou_type                 : ou_list_store.getValue( current_ou, 'ou_type' )
446                                                                 });
447
448                                                                 pcrud.create( new_fm_obj, {
449                                                                         timeout : 10,
450                                                                         onerror : function (r) {
451                                                                                 highlighter.editor_pane.red.play();
452                                                                                 status_update( aou_strings.ERROR_CREATING_CHILD_AOU );
453                                                                         },
454                                                                         oncomplete : function (r, list) {
455                                                                                 
456                                                                                 if ( list.length ) {
457                                                                                         ou_list_store.newItem(
458                                                                                                 list[0].toHash(),
459                                                                                                 { parent : current_ou, attribute : 'children' }
460                                                                                         );
461                                                                                 } else {
462                                                                                         highlighter.editor_pane.red.play();
463                                                                                         status_update( aou_strings.ERROR_CREATING_CHILD_AOU );
464                                                                                 }
465                                                                         }
466                                                                 });
467         
468                                                                 highlighter.editor_pane.green.play();
469                                                                 highlighter.ou_tree.green.play();
470                                                                 status_update( dojo.string.substitute(aou_strings.SUCCESS_CREATING_CHILD_AOU, [ou_list_store.getValue( current_ou, 'name' )] ) );
471 ]]>
472                                                         </script>
473                                                 </button>
474         
475                                         </div>
476
477                                         <div id="hoo_pane" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.hoo_pane.title;">
478                                                 <table class="tundra" style="margin:10px;">
479                                                         <tr><th></th><th>&conify.org_unit.hoo_pane.open_time;</th><th>&conify.org_unit.hoo_pane.close_time;</th></tr>
480                                                         <tr><th>&conify.org_unit.hoo_pane.monday;</th>
481                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_0_open" onChange="set_hoo_thisvalue('dow_0_open', this.value);"></span></td>
482                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_0_close" onChange="set_hoo_thisvalue('dow_0_close', this.value);"></span></td>
483                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_0_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_0_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
484                                                         </tr>
485                                                         <tr><th>&conify.org_unit.hoo_pane.tuesday;</th>
486                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_1_open" onChange="set_hoo_thisvalue('dow_1_open', this.value);"></span></td>
487                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_1_close" onChange="set_hoo_thisvalue('dow_1_close', this.value);"></span></td>
488                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_1_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_1_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
489                                                         </tr>
490                                                         <tr><th>&conify.org_unit.hoo_pane.wednesday;</th>
491                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_2_open" onChange="set_hoo_thisvalue('dow_2_open', this.value);"></span></td>
492                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_2_close" onChange="set_hoo_thisvalue('dow_2_close', this.value);"></span></td>
493                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_2_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_2_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
494                                                         </tr>
495                                                         <tr><th>&conify.org_unit.hoo_pane.thursday;</th>
496                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_3_open" onChange="set_hoo_thisvalue('dow_3_open', this.value);"></span></td>
497                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_3_close" onChange="set_hoo_thisvalue('dow_3_close', this.value);"></span></td>
498                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_3_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_3_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
499                                                         </tr>
500                                                         <tr><th>&conify.org_unit.hoo_pane.friday;</th>
501                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_4_open" onChange="set_hoo_thisvalue('dow_4_open', this.value);"></span></td>
502                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_4_close" onChange="set_hoo_thisvalue('dow_4_close', this.value);"></span></td>
503                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_4_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_4_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
504                                                         </tr>
505                                                         <tr><th>&conify.org_unit.hoo_pane.saturday;</th>
506                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_5_open" onChange="set_hoo_thisvalue('dow_5_open', this.value);"></span></td>
507                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_5_close" onChange="set_hoo_thisvalue('dow_5_close', this.value);"></span></td>
508                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_5_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_5_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
509                                                         </tr>
510                                                         <tr><th>&conify.org_unit.hoo_pane.sunday;</th>
511                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_6_open" onChange="set_hoo_thisvalue('dow_6_open', this.value);"></span></td>
512                                                                 <td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_6_close" onChange="set_hoo_thisvalue('dow_6_close', this.value);"></span></td>
513                                                                 <td><span dojoType="dijit.form.Button" label="&conify.org_unit.hoo_pane.closed;" onClick="dow_6_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_6_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"></span></td>
514                                                         </tr>
515                                                 </table>
516         
517                                                 <button jsId="save_hoo_button" dojoType="dijit.form.Button" label="&conify.save_button.label;">
518                             <script type="dojo/connect" event="startup">
519                                 this.disabled = true;
520                             </script>
521                                                         <script type="dojo/connect" event="onClick">
522 <![CDATA[
523                                 if (!current_ou_hoo.isnew()) {
524                                     current_ou_hoo.ischanged( 1 );
525                                 }
526
527                                 pcrud.apply( current_ou_hoo, {
528                                     timeout : 10,
529                                     onerror : function (r) {
530                                         highlighter.hoo_pane.red.play();
531                                         status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_HOO, [ou_list_store.getValue( current_ou, 'name' )] ) );
532                                     },
533                                     oncomplete : function (r) {
534                                         current_ou_hoo.isnew( 0 );
535                                         current_ou_hoo.ischanged( 0 );
536                                         highlighter.hoo_pane.green.play();
537                                         status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVING_HOO, [ou_list_store.getValue( current_ou, 'name' )] ) );
538                                     },
539                                 });
540 ]]>
541                                                         </script>
542                                                 </button>
543         
544                                         </div>
545         
546                                         <div id="addresses_pane" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.addresses_pane.title;">
547                                                 
548                                                 <div id="billing_address_pane" dojoType="dijit.layout.TabContainer" style="margin-top:10px">
549         
550                                                         <script type="dojo/method">
551                                                                 current_billing_address = null;
552                                                                 current_mailing_address = null;
553                                                                 current_holds_address = null;
554                                                                 current_ill_address = null;
555                                                         </script>
556         
557                                                         <div id="billing_address" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.addresses_pane.physical.title;">
558                                                                 <table class="tundra" style="margin:10px;">
559                                                                         <tr>
560                                                                                 <th>&conify.org_unit.addresses_pane.type;</th>
561                                                                                 <td colspan="3">
562                                                                                         <span jsId="billing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.address_type( this.getValue() )"></span>
563                                                                                 </td>
564                                                                                 <th>&conify.org_unit.addresses_pane.valid;</th><td>
565                                                                                         <input
566                                                                                           type="checkbox"
567                                                                                           jsId="billing_addr_valid"
568                                                                                           dojoType="dijit.form.CheckBox"
569                                                                                           value='t'
570                                                                                           onChange="if (current_billing_address) current_billing_address.valid( this.checked ? 't' : 'f' );"
571                                                                                         />
572                                                                                 </td>
573                                                                         </tr>
574                                                                         <tr>
575                                                                                 <th>&conify.org_unit.addresses_pane.street1;</th><td colspan="5"><span jsId="billing_addr_street1" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.street1( this.getValue() )" required="true"></span></td>
576                                                                         </tr>
577                                                                         <tr>
578                                                                                 <th>&conify.org_unit.addresses_pane.street2;</th><td colspan="5"><span jsId="billing_addr_street2" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.street2( this.getValue() )"></span></td>
579                                                                         </tr>
580                                                                         <tr>
581                                                                                 <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="billing_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.city( this.getValue() )" required="true"></span></td>
582                                                                                 <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="billing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_billing_address.state( this.getValue() )"></span></td>
583                                                                                 <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="billing_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_billing_address.post_code( this.getValue() )" required="true"></span></td>
584                                                                         </tr>
585                                                                         <tr>
586                                                                                 <th>&conify.org_unit.addresses_pane.country;</th><td colspan="2"><span jsId="billing_addr_country" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.country( this.getValue() )" required="true"></span></td>
587                                                                                 <th>&conify.org_unit.addresses_pane.county;</th><td colspan="2"><span jsId="billing_addr_county" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.county( this.getValue() )" required="true"></span></td>
588                                                                         </tr>
589                                                                         <tr>
590                                                                                 <th>&conify.org_unit.addresses_pane.san;</th><td colspan="2"><span jsId="billing_addr_san" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_billing_address.san( this.getValue() )" required="true"></span></td>
591                                                                         </tr>
592                                                                 </table>
593         
594                                                                 <button jsId="save_billing_address" dojoType="dijit.form.Button" label="&conify.save_button.label;">
595                                                                         <script type="dojo/connect" event="startup">
596                                                                                 this.disabled = true;
597                                                                         </script>
598                                                                         <script type="dojo/connect" event="onClick">
599 <![CDATA[
600                                         if (!current_billing_address.isnew()) {
601                                             current_billing_address.ischanged( 1 );
602                                         }
603
604                                         pcrud.apply( current_billing_address, {
605                                             timeout : 10,
606                                             onerror : function (r) {
607                                                 highlighter.addresses_pane.red.play();
608                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_PHYSICAL, [ou_list_store.getValue( current_ou, 'name' )] ) );
609                                             },
610                                             oncomplete : function (r, list) {
611                                                 if (list[0] && (current_billing_address.isnew() == 1)) {
612                                                     current_billing_address = list[0];
613
614                                                     ou_list_store.setValue( current_ou, "billing_address", current_billing_address.id());
615                                                     save_org();
616                                                 }
617                                                 current_billing_address.isnew( 0 );
618                                                 current_billing_address.ischanged( 0 );
619                                                 highlighter.addresses_pane.green.play();
620                                                 status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVING_PHYSICAL, [ou_list_store.getValue( current_ou, 'name' )] ) );
621                                             },
622                                         });
623 ]]>
624                                                                         </script>
625                                                                 </button>
626                                                         </div>
627
628                                                         <div id="holds_address" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.addresses_pane.holds.title;">
629                                                                 <table class="tundra" style="margin:10px;">
630                                                                         <tr>
631                                                                                 <th>&conify.org_unit.addresses_pane.type;</th><td colspan="3"><span jsId="holds_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_holds_address.address_type( this.getValue() )"></span></td>
632                                                                                 <th>&conify.org_unit.addresses_pane.valid;</th><td>
633                                                                                         <input
634                                                                                           type="checkbox"
635                                                                                           jsId="holds_addr_valid"
636                                                                                           dojoType="dijit.form.CheckBox"
637                                                                                           value='t'
638                                                                                           onChange="if (current_holds_address) current_holds_address.valid( this.checked ? 't' : 'f' );"
639                                                                                         />
640                                                                                 </td>
641                                                                         </tr>
642                                                                         <tr>
643                                                                                 <th>&conify.org_unit.addresses_pane.street1;</th><td colspan="5"><span jsId="holds_addr_street1" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.street1( this.getValue() )" required="true"></span></td>
644                                                                         </tr>
645                                                                         <tr>
646                                                                                 <th>&conify.org_unit.addresses_pane.street2;</th><td colspan="5"><span jsId="holds_addr_street2" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_holds_address.street2( this.getValue() )"></span></td>
647                                                                         </tr>
648                                                                         <tr>
649                                                                                 <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="holds_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.city( this.getValue() )" required="true"></span></td>
650                                                                                 <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="holds_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_holds_address.state( this.getValue() )"></span></td>
651                                                                                 <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="holds_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_holds_address.post_code( this.getValue() )" required="true"></span></td>
652                                                                         </tr>
653                                                                         <tr>
654                                                                                 <th>&conify.org_unit.addresses_pane.country;</th><td colspan="2"><span jsId="holds_addr_country" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.country( this.getValue() )" required="true"></span></td>
655                                                                                 <th>&conify.org_unit.addresses_pane.county;</th><td colspan="2"><span jsId="holds_addr_county" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.county( this.getValue() )" required="true"></span></td>
656                                                                         </tr>
657                                                                         <tr>
658                                                                                 <th>&conify.org_unit.addresses_pane.san;</th><td colspan="2"><span jsId="holds_addr_san" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_holds_address.san( this.getValue() )" required="true"></span></td>
659                                                                         </tr>
660                                                                 </table>
661         
662                                                                 <button jsId="save_holds_address" dojoType="dijit.form.Button" label="&conify.save_button.label;">
663                                                                         <script type="dojo/connect" event="startup">
664                                                                                 this.disabled = true;
665                                                                         </script>
666                                                                         <script type="dojo/connect" event="onClick">
667 <![CDATA[
668                                         if (!current_holds_address.isnew()) {
669                                             current_holds_address.ischanged( 1 );
670                                         }
671
672                                         pcrud.apply( current_holds_address, {
673                                             timeout : 10,
674                                             onerror : function (r) {
675                                                 highlighter.addresses_pane.red.play();
676                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_HOLDS, [ou_list_store.getValue( current_ou, 'name' )] ) );
677                                             },
678                                             oncomplete : function (r, list) {
679                                                 if (list[0] && (current_holds_address.isnew() == 1)) {
680                                                     current_holds_address = list[0];
681
682                                                     ou_list_store.setValue( current_ou, "holds_address", current_holds_address.id());
683                                                     save_org();
684                                                 }
685                                                 current_holds_address.isnew( 0 );
686                                                 current_holds_address.ischanged( 0 );
687                                                 highlighter.addresses_pane.green.play();
688                                                 status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVING_HOLDS, [ou_list_store.getValue( current_ou, 'name' )] ) );
689                                             },
690                                         });
691 ]]>
692                                                                         </script>
693                                                                 </button>
694                                                         </div>
695
696                                                         <div id="mailing_address" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.addresses_pane.mailing.title;">
697                                                                 <table class="tundra" style="margin:10px;">
698                                                                         <tr>
699                                                                                 <th>&conify.org_unit.addresses_pane.type;</th><td colspan="3"><span jsId="mailing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_mailing_address.address_type( this.getValue() )"></span></td>
700                                                                                 <th>&conify.org_unit.addresses_pane.valid;</th><td>
701                                                                                         <input
702                                                                                           type="checkbox"
703                                                                                           jsId="mailing_addr_valid"
704                                                                                           dojoType="dijit.form.CheckBox"
705                                                                                           onChange="if (current_mailing_address) current_mailing_address.valid( this.checked ? 't' : 'f' );"
706                                                                                         />
707                                                                                 </td>
708                                                                         </tr>
709                                                                         <tr>
710                                                                                 <th>&conify.org_unit.addresses_pane.street1;</th><td colspan="5"><span jsId="mailing_addr_street1" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.street1( this.getValue() )" required="true"></span></td>
711                                                                         </tr>
712                                                                         <tr>
713                                                                                 <th>&conify.org_unit.addresses_pane.street2;</th><td colspan="5"><span jsId="mailing_addr_street2" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_mailing_address.street2( this.getValue() )"></span></td>
714                                                                         </tr>
715                                                                         <tr>
716                                                                                 <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="mailing_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.city( this.getValue() )" required="true"></span></td>
717                                                                                 <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="mailing_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_mailing_address.state( this.getValue() )"></span></td>
718                                                                                 <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="mailing_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_mailing_address.post_code( this.getValue() )" required="true"></span></td>
719                                                                         </tr>
720                                                                         <tr>
721                                                                                 <th>&conify.org_unit.addresses_pane.country;</th><td colspan="2"><span jsId="mailing_addr_country" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.country( this.getValue() )" required="true"></span></td>
722                                                                                 <th>&conify.org_unit.addresses_pane.county;</th><td colspan="2"><span jsId="mailing_addr_county" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.county( this.getValue() )" required="true"></span></td>
723                                                                         </tr>
724                                                                         <tr>
725                                                                                 <th>&conify.org_unit.addresses_pane.san;</th><td colspan="2"><span jsId="mailing_addr_san" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_mailing_address.san( this.getValue() )" required="true"></span></td>
726                                                                         </tr>
727                                                                 </table>
728         
729                                                                 <button jsId="save_mailing_address" dojoType="dijit.form.Button" label="&conify.save_button.label;">
730                                                                         <script type="dojo/connect" event="startup">
731                                                                                 this.disabled = true;
732                                                                         </script>
733                                                                         <script type="dojo/connect" event="onClick">
734 <![CDATA[
735                                         if (!current_mailing_address.isnew()) {
736                                             current_mailing_address.ischanged( 1 );
737                                         }
738
739                                         pcrud.apply( current_mailing_address, {
740                                             timeout : 10,
741                                             onerror : function (r) {
742                                                 highlighter.addresses_pane.red.play();
743                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_MAILING, [ou_list_store.getValue( current_ou, 'name' )] ) );
744                                             },
745                                             oncomplete : function (r, list) {
746                                                 if (list[0] && (current_mailing_address.isnew() == 1)) {
747                                                     current_mailing_address = list[0];
748
749                                                     ou_list_store.setValue( current_ou, "mailing_address", current_mailing_address.id());
750                                                     save_org();
751                                                 }
752                                                 current_mailing_address.isnew( 0 );
753                                                 current_mailing_address.ischanged( 0 );
754                                                 highlighter.addresses_pane.green.play();
755                                                 status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVING_MAILING, [ou_list_store.getValue( current_ou, 'name' )] ) );
756                                             },
757                                         });
758 ]]>
759                                                                         </script>
760                                                                 </button>
761                                                         </div>
762
763                                                         <div id="ill_address" dojoType="dijit.layout.ContentPane" title="&conify.org_unit.addresses_pane.ill.title;">
764                                                                 <table class="tundra" style="margin:10px;">
765                                                                         <tr>
766                                                                                 <th>&conify.org_unit.addresses_pane.type;</th><td colspan="3"><span jsId="ill_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_ill_address.address_type( this.getValue() )"></span></td>
767                                                                                 <th>&conify.org_unit.addresses_pane.valid;</th><td>
768                                                                                         <input
769                                                                                           type="checkbox"
770                                                                                           jsId="ill_addr_valid"
771                                                                                           dojoType="dijit.form.CheckBox"
772                                                                                           onChange="if (current_ill_address) current_ill_address.valid( this.checked ? 't' : 'f' );"
773                                                                                         />
774                                                                                 </td>
775                                                                         </tr>
776                                                                         <tr>
777                                                                                 <th>&conify.org_unit.addresses_pane.street1;</th><td colspan="5"><span jsId="ill_addr_street1" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.street1( this.getValue() )" required="true"></span></td>
778                                                                         </tr>
779                                                                         <tr>
780                                                                                 <th>&conify.org_unit.addresses_pane.street2;</th><td colspan="5"><span jsId="ill_addr_street2" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_ill_address.street2( this.getValue() )"></span></td>
781                                                                         </tr>
782                                                                         <tr>
783                                                                                 <th>&conify.org_unit.addresses_pane.city;</th><td><span jsId="ill_addr_city" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.city( this.getValue() )" required="true"></span></td>
784                                                                                 <th>&conify.org_unit.addresses_pane.state;</th><td><span jsId="ill_addr_state" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="2" maxSize="2" uppercase="true" onChange="current_ill_address.state( this.getValue() )"></span></td>
785                                                                                 <th>&conify.org_unit.addresses_pane.zip;</th><td><span jsId="ill_addr_post_code" style="width:100%;" dojoType="dijit.form.ValidationTextBox" size="10" maxSize="10" regExp="^\d{5}(?:-\d{4})?$" uppercase="true" onChange="current_ill_address.post_code( this.getValue() )" required="true"></span></td>
786                                                                         </tr>
787                                                                         <tr>
788                                                                                 <th>&conify.org_unit.addresses_pane.country;</th><td colspan="2"><span jsId="ill_addr_country" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.country( this.getValue() )" required="true"></span></td>
789                                                                                 <th>&conify.org_unit.addresses_pane.county;</th><td colspan="2"><span jsId="ill_addr_county" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.county( this.getValue() )" required="true"></span></td>
790                                                                         </tr>
791                                                                         <tr>
792                                                                                 <th>&conify.org_unit.addresses_pane.san;</th><td colspan="2"><span jsId="ill_addr_san" style="width:100%;" dojoType="dijit.form.ValidationTextBox" onChange="current_ill_address.san( this.getValue() )" required="true"></span></td>
793                                                                         </tr>
794                                                                 </table>
795         
796                                                                 <button jsId="save_ill_address" dojoType="dijit.form.Button" label="&conify.save_button.label;">
797                                                                         <script type="dojo/connect" event="startup">
798                                                                                 this.disabled = true;
799                                                                         </script>
800                                                                         <script type="dojo/connect" event="onClick">
801 <![CDATA[
802                                         if (!current_ill_address.isnew()) {
803                                             current_ill_address.ischanged( 1 );
804                                         }
805
806                                         pcrud.apply( current_ill_address, {
807                                             timeout : 10,
808                                             onerror : function (r) {
809                                                 highlighter.addresses_pane.red.play();
810                                                 status_update( dojo.string.substitute( aou_strings.ERROR_SAVING_ILL, [ou_list_store.getValue( current_ou, 'name' )] ) );
811                                             },
812                                             oncomplete : function (r, list) {
813                                                 if (list[0] && (current_ill_address.isnew() == 1)) {
814                                                     current_ill_address = list[0];
815
816                                                     ou_list_store.setValue( current_ou, "ill_address", current_ill_address.id());
817                                                     save_org();
818                                                 }
819                                                 current_ill_address.isnew( 0 );
820                                                 current_ill_address.ischanged( 0 );
821                                                 highlighter.addresses_pane.green.play();
822                                                 status_update( dojo.string.substitute( aou_strings.SUCCESS_SAVING_ILL, [ou_list_store.getValue( current_ou, 'name' )] ) );
823                                             },
824                                         });
825 ]]>
826                                                                         </script>
827                                                                 </button>
828                                                         </div>
829                                                 </div>
830                                         </div>
831                                 </div>
832                         </div>
833                 </div>
834
835                 <div id="status_bar"><span style="font-weight: bold; margin: 5px; margin-right: 10px;">&conify.org_unit.status_bar;</span><span id="current_ou_name"></span></div>
836         </body>
837 </html>