Bug 7598: make strings in acquisitions JavaScript translatable

English strings in acq.js cannot be processed by the translation script.
This patch moves the strings to the templates to be set as JS variables
for use by the script.

To test:

- On the uncertain prices page, enter an invalid price and click save.
  You should see a JavaScript alert pointing this out.

- When adding a fund to an existing budget, enter an amount which
  exceeds the amount in the parent budget. You should see a JavaScript
  alert pointing this out. There is a similar function which has been
  corrected, checkBudgetParent(), but I don't know how to trigger it for
  testing.

The closebasketgroup function has been updated but as far as I can tell
it's not actually in use.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

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

Conflicts:

	koha-tmpl/intranet-tmpl/prog/en/js/acq.js

Solved.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d8eeb697c873b1ba9366bbce275a14d004931f40)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 297e7fa540d8b6eddf5289c37865844dcf258d09)
Bug 7598: [Follow-up] make strings in acquisitions JavaScript translatable

This follow-up addresses QA comments and moves punctuation and line
breaks out of the string to be translated.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b38187d8b004316b17d1e67753d638e96bb62bb8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit c4bf7d825141261a8a1563790f4e4a767647a779)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit c4bf7d825141261a8a1563790f4e4a767647a779)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit bcd6b896ea3e10c73cca4b34d9030024205b784b)
Bug 10346 - "Add multiple copies" should be labelled "Add multiple items"

The Koha interface standardizes on the term "item" instead of "copy," so
the "Add multiple copies" button would be more correctly labeled "Add
multiple items."

To test, view the add item screen for an existing or new record. You
should see a button labeled "Add multiple items."

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 79df5211d6faff8ab31b46c815ed50c70093a057)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7000aa561c7fb33c422f9b60c4f7590a6071ee08)

Solved Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 7000aa561c7fb33c422f9b60c4f7590a6071ee08)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit d1844855efba1b4121dac160d130cdb7d7720c13)
Bug 9353 - Missing subfields on MARC21 frameworks

This patch adds missing subfields on MARC fields

029abct
(http://www.oclc.org/bibformats/en/0xx/029.shtm)

863abcdefghijklmnopqstvwxz68 (same for 864/5)
(http://www.loc.gov/marc/holdings/hd863865.html)

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply the patch
7) Replace old frameworks, easiest by command line:
mysql -uuser -ppass kohadb -e 'delete from biblio_framework; delete from marc_tag_structure; delete from marc_subfield_structure'
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
mysql -uuser -ppass kohadb < installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Updated frameworks are ok.
Note: Only en frameworks are updated, so if other languages need
those fields too, we need some followups.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit d0f3a49d9672cd018a51168b05db7a9d1f17f250)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d0f3a49d9672cd018a51168b05db7a9d1f17f250)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit e22738e3b16593ef5282b493818fe220fb889d24)
Followup Bug 9353: Missing subfields on MARC21 frameworks

This followup changes updatedatabase.pl.
Only touch frameworks that have the missing subfields.

If both patches are applied, the test plan changes.

To test:
1) dev master system with default and example MARC21 frameworks
2) Go to Home > Administration > MARC frameworks
3) Click on 'MARC structure' of any framework
4) Search for tag 029 (or 863/4/5)
5) Click 'Subfields', there are none.
6) Apply both patches
7) run 'perl installer/data/mysql/updatedatabase.pl'
8) Repeat steps 2-4
9) Click 'Subfields', now they are.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Update works nicely. Checked various frameworks and
results were ok. Also new fields are hidden.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit da4bc6a6315a7f5aca1bb3105549758b8acd7592)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit da4bc6a6315a7f5aca1bb3105549758b8acd7592)
Solved conflict in updatedatabase.pl
This two are necessary for Bug 5858
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 459422c8bad09a8301cf47a7b39abf15a3b265ff)
Bug 5858: update default MARC21 framework to April 2013 revision

Applies to new installs, although with the follow-up
patch, users can run the installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
script through the mysql client to add new tag and
subfield entries.

