locale parsing based on URL knowledge (because apache is not helping); aou.name trans...
[Evergreen.git] / Open-ILS / web / conify / global / actor / org_unit.html
index b250faa..1264bd5 100644 (file)
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
-               <script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
+               <script type="text/javascript">
+                       var djConfig = { parseOnLoad : true };
+
+                       var _url_locale = location.href.replace(/^.*conify\/(.+)\/global.*$/, "$1").toLowerCase().replace(/-/,'_');
+                       if (_url_locale) djConfig.locale = _url_locale;
+                       else djConfig.locale = '<!--#echo var="locale"-->';
+
+               </script>
+
+               <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
 
                <script type="text/javascript" src="org_unit.js"></script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
 
                <script type="text/javascript" src="org_unit.js"></script>
                                                right_pane_toggler.show();
 
                                                current_ou = item;
                                                right_pane_toggler.show();
 
                                                current_ou = item;
+                                               window.current_fm_ou = new aou().fromStoreItem(item);
 
                                                highlighter.editor_pane.green.play();
                                                status_update( 'Now editing ' + this.store.getValue( item, 'name' ) );
 
                                                highlighter.editor_pane.green.play();
                                                status_update( 'Now editing ' + this.store.getValue( item, 'name' ) );
                                                                                        if (current_ou) ou_list_store.setValue( current_ou, "name", this.getValue() );
                                                                                </script>
                                                                        </span>
                                                                                        if (current_ou) ou_list_store.setValue( current_ou, "name", this.getValue() );
                                                                                </script>
                                                                        </span>
+                                                                       <span dojoType="openils.I18N.translationWidget" targetObject="current_fm_ou" field="name"></span>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                        <div id="billing_address" dojoType="dijit.layout.ContentPane" title="Physical Address">
                                                                <table class="tundra" style="margin:10px;">
                                                                        <tr>
                                                        <div id="billing_address" dojoType="dijit.layout.ContentPane" title="Physical Address">
                                                                <table class="tundra" style="margin:10px;">
                                                                        <tr>
-                                                                               <th>Type</th><td colspan="3"><span jsId="billing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.address_type( this.getValue() )"/></td>
+                                                                               <th>Type</th>
+                                                                               <td colspan="3">
+                                                                                       <span jsId="billing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.address_type( this.getValue() )"/>
+                                                                               </td>
                                                                                <th>Valid</th><td>
                                                                                        <input
                                                                                          type="checkbox"
                                                                                <th>Valid</th><td>
                                                                                        <input
                                                                                          type="checkbox"