From: erickson Date: Mon, 1 Dec 2008 23:42:30 +0000 (+0000) Subject: added create functionality X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=684b762e50d0f8601e8c3c44a3827f4dd1b5aac6;p=Evergreen.git added create functionality git-svn-id: svn://svn.open-ils.org/ILS/trunk@11376 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js b/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js index f548788fce..1f408ad7d6 100644 --- a/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js +++ b/Open-ILS/web/js/ui/default/acq/financial/list_currency_types.js @@ -21,5 +21,22 @@ function loadCTypesGrid() { ); } +function createCT(args) { + if(!(args.code && args.label)) return; + var ct = new acqct(); + ct.code(args.code); + ct.label(args.label); + fieldmapper.standardRequest( + ['open-ils.permacrud', 'open-ils.permacrud.create.acqct'], + { async: true, + params: [openils.User.authtoken, ct], + oncomplete: function(r) { + if(new String(openils.Util.readResponse(r)) != '0') + loadCTypesGrid(); + } + } + ); +} + openils.Util.addOnLoad(loadCTypesGrid); diff --git a/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 b/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 index 82054e3b3f..751f91c06f 100644 --- a/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 +++ b/Open-ILS/web/templates/default/acq/financial/list_currency_types.tt2 @@ -6,29 +6,18 @@ - -
+ New Currency Type -
- - - +