To test:
1) Delete MARC21 default framework
2) Apply patch
3) Test that new default framework loads without problem

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run this file with and without this patch.
This patch adds 24 tags (338 vs 314) and 323 subfields (3951 vs 3628).
Verified that last QA comments were incorporated.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 45669b2566c889c7a73251cdb132c81cf5127117)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 689080867eb810279a912f2d9bf7a78655ffc9dd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 689080867eb810279a912f2d9bf7a78655ffc9dd)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit a582ba6100c1e5aae9aca5f11d22d3eb564f22ae)
Bug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql

Changes 8 INSERTs into INSERT IGNOREs.
This allows current installs to benefit easier from the new tags/subfields.
Note that running with --force will not achieve the same! The multi-value
inserts will still be aborted, though execution continues.

Test plan:
Run the file or do a new install.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran the file on a current install manually.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bf9eccfeb8069c1b258916c1916138b6317122da)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit bfd82695b19ce20cd638e8c285e7e1aeed89a255)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit bfd82695b19ce20cd638e8c285e7e1aeed89a255)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit c0879481a4ad4bd32fbb00530115bea5fa0bdbc0)
Bug 4907: make 'Organize by' filter in suggestions reflect selected option

When using the 'Organize by' option to change the display of the
suggestions, the option is applied, but the pull down always jumps
back to the first entry 'Status'.

This patch fixes that.

To test:
- Try out all settings and verify that after the page reloads the selected
  option is applied to your suggestions and the pull down shows
  the option you selected.

Note: Until bug 10519 is properly fixed the tabs will not show
the correct descriptions, but the URL will show you the selected
option as parameter: displayby=acceptedby

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 60a4dffbb197fe92e7483b9e0dfcc19bc9b51664)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5207c513c36fb0e66ed5a8390fc30119e194fad1)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit a05d90ff054785cebf82c9ecc6cfaff1e64c4df9)
Bug 10507: improve warning about duplicate patron attribute value

If a warning about a duplicated patron attribute is returned,
the value was being passed back for display in the warning
message with the same name as the variable in errors

As the message is displayed in the context of errors
the error value 1 was being displayed not the value
duplicated as intended.

Pass the value to the template with a unique name.

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

I fixed another tiny typo while signing off: "is already in use" instead
of "is already is use."

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 2614e07e1e2e6386b5f91e65f127940072e54d4d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b3bf4592a534a5c9824bdd54c6c0b354c3d34f61)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit e9fc5c04e75f1444fdb26d2fc2228605b82f5807)
Bug 10189: Translate values in UNIMARC 128b/c cataloguing plugins to English

Cataloguing plugins for UNIMARC 128b and 128c fields are only in Ffrench.

This patch translates them.
Source : http://blue.lins.fju.edu.tw/mao/marc/unicon.htm
Note : 128b and 128c are deprecated in last version of UNIMARC Manual (field 145 used instread).
But they are still used in French Sudoc network.

To test : in a UNIMARC english Koha, edit a record and use 128b and 128c
cataloguing plugins. Check everything is in english.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for translating those!
Verified new strings get parsed into the po files.
Templates still contain lots of tabs, those can be fixed separately.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 80ea8bf821ba83fd4506f5298f5a582051b44e06)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit df765f82b3b96e9bf4e883450d1e3260cce01dfd)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit df765f82b3b96e9bf4e883450d1e3260cce01dfd)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 025d62226daba0cd3c4038d8984ab2b9b8422e23)
Bug 10516 - Improve titles, breadcrumbs, and confirmation messages for Z39.50 server adds and updates

The template for adding/editing Z39.50 servers shows the same title,
breadcrumbs, etc. for add and edit operations. This patch creates
separate text for each case.

To test, try both adding and editing a Z39.50 server. The page title,
breadcrumb, and heading should correctly reflect the operation you
perform.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and all strings are translatable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5c60ae40f97d9c22504c2942a00a93777984c7a5)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1d7490b6e50d0cdfd08124f5ca46eca4547d5ca6)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1d7490b6e50d0cdfd08124f5ca46eca4547d5ca6)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit e1227835ad9c2eaf71c8794b91ba3a921ee7f3b8)
Bug 10516 - Follow up - Fixing capitalization

