Bug 20827: Display Fund's owner name when selected

When a fund is created or edited and does not have a owner yet, the
name of the patron will not be displayed when selected.

The HTML element the JS code expects is not present in the DOM.

Test plan:
- Create a fund, set a owner
- remove the owner, edit, etc.
- Save
- Edit again
Make sure it works as expected.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2018-05-28 11:40:20 -03:00 committed by Martin Renvoize
parent 0f4f2c1fd8
commit dc396756a0
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 1 deletions

View File

@ -255,6 +255,8 @@
[% budget_owner.firstname %] [% budget_owner.surname %]
</a> |
</span>
[% ELSE %]
<span id="budget_owner_name"></span>
[% END %]
<a id="edit_owner" class="new_window" href="#"><i class="fa fa-search"></i> Select owner</a>
<a id="remove_owner" href="#"><i class="fa fa-trash"></i> Remove owner</a>
@ -471,7 +473,7 @@
function select_user(borrowernumber, borrower) {
ownerRemove();
var borrowername = borrower.firstname + ' ' + borrower.surname
var borrowername = borrower.firstname + ' ' + borrower.surname;
if (borrowernumber) {
var ownerlink = '<a href="/cgi-bin/koha/members/moremember.pl'
+ '?borrowernumber=' + borrowernumber + '">'