Bug 9531: Make SIP2 message terminator configurable via SIPconfig.xml

Add a terminator option to SIPConfig.xml, choices for 'terminator' are
'CR' or 'CRLF'.  The default continues to be 'CRLF' if 'terminator' is
undefined.

Test Plan:
1) Apply patch
2) Start SIP server
3) Run C4/SIP/t/04patron_status.t
4) Stop SIP server
5) Add terminator="CR" for account login 'term1'
6) Run 04patron_status.t again, you should see no change

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9845: correct SIP 08checkin.t

The tests were too restrictive. It should be possible to pass
a checkin/checkout test with different values defined for
magnetic media.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9252 - Add option to send patron's home branch in AF field

This patch gives you the option of sending a patrons home branch code
in an AF field for patron status requests. It is controlled at the account
login level, so it can be enable on a per-sip-login basis.

Test Plan:
1) Apply patch
2) Edit SIPconfig.xml, add the parameter 'send_patron_home_library_in_af="1"'
   to the login you will be using to test.
3) Start your SIP2 server.
4) Connect to it via telnet ( something like: '9300CNterm1|COterm1|CPCPL|' )
5) Send a patron status request ( like: '2300120121110    82925AOCPL|AA23529000035676|ACterm1|ADletmein' )
6) Examine reponse you should see something like this:
      "24              00120121210    085332AEHenry Acevedo|AA23529000035676|BLY|CQN|AFGreetings from Koha. |AFMPL|AO|"
   Note the second AF field with the value MPL.

Signed-off-by: George Williams <georgew@latahlibrary.org>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9252 - Add option to send patron's home branch in AF field - QA Followup

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10027: include fine details when printing a fine

Previously printing a fine invoice would result in a page with both the
single item charge and the total outstanding amount. Right now only the
total outstanding is printed.

Test Plan:
1) Print a fine, note the fine doesn't show, only the total
2) Apply patch
3) Print a fine, not the fine does show

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10027: (follow-up) tidy members/printinvoice.pl

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10027: (follow-up) improve display of fine details on printed invoice

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

Checked invoice is correctly printed for
- partially paid fines
- paid fines
- unpaid fines

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10769 - Simplify clearing of input fields when duplicating a patron

When duplicating a patron record an onclick event is added to many
fields in order to make then clear when focused. This patch updates the
template so that the logic for this can be simplified. A template
variable is set based on the 'opduplicate' variable, and a class added
to the relevant fields. All fields with that class are cleared on focus.

Also changed are several markup issues which were causing validation
errors.

To test, find or create a patron record which has all standard text
fields filled with data. Use the "duplicate" button on the detail view
of that patron to initiate the duplication process.

Focus on each field in the patron entry form in succession. Fields which
contain data should be cleared in the same way they were before the
patch.

Also test a regular edit operation to confirm that fields are not
cleared.

Signed-off-by: Campbell Reid-Tait <campbellreidtait@gmail.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>
Bug 10619 - fix errors in sco.css for the CCSR OPAC templates

sco.css is not missing from CCSR, but some image paths in the CSS are
incorrect, resulting in some missing images. This patch corrects those
broken paths.

This patch also hides the Cart/Lists/login region of the template which
should not be visible in self checkout.

To test, enable self-checkout and switch to the CCSR theme. Load a
patron for self-checkout and confirm that images associated with buttons
appear correctly: By the help link in the upper-right, on the 'Finish'
button, etc. Try checking out an item which is already checked out to
that patron to see more examples.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS changes only, works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320 - Integrate OverDrive search into OPAC

Show any relevant results from the OverDrive ebook/audiobook service
on the OPAC search. This is done by showing a link with "Found xx
results in the library's OverDrive collection" at the top of search
results and linking to a page that shows the full results.

This requires an OverDrive developer account, and is enabled by
setting the OverDriveClientKey and OverDriveClientSecret
system preferences.  In addition, this patch adds the
OverDriveLibraryID system preference.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Henry Bankhead <hbankhead@losgatosca.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Followup for bug 10320: minor bugfixes and style improvements

Switch to the new method of showing star ratings. Also, fix some
translation bugs, an error that occurred when caching was disabled and
add a stub unit test.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320: (follow-up) Fix copyright and style errors

This patch fixes a copypasta'd copyright statement, and some incorrect
POD and indentation.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320: (follow-up) correct license statement

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320: (follow-up) tidy up new system preferences

- added to sysprefs.sql
- fixed typo in updatedatabase.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320: DBrev 3.13.00.017

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10320: (follow-up) handle OverDrive authentication failure more gracefully

When calling the overdrive_proxy service, if for some reason the
credentials are not accepted by OverDrive, return HTTP status 400
(as intended) rather than an internal server error.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9943: activate "Pay selected" button only when at least one fine is selected

If you select no fines but click the "pay selected" button the resulting
screen offers to let you pay against all fines, which is confusing. To
simplify things this patch disables the "pay selected" button if no
lines are selected.

To test, apply the patch and find a patron with outstanding fines. From
the "pay fines" page (members/pay.pl) try selecting and deselecting
checkboxes and using the "select all" and "clear all" links. When no
item is selected the "Pay selected" button should become disabled.
Confirm that the form submits correctly when one or more fines is
selected.

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works nicely in my tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9924 - Simplify and rename patron card creator error message include

The patron card creator error message include uses a non-standard method
for displaying error messages, and is poorly-named.

This patch converts the method of displaying error messages for various
patron card creator options to the standard one ('<div class="dialog
alert">') and renames the include file to make it clear that it relates
only to patron card creator operations.

To test, perform various operations:

- Go to 'manage images' and try to upload a file which exceeds the
  500KBfile size limit
- Go to the edit batch page and manually append an error code to the
  URL:  /cgi-bin/koha/patroncards/edit-batch.pl?op=new&error=403
- Go to one of the manage pages and manually append an error code to the
  URL:
  /cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201

Correct display of an error message indicates that the include file is
being found.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan, test suite and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9924: (follow-up) ensure that correct error message is displayed

(Apparently) unlike HTML::Template::Pro, Template Toolkit doesn't like
template variables that are entirely numeric -- in conditionals, it
consider them integers, most of which are Perl true.

This patch changes this by setting the error variable to the error
value.

To test:

[1] Run the test plan from the previous patch.  In each
    case, verify that the error message is specifically applicable
    to the test.  For example, if you try uplaoading a patron image
    that is larger than 500KB, the error message displayed should
    specifically say so.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thank you Galen for catching this. Error messages showing up
now are much more specific and according to the error codes given.
I testd uploading a file larger then 500KB and triggered several
error messages giving the error code in the URL:
/cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201

All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10331 - Little errors in unimarc_field_4XX.pl (punctuation)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Copying the test plan from the bug report:

A.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 700 $a, $b, $f filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
  fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (no closing bracket)

B.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 700 $a, $b, $c, $f filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
   fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (dash instead of
   semicolon between original $c and $f, no closing bracket)

C.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 702 $a, $b, $c filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
   fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (unnecessary semicolon
   after original $c, n.b. lacking space).

D.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 712 $a, $b filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
   fetch data from biblio rec. mentioned in b)
4) see the punctuation in $a -- it will be wrong (unnecessary opening
   bracket at the end).

Test plan, all tests and QA script pass.
Thx Bernardo for his testing and explanations!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>