From f4b7e470e774c43d9b9771f103cefc53d5ecc71f 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 Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../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 5b1780a18c..740c663c83 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 @@ -293,6 +293,32 @@ 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")); + } + }); + }); + $("#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); -- 2.39.5