[Koha-bugs] [Bug 31470] Incorrect selector for relationship dropdown used in members.js
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 23 09:50:56 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31470
--- Comment #11 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
(In reply to Jonathan Druart from comment #10)
> 102 var guarantor_surname = $('#guarantor_surname').val();
> 103 fieldset.find('.new_guarantor_surname').first().val(
> guarantor_surname );
> 104 fieldset.find('.new_guarantor_surname_text').first().text(
> guarantor_surname );
> 105 $('#guarantor_surname').val("");
> 106
> 107 var guarantor_firstname = $('#guarantor_firstname').val();
> 108 fieldset.find('.new_guarantor_firstname').first().val(
> guarantor_firstname );
> 109 fieldset.find('.new_guarantor_firstname_text').first().text(
> guarantor_firstname );
> 110 $('#guarantor_firstname').val("");
> 111
> 112 var guarantor_relationship = $('#relationship').val();
> 113 fieldset.find('.new_guarantor_relationship').first().val(
> guarantor_relationship );
> 114 $('#relationship').find('option:eq(0)').prop('selected', true);
>
>
>
> This code is not clear to me, what are we trying to do?
> Is it really want we want?
>
Those guarantor_surname and guarantor_firstname blocks set guarantors name to
the form. Not sure what that guarantor_relationship is supposed to do, probably
same thing if guarantor already exists (tested this it doesn't, no idea what it
does).
> In my test I see an inconsistency:
> Edit a patron, fill "Non-patron guarantor" input and select
> Add guarantor, select an user
> => surname and firstname inputs are kept, but select is emptied
Weird. And to add more weirdness to this, if I comment out that
guarantor_relationship mentioned above, relationship remains in non-patron
guarantor field set but disappears from patron guarantor :D
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list