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