Bug 10884: circulation table: fix odd behavior on checkboxes

Test plan:
Play with renew, check in and export checkboxes.
The expected behavior is: the renew and check in cb should work as radio
button, without affecting the export cb.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Amended test plan:
* Create a CSV profile under Tools > CSV profiles
* Add CSV profile to system preference ExportWithCsvProfile

1) Check export checkbox
2) Check check in for same item
3) Switch to Renew

The export checkbox should not get unchecked when switching
between renew and check in.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10935: fix breakage of CSV acq exports when using a non-English translation

To reproduce:
- cd misc/translator
- ./translate update LANG
- ./translate install LANG
- go to the Koha mainpage and change the language.
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
  basketgroup.
The headers is followed by the first basketgroup information. There is
no carriage return.

It looks like it is caused by a routine used by the translator script
(TmplTokenizer::string_canon).

To test this patch:
- apply it
- cd misc/translator
- ./translate -f update LANG
- translate headers in your po file
- ./translate -f install LANG
- go to acqui/basketgroup.pl?booksellerid=XX and try to export a
  basketgroup.
- verify that the csv looks good now.
- same thing for basket.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good idea and seems to work - just fixing a small glitch
with the first entry of the list in a follow-up.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10935: (follow-up) adding a line break to fix first list item

Without the line break after the include the first entry
of our list of orders was behind the header row in the first row
of the spreadsheet.

Adding the line break seems to fix that and translated CSV can
be exported correctly now.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10535: (follow-up) add test case

This adds a test case for the new default sort
order for GetBudgets().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10535: (follow-up) wrap Budgets.t in transaction

This patch also temporarily removes any existing
budgets to avoid issues where tests can fail if there
is already an active budget in the database.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10380: Change prototype for output_pref() routine

Koha::DateUtils::output_pref took 4 parameters and the last one is a
boolean, so some calls were:
  output_pref($dt, undef, undef, 1)

This patch changes its prototype to
  output_pref({
    dt => $dt,
    dateformat => $dateformat,
    timeformat => $timeformat,
    dateonly => $boolean
  });

An alternative is to call the output_pref routine with a datetime
object, without using an hashref:

  output_pref($dt);

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>
Bug 10380: (follow-up) update some uses of output_pref()

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10380: (follow-up) update two more uses of output_pref()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10380: (follow-up) update POD to fully reflect change to output_pref()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10380: (follow-up) remove inadvertant database dependency for t/DateUtils.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10038: fix doubled 'default' entry when creating a new authority type

Test plan:
- Create a new authority type
- Click MARC structure
- Verify the pull down has only 1 entry for Default
- Go on the authority type home (admin/authtypes.pl)
- Click on the "MARC structure" link for the default type
- Verify the pull down has only 1 entry for Default

This patch adds a sort (on the authtypecode) for these 2 lists.

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

When creating a new framework it would be better to have Default
on top, but one is way better than two :)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Agreed, one is better than two :)
All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10038: (follow-up) fix tabs

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10850 - give quick spine label template page its own ID

Out of three conditional cases for display of the <body> tag one lacked
a unique ID. This patch copies the unique ID from the other cases to the
one lacking.

This patch also corrects the case of an "onload" attribute which should
follow XHTML style rules.

To test, the patch for Bug 9618 must be applied. Set the
SpineLabelAutoPrint system preference to "[don't] automatically pop up a
print dialog." Submit a barcode on the quick spine label creator and
view source. The <body> tag should have an ID attribute.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10843: fix crash that can occur when confirming hold if ReservesMaxPickUpDelay is undefined

Test plan:
1) set an empty string for the ReservesMaxPickUpDelay pref
2) place a hold on an item
3) check in the item
4) click on "Print and confirm"
5) an error occurs
> The 'days' parameter (undef) to DateTime::Duration::new was an 'undef'
6) apply the patch
7) repeat steps 1 to 4
8) the error does not occur anymore.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
An empty string didn't do it for me, I had to set the
variable for the systempreference to NULL. I am not sure
if this can happen when editing from the interface, but
this change should not have any ill side effects and it has
unit tests!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8368: fix email lists from OPAC when using non-English templates

This patch ports to list sending by email, the technique used in sending
cart, i.e. (1) format email in HTML, and (2) transform it into Text with
TT filter html2text.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes a very annoying translation bug successfully.
Also passes all tests and QA script.

To test:
- Add a few records to a shelf, ideally use some with diacritics.
- Send shelf from English templates, verify email is ok
- Send shelf from translated templates (de-DE or similar) - verify
  email content is broken.
- Apply patches, update po files and reinstall the language.
- Send shelf from English templates again, verify there is no
  regression.
- Send shelf form translates templates - verify this email is now
  also working correctly.

Patch also changes the name of the file attachement from shelf.iso2709
to list.iso2709.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8368: (follow-up) port change to the Bootstrap OPAC; restore ISBN display

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8368: (follow-up) restore use of quoted printable for message body

This is necessary to prevent the equals sign that is part of the
link back to the OPAC from being mangled, thereby breaking the
link.

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