Fiscal calendar selection in Org Unit Config UI collab/berick/acq-fiscal-year-mgt
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Sep 2011 20:46:03 +0000 (16:46 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 21 Sep 2011 20:46:03 +0000 (16:46 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/conify/global/actor/org_unit.html
Open-ILS/web/opac/locale/en-US/conify.dtd

index 1c71ea4..aa2f838 100644 (file)
                        }
                     });
 
+                    pcrud.retrieveAll( 'acqfc', {
+                        timeout : 10, order_by : { acqfc : 'name' },
+                        oncomplete : function (r) {
+                            window._fiscal_cal_list = r.recv().content();
+                            window._fiscal_cal_data = aout.toStoreData( window._fiscal_cal_list );
+                            window.fiscal_cal_store = new dojo.data.ItemFileReadStore({ data : window._fiscal_cal_data });
+                       }
+                    });
+
                                        highlighter.ou_tree = {};
                                        highlighter.editor_pane = {};
                                        highlighter.hoo_pane = {};
 
                                                dojo.byId('current_ou_name').innerHTML = this.store.getValue( current_ou, 'name' );
 
-                                               var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type' ];
+                                               var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type', 'fiscal_calendar' ];
                                                for ( var i in main_settings_fields ) {
                                                        var field = main_settings_fields[i];
                                                        var value = this.store.getValue( current_ou, field );
                                                                        </div>
                                                                </td>
                                                        </tr>
+                            <tr>
+                                <th>&conify.org_unit.editor_pane.fiscal_calendar;</th>
+                                                               <td>
+                                                                       <div
+                                                                         id="editor_pane_fiscal_calendar"
+                                                                         dojoType="dijit.form.FilteringSelect"
+                                                                         jsId="editor_pane_fiscal_calendar"
+                                                                         store="fiscal_cal_store"
+                                                                         searchAttr="name"
+                                                                         ignoreCase="true"
+                                                                         required="true">
+                                                                               <script type="dojo/method" event="onChange">
+                                                                                       if (current_ou) ou_list_store.setValue( current_ou, "fiscal_calendar", this.getValue() );
+                                                                               </script>
+                                                                       </div>
+                                                               </td>
+                                                       </tr>
                                                        <tr>
                                                                <th>&conify.org_unit.editor_pane.opac_visible;</th>
                                                                <td>
                                                                                                save_ou_button.disabled = true;
                                                                                                delete_ou_button.disabled = true;
 
-                                                                                               var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type', 'parent_ou' ];
+                                                                                               var main_settings_fields = [ 'name', 'shortname', 'email', 'phone', 'ou_type', 'parent_ou', 'fiscal_calendar' ];
                                                                                                for ( var i in main_settings_fields ) {
                                                                                                        var field = main_settings_fields[i];
                                                                                                        window["editor_pane_" + field].setValue( '' ); // unset the value
index c0cf5a7..54674bf 100644 (file)
@@ -33,6 +33,7 @@
 <!ENTITY conify.org_unit.editor_pane.org_unit_type "Organization Unit Type">
 <!ENTITY conify.org_unit.editor_pane.parent "Parent Organization Unit">
 <!ENTITY conify.org_unit.editor_pane.opac_visible "OPAC Visible">
+<!ENTITY conify.org_unit.editor_pane.fiscal_calendar "Fiscal Calendar">
 <!-- Hours of operation --> 
 <!ENTITY conify.org_unit.hoo_pane.title "Hours of Operation">
 <!ENTITY conify.org_unit.hoo_pane.open_time "Open time">