Bugzilla – Attachment 80449 Details for
Bug 15766
Give label and patron card batches a description
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15766: (follow-up) Hide description field if the batch is empty
Bug-15766-follow-up-Hide-description-field-if-the-.patch (text/plain), 4.24 KB, created by
Katrin Fischer
on 2018-10-12 06:08:18 UTC
(
hide
)
Description:
Bug 15766: (follow-up) Hide description field if the batch is empty
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-10-12 06:08:18 UTC
Size:
4.24 KB
patch
obsolete
>From 5bc063f768a3ffc3181e9c3b7da895cd7725de20 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 18 Oct 2017 22:40:13 +0000 >Subject: [PATCH] Bug 15766: (follow-up) Hide description field if the batch is > empty > >Because if it's empty, it hasn't actually been created yet. Hiding the >field prevents a lot of errors > >Sponsored-by: Catalyst IT > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Creators/Batch.pm | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt | 7 ++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt | 7 ++++++- > 3 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/C4/Creators/Batch.pm b/C4/Creators/Batch.pm >index 3f13917..9b9a0f2 100644 >--- a/C4/Creators/Batch.pm >+++ b/C4/Creators/Batch.pm >@@ -68,7 +68,7 @@ sub add_item { > my $query = "INSERT INTO creator_batches (batch_id, description, $number_type, branch_code, creator) VALUES (?,?,?,?,?);"; > my $sth = C4::Context->dbh->prepare($query); > # $sth->{'TraceLevel'} = 3; >- $sth->execute($self->{'batch_id'}, $number, $self->{'branch_code'}, $1); >+ $sth->execute($self->{'batch_id'}, $self->{'description'}, $number, $self->{'branch_code'}, $1); > if ($sth->err) { > warn sprintf('Database returned the following error on attempted INSERT: %s', $sth->errstr); > return -1; >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 1b72757..6bbb183 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 >@@ -60,7 +60,7 @@ > <form name="add_by_number" action="/cgi-bin/koha/labels/label-edit-batch.pl" method="post"> > <div> > <fieldset class="rows" style="border-bottom: 0px; border: 0px;"> >- <ol><li> >+ <ol><li id="description"> > <input type="hidden" name="op" value="add" /> > <input type="hidden" name="batch_id" value="[% batch_id | html %]" /> > <label for="description">Batch description: </label> >@@ -280,6 +280,11 @@ > } > > $(document).ready(function() { >+ [% IF table_loop %] >+ $("#description").show(); >+ [% ELSE %] >+ $("#description").hide(); >+ [% END %] > $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { > "autoWidth": false, > "aoColumnDefs": [ >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 c92c52c..5b1780a 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 >@@ -44,7 +44,7 @@ > <form name="add_by_bor_num" action="/cgi-bin/koha/patroncards/edit-batch.pl" method="post"> > <div> > <fieldset class="rows" style="border-bottom: 0px; border: 0px;"> >- <ol><li> >+ <ol><li id="description"> > <input type="hidden" name="op" value="add" /> > <input type="hidden" name="batch_id" value="[% batch_id | html %]" /> > <label for="description">Batch description: </label> >@@ -230,6 +230,11 @@ > }; > > $(document).ready(function() { >+ [% IF table_loop %] >+ $("#description").show(); >+ [% ELSE %] >+ $("#description").hide(); >+ [% END %] > $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ > { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15766
:
59994
|
59998
|
59999
|
61462
|
61463
|
61464
|
63221
|
63222
|
63223
|
66515
|
67305
|
67862
|
68282
|
68359
|
68360
|
68361
|
68362
|
75213
|
75214
|
75215
|
75216
|
75715
|
75843
|
79839
|
79840
|
79841
|
79842
|
79843
|
79844
|
79845
|
79846
|
80446
|
80447
|
80448
| 80449 |
80450
|
80451
|
81070
|
81084
|
81086