[open-ils-commits] r10043 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
public/oils/media/ui_js/oils/default/acq/financial
templates/oils/default/acq/financial
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 14 22:44:22 EDT 2008
Author: erickson
Date: 2008-07-14 22:44:20 -0400 (Mon, 14 Jul 2008)
New Revision: 10043
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html
Log:
added provider add code
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js 2008-07-15 01:39:03 UTC (rev 10042)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/ui_js/oils/default/acq/financial/list_providers.js 2008-07-15 02:44:20 UTC (rev 10043)
@@ -7,6 +7,7 @@
dojo.require('openils.Event');
dojo.require('openils.acq.Provider');
dojo.require("fieldmapper.OrgUtils");
+dojo.require('openils.widget.OrgUnitFilteringSelect');
function getOrgInfo(rowIndex) {
data = providerListGrid.model.getRow(rowIndex);
@@ -25,5 +26,9 @@
}
);
}
+function createProvider(fields) {
+ openils.acq.Provider.create(fields, function(){loadProviderGrid()});
+}
+
dojo.addOnLoad(loadProviderGrid);
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html 2008-07-15 01:39:03 UTC (rev 10042)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html 2008-07-15 02:44:20 UTC (rev 10043)
@@ -11,6 +11,53 @@
<div id='oils-acq-list-header-label'>${_('Providers')}</div>
</div>
+<div class='oils-acq-actions-div'>
+ <div dojoType="dijit.form.DropDownButton">
+ <span>${('New Provider')}</span>
+
+ <div dojoType="dijit.TooltipDialog" execute="createProvider(arguments[0]);">
+ <script type='dojo/connect' event='onOpen'>
+ openils.acq.CurrencyType.loadSelectWidget(providerCurrencySelector);
+ new openils.User().buildPermOrgSelector('ADMIN_PROVIDER', providerOwnerSelect);
+ </script>
+
+ <table class='dijitTooltipTable'>
+ <tr>
+ <td><label for="name">${_('Name:')} </label></td>
+ <td><input dojoType="dijit.form.TextBox" name="name"></td>
+ </tr>
+ <tr>
+ <td><label for="name">${_('Code:')} </label></td>
+ <td><input dojoType="dijit.form.TextBox" name="code"></td>
+ </tr>
+ <tr>
+ <td><label for="currency_type">${_('Currency Type:')}</label></td>
+ <td>
+ <input jsId='providerCurrencySelector' name="currency_type"
+ dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
+ </input>
+ </td>
+ </tr>
+ <tr>
+ <td valign='top'><label for="owner">${_('Owning Location:')}</label></td>
+ <td>
+ <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='providerOwnerSelect'
+ searchAttr="shortname" name="owner" autocomplete="true" labelAttr='shortname'> </input>
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2' align='center'>
+ <button dojoType=dijit.form.Button type="submit">${_('Create')}</button>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
+
+
+
+
<!-- The main grid lives here -->
<script>
function getName(rowIndex) {
More information about the open-ils-commits
mailing list