openils.widget.AutoFieldWidget.cache = {};
openils.widget.AutoFieldWidget.defaultLinkedDataLoader = {};
- /* Custom provider-as-link-class fetcher. Fitler is ignored.
- * All viewable providers are retrieved.
- */
- openils.widget.AutoFieldWidget.defaultLinkedDataLoader.acqpro =
- function(linkClass, fitler, oncomplete) {
-
- fieldmapper.standardRequest(
- ['open-ils.acq', 'open-ils.acq.provider.org.retrieve'],
- {
- async : true,
- params : [openils.User.authtoken],
- oncomplete : function(r) {
- var resp;
- var list = [];
- while(resp = r.recv()) {
- var pro = resp.content();
- if(pro) list.push(pro);
- }
- oncomplete(list);
- }
- }
- );
- }
}
function drawInvoicePane(parentNode, inv, args) {
args = args || {};
- var override;
+ var override = {};
if(!inv) {
override = {
recv_date : {widgetValue : dojo.date.stamp.toISOString(new Date())},
};
}
+ dojo.mixin(override, {
+ provider : { dijitArgs : { store_options : { base_filter : { active :"t" } } } },
+ shipper : { dijitArgs : { store_options : { base_filter : { active :"t" } } } }
+ });
+
for(var field in args) {
override[field] = {widgetValue : args[field]};
}
],
"fieldOrder": ["ordering_agency", "provider"],
"mode": "create",
+ overrideWidgetArgs : {
+ provider : { dijitArgs : { store_options : { base_filter : { active :"t" } } } }
+ },
"onSubmit": function(po) {
fieldmapper.standardRequest(
["open-ils.acq", "open-ils.acq.purchase_order.create"],{