<class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
<fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
- <field name="id" reporter:datatype="id" reporter:label="EDI Account ID"/>
+ <field name="id" reporter:datatype="id" reporter:label="EDI Account ID" reporter:selector="label"/>
<field name="label" reporter:datatype="text" reporter:label="Label"/>
<field name="host" reporter:datatype="text" reporter:label="Host"/>
<field name="username" reporter:datatype="text" reporter:label="Username"/>
var pane = new openils.widget.EditPane({
fmObject:fmObject,
- hideActionButtons : this.editReadOnly,
+ hideSaveButton : this.editReadOnly,
+ readOnly : this.editReadOnly,
overrideWidgets : this.overrideEditWidgets,
overrideWidgetClass : this.overrideEditWidgetClass,
overrideWidgetArgs : this.overrideWidgetArgs,
this.inherited(arguments);
this.initAutoEnv();
if(this.readOnly)
- this.hideActionButtons = true;
+ this.hideSaveButton = true;
// grab any field-level docs
/*
onClick : this.onCancel
}, cancelSpan);
+ if(this.hideSaveButton) return;
+
new dijit.form.Button({
label:'Save', // XXX
onClick: function() {self.performAutoEditAction();}
}
}
);
+
+ pcrud.search(
+ 'acqedim',
+ {purchase_order : poId},
+ {
+ order_by : {acqedim : 'create_time'},
+ oncomplete : function(r) {
+ var resp = openils.Util.readResponse(r);
+ // TODO: I18n
+ if(resp) {
+ dojo.byId('acq-po-view-edi-messages').innerHTML = '(' + resp.length + ')';
+ dojo.byId('acq-po-view-edi-messages').setAttribute('href', oilsBasePath + '/acq/po/edi_messages/' + poId);
+ } else {
+ dojo.byId('acq-po-view-edi-messages').innerHTML = '0';
+ dojo.byId('acq-po-view-edi-messages').setAttribute('href', '');
+ }
+ }
+ }
+ );
}
function checkCouldActivatePo() {
--- /dev/null
+[% WRAPPER "default/base.tt2" %]
+[% ctx.page_title = "PO History" %]
+<script type="text/javascript">
+ dojo.require('openils.Util');
+ dojo.require('openils.widget.AutoGrid');
+ dojo.require('openils.widget.Textarea');
+
+ var poId = "[% ctx.page_args.0 %]";
+ openils.Util.addOnLoad(
+ function() {
+ edimGrid.loadAll({order_by : {acqedim : 'create_time DESC'}}, {purchase_order : poId});
+ }
+ );
+</script>
+<h1>Purchase Order EDI</h1>
+<br/>
+<div dojoType="dijit.layout.ContentPane" layoutAlign="client">
+ <table jsId="edimGrid"
+ autoHeight='true'
+ dojoType="openils.widget.AutoGrid"
+ defaultCellWidth="'auto'"
+ fieldOrder="['message_type', 'status', 'create_time', 'translate_time', 'process_time', 'error_time', 'remote_file', 'error']"
+ query="{id: '*'}"
+ suppressFields="['id', 'edi', 'jedi', 'purchase_order']"
+ editStyle='pane'
+ fmClass='acqedim'
+ editOnEnter='true'
+ editReadOnly='true'
+ showPaginator='true'>
+ </table>
+</div>
+[% END %]
id="acq-po-view-notes"></a>
</td>
</tr>
+ <tr>
+ <td>EDI Messages</td>
+ <td>
+ <a href="javascript:void(0);"
+ id="acq-po-view-edi-messages"></a>
+ </td>
+ </tr>
<tr id="acq-po-activate" class="hidden">
<td>Activatable?</td>
<td>