From d10ec019fdf3664445fb1b5dd106992fe069bc33 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 31 May 2018 16:54:43 +0000 Subject: [PATCH] Bug 15766: (follow-up) Correct merge errors This patch corrects some problems applying this on current master and removes an old merge conflict marker. Signed-off-by: Owen Leonard --- .../prog/en/modules/patroncards/edit-batch.tt | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt index 5b1780a..740c663 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -302,6 +302,32 @@ } }); }); + $("#savedesc").click(function(event){ + var newdescription = $(this).siblings('input[name="description"]').val(); + var batch_id = $(this).data('batch_id'); + var ajaxData = { + 'newdescription': newdescription, + 'batch_id': batch_id, + 'card_element': "batch", + 'creator': "patroncard", + }; + + $.ajax({ + url: '/cgi-bin/koha/svc/creator_batches', + type: 'POST', + dataType: 'json', + data: ajaxData, + }) + + .done(function(data){ + if (data.status == 'success') { + $("input[name='description']").text(data.newdesc); + $("#change-status").text(_("Saved")); + } else { + $("#change-status").text(_("Unable to save description")); + } + }); + }); }); [% END %] -- 2.1.4