Fix capitalization on submit buttons when deleting
a Z39.50 server.

- Delete this Server
- Do Not Delete

I think the "Do not delete" should maybe even be a cancel
link to be more consistent with how Koha displays this
kind of dialog in other places.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
fixes capitalisation, tool stil works

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c5cc04ef3d5e50c376e37a1493926181389efa6a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 14a4abebed9df1acc67a08685be368e060a2d310)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 14a4abebed9df1acc67a08685be368e060a2d310)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit e0e2a2e87635834cc77f94b5e8b7edb100e60d70)
Bug 10621: use correct from-address for subscription alert emails

From-address and to-address were the same (patron's email) for
subscription alerts. This patch changes 'from' the branch or
kohaadminemailaddress

To test
- add a subscription in staff/serials in case you don't have any
- enable patron notifications or the subscription
- in the OPAC, subscribe to the serial
- in staff/serial, receive an issue of the serial

Before applying the patch, the email that is supposed to be sent
has the patron's email as 'from' and 'to' (and is likely to fail).

If you follow the steps after applying the patch, the email alert
should have the 'from' address of the patron's branch or
kohaadminemiladdress -- which should also work fine with the MTA/SMTP
you have set up for messaging.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 61fa246ac06d637d50c8eed68244f0577ed34e4d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 75b31bb5cf4a6269dedeb95be374b654fe4b5091)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 75b31bb5cf4a6269dedeb95be374b654fe4b5091)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit eaefa5daf65161c9f7c99ab1340bbc97075450e6)
Bug 10644: add unit tests for ClassSource.pm

The tests are wrapped in a database transaction.

To test:
prove t/db_dependent/ClassSource.t
t/db_dependent/ClassSource.t .. 1/24 prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
attempting to use non-existent class sorting routine routine1
prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
t/db_dependent/ClassSource.t .. ok
All tests successful.
Files=1, Tests=24,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.12 cusr  0.01 csys =  0.15 CPU)
Result: PASS

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5de06b87e29f12250a35df3239372a7ed0754811)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit aeb11a6a9236bcf7f6c822a55e3d270406956db2)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit aeb11a6a9236bcf7f6c822a55e3d270406956db2)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit b976a45151d93e311cf375739ffe717143e99706)
Bug 10644: fix typos in test descriptions

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit d9d8a8424dcd62988293920f7c67f7d0a01efc70)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 7e5c0a9a5f08e325e2e8a1fdb2fda72b76a3b1e9)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 7e5c0a9a5f08e325e2e8a1fdb2fda72b76a3b1e9)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 5c32b6e383f02a81e8eed8d5462b0a8119696903)
Bug 10643: fix inappropriate uses of $sth->finish() in C4::ClassSource.pm

This patch gets rid of finish() and replace prepare_cached by prepare.

From the man page

finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.

Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5cba6457aa00f3f3b2038f70057df300d9c6b9c3)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cfb48010ad23e50fc93d893963164a17d4208c7b)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cfb48010ad23e50fc93d893963164a17d4208c7b)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 0a47d3444dfa749f5b9c99252cd129bc80cee54a)
Bug 10644: (follow-up) remove inadvertant dependence on Perl 5.14

Perl 5.14 changed array and hash container functions (e.g., keys())
to accept hashrefs or arrayrefs.  However, this doesn't work in
Perl 5.10, so doing

  scalar(keys( function_returning_hashref() ) );

is a syntax error in that version.  This patch changes the affected
tests to explicitly difference the hashrefs returned by the various
functions.

To test:

Verify that t/db_dependent/ClassSource.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8f933bc040e8e4198f5278253191a7a4233467ce)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 9504e00f7b497aa8e49567ca99cf73f7c32ad134)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 9504e00f7b497aa8e49567ca99cf73f7c32ad134)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit 4e474580b16024d6a6afc36bf220ebab034cb26a)