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