Bug 10439: fix bug preventing the library for a notice from being changed

2 javascript functions should be apply only in a specific case, not for all
views.

Test plan:

- Switch on the IndependentBranches pref and log
  in as a superlibrarian.
- Try to change the library for a notice. Before the patch,
  no change is applied.
- Try to create a new notice, changing the library from
  default in the process.  Before the patch, the notice
  is not created.

The bug can also be reproduced when IndependentBranches is
off, in which case the staff user need not be a superlibrarian.

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 77a5e3e365)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test plan works as advertised.
(cherry picked from commit a2e89edf43)

Solved Conflicts:
	koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit a2e89edf43)
This commit is contained in:
Jonathan Druart 2013-06-10 14:05:32 +02:00 committed by Bernardo Gonzalez Kriegel
parent dd574b1b70
commit d2a284da13
1 changed files with 2 additions and 0 deletions

View File

@ -11,6 +11,7 @@ $(document).ready(function() {
headers: { 4: {sorter:false},5: { sorter: false },6: { sorter: false }}
});
[% IF no_op_set %]
$('#branch').change(function() {
$('#op').val("");
$('#selectlibrary').submit();
@ -19,6 +20,7 @@ $(document).ready(function() {
$('#op').val("add_form");
return true;
});
[% END %]
});
[% IF ( add_form ) %]