From 5e3935d9465af2e8e17dda1281ea0c74545a43c8 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 6 Jun 2018 01:48:33 +0000 Subject: [PATCH] Bug 15766: (follow-up) Fixing layout of description button This patch moves the 'Save' button to the toolbar as suggested. The description textbox and 'Save' button are hidden if the batch is new and appears when items are added. Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt | 12 +++++++----- .../intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt | 12 +++++++----- svc/creator_batches | 0 3 files changed, 14 insertions(+), 10 deletions(-) mode change 100644 => 100755 svc/creator_batches diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index 6bbb183..adf1879 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -16,8 +16,10 @@ ToolsLabel creatorBatches › - [% IF batch_id %] - Edit ([% batch_id | html %]) + [% IF description %] + Edit [% description | html %] + [% ELSIF batch_id %] + Edit ([% batch_id | html %]) [% ELSE %] New [% END %] @@ -64,8 +66,7 @@ - - Save description +
  • @@ -85,6 +86,7 @@
    Add item(s)[% IF ( table_loop ) %] + Save description Remove selected items Delete batch Remove duplicates @@ -329,7 +331,7 @@ }); $("#savedesc").click(function(event){ event.preventDefault(); // prevent form submission - var newdescription = $(this).siblings('input[name="description"]').val(); + var newdescription = $('input[name="description"]').val(); var batch_id = $(this).data('batch_id'); var ajaxData = { 'newdescription': newdescription, 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 740c663..99616a8 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 @@ -15,8 +15,10 @@ ToolsPatron card creatorBatches › - [% IF batch_id %] - Edit ([% batch_id | html %]) + [% IF description %] + Edit [% description | html %] + [% ELSIF batch_id %] + Edit ([% batch_id | html %]) [% ELSE %] New [% END %] @@ -48,8 +50,7 @@ - - Save description +