Bug 11015: add copyright headers to some files

This patch adds a copyright headers where they didn't exist in the Koha
namespace.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c3a55042e7cdbb241486acf3448afe70d9438550)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11100: make label for Topics facet easily CSS selectable

Search in intranet, verify that Topics in the facets is wrapped in a span

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Adds an id, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f1755568382ddf75cecd24402ebb132f73fe1107)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11107: make label for authors facet easily CSS selectable

Label in staff client - authors on facets not easily accessible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 120fdaa4bedb84c6ffc8fc431d8d9dc1c50e6a84)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11106: make label for Item types facet easily CSS selectable

Allows the Item types facet to be CSS or JQuery selectable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a6f4ff9bb456caf62e96e854ccadc3bd77ba7e3c)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11102: fixed bug in Label in Staff Client - places on facets not easily css selectable

Label in staff client on places facets not easily css selectable

To test:

with data that contains places, right click places heading in facets,
ensure it is wrapped in a span.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit acdf8df3709c0c9c3e5cf0dae463b39071dfe6d0)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11098: fixed bug in label in opac - topics on facets not easily css selectable

Search opac, then right-click "Topics" and select "inspect element"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Please add a description of the problem and a test plan to your commit
message next time, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as expected. Thx!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cc3469eff7f5ae2fb7ff9b57b7eb6c1d0d4bc161)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11070: fix typo in UNIMARC 115a plugin

In UNIMARC 115a cataloging plugin, there is a typo : "NTSC", not "NSTC" :
http://fr.wikipedia.org/wiki/Ntsc

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple string change.
koha-qa complains about tab errors, fixed in followup

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9039c8bb74b80eb7d9e32698ec6f15a5673d7de4)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11070: followup to correct tabs

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 481eb9b284a55906367888045e092edc1f062a96)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11058: fix compilation warning in C4::Record

A routine declares two lexical variables named $stylesheet.
This patch renames the second to keep code clearer and
avoid propagating compile time warnings

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 6bad4db6a76d719ad6ac7fec2d4c7ec87ec8aa95)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11003: fix JS error on the staff cart page

A call to yuiToolbar breaks JavaScript code on the cart page.

Test plan:
- add some biblio to your cart
- open the cart
- a js error occurs (see it with firebug):
  ReferenceError: yuiToolbar is not defined
- apply the patch
- retry and verify the error does not appear anymore.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f66f34a4200593f07b596d02b880aaf456b0c3fa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixes the JS error.
Bug 11002: simplify patron mandatory field validation

When the pref BorrowerMandatoryField is set and a librarian forget to
fill fields, a js popup appears with the following message:
  "The following fields are mandatory: surname, etc."
The fields are not translatable.

Test plan:
- fill the pref BorrowerMandatoryField with something like:
  title|zipcode|surname|cardnumber|branchcode
- go the members/memberentry.pl?op=add page
- verify you are not allowed to add the patron without filling all
  mandatory fields.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c900a47aa8c7133036138cf79a81e70b827fe61f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11002: (follow-up) use jQuery validator plugin

This patch uses the jQuery validator plugin introduced in
bug 6209 for two reasons:

[1] To supply validation for non-HTML5-compatible web
    browsers.
[2] To force use of the validator plugin rather than
    built-in validation for HTML5 browsers, which means
    that our translations will be used.

Note that a version of the function to prevent double form submission
is used as the submit handler invoked when the validator plugin
is satisified that the form is complete.

To test:

[1] Same as the main test plan, but note that the validation
    messages now appear inline rather than as pop-ups.
[2] Verify that the double form submission prevention still
    works.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e52bd72c650787e9c7690b7cfe172a9d9feab698)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11099: fixed bug in Label in Staff Client - series on facets not easily css selectable

add c-span to series facet

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ef6185d31f454a4766194cc4d823fe0210fefd21)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10982: fix link to IFLA UNIMARC documentation in Cataloging

In Cataloging, a ? opens a documentation page on IFLA web site. The current
implementation rely on the tag tab to select the appropriate IFLA
documentation web page. It doesn't work when UNIMARC tag are displayed
in a tab which digit is different for tag first digit.

To reproduce the bug:

  - Modify default framework, put all 200 subfields in tab 1
  - Add a new biblio record
  - Click on ? on 200 field
   => Wrong IFLA page is opened

Apply the patch and retry...

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Simple fix. Work as described. No koha-qa errors

Test on UNIMARC install
1) Switched all 2xx tags to tab 1
2) press any 2xx ?, wrong page
3) patch applied
4) links are now correct

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 814c463c24510ac0c1e7e240100833714089e86f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10785: change 'Dropbox' labels to 'Book drop'

Signed-off-by: KohaCon13 demo <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Checked the book drop still works, also grepped for
other appearances of the term.
Fixed capitalization.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5750f32519aa701cdf0cd158b6d9576e3a45f2a8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10785: (follow-up) fix one last bit of capitalization

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit e0829b1a353ae69abcf026b50a47933cb992494b)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10954: ensure that payment receipt displays the payment made

When printing a payment receipt, the payment did not display, only the
total currently owed.

Test Plan:
1) Create a payment for a borrower
2) Print the payment with the "print" button to the right of the payment
3) Note the missing payment line
4) Apply this patch
5) Repeat step 2
6) Note the payment line now displays

Signed-off-by: cedric.vita@dracenie.com <cedric.vita@dracenie.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 50e25d212a0298910a5b4322b475df550985fbea)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11097 - Hide duplicate patron button if logged in user lacks CAN_user_borrowers permission

The "duplicate" button on the circ/patron toolbar should not appear if
the logged in user lacks permission to edit patron records. This patch
wraps the button in the required logic.

To test, open a patron record in circulation or patrons and view as a
staff client user who both has and doesn't have CAN_user_borrowers
permission. The button should be shown and not shown accordingly.

Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cb75b239215714416c43282b573ae653e55e29a8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10889: fix comment describing biblioitems.serial

biblioitems.serial is not a foreign key; it's a Boolean indicating
whether the biblio record is a serial, which in turn influences how
serial items are displayed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f22431c2a1415627c9155ee52b5a19ecef01e9ed)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 11034: remove incorrect return for BiblioAutoLink

BiblioAutoLink was being called expecting an array to
be returned. The subroutine in fact returns a scalar

As the variables that the return was stored in, went
out of scope immediately. It is probably better to be
explicit that we are throwing the return away by not
going through the motions of storing it in a variable

To test:

[1] Add or save a bib record using the cataloging editor.
[2] Verify that no regressions have occurred
[3] (optional) If BiblioAddsAuthorities is on, verify that
    relevant authority records are linked to from the bib.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 89a8a17fdc793b145fc0d7bdcef601698b36fdaa)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>