In current master button "Search to add" in Quick add ne patron page don't open search window.
Tested and confirmed on master - you can no longer add guarantors from the quick add form.
I think it has been caused by commit bc9871f428af323901ebe57a6d0888f1dcf871cf Bug 23778: Regression: Guarantor entry section no longer has a unique id
But I think it's also broken since bug 14570. This must be fixed for 19.11.
Created attachment 95798 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron
This fixes the popup not showing, but after selecting a patron, the info is not added to the page. the line: $('#guarantor_relationships').append( fieldset ); simply does nothing. If you add it to something outside of #guarantor_relationships such as 'body' or '#quick_add_form' it shows up! I'm not sure why it refused to append to '#guarantor_relationships'.
I have a hunch that it has to do with these elements not existing at the time the page is loaded. These elements are created dynamically via javascript, right?
In addition, I just realized the guarantor 'template' is visible on the quick add form, but should not be.
(In reply to Kyle M Hall from comment #7) > In addition, I just realized the guarantor 'template' is visible on the > quick add form, but should not be. Are we sure about that? I was wondering too, but there is a note referring quick add and guarantor: Note: Quick add guarantor form populates address fields in full form
Created attachment 95800 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron
Created attachment 95803 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron This issue is caused by duplicating the patron guarantor fieldset. The solution is to move it between the two forms insetad. In addition, this patch moves the guarantor information fieldset to the area below the "Quick add" fieldset, instead of *inside* it. This change preserves the correct styling and layout of the Guarantor information fieldset whilst it is moved back and forth by the "quick add"/"full form" toggle. Test Plan: 1) Quick add a child patron 2) Attempt to use the "Search to add" button 3) Note it does nothing 4) Apply this patch 5) Repeat steps 1 and 2 6) It works now! 7) Test toggling between the quick add and full form views, note the "Guarantor information" fieldset shows correctly in the full form view.
Created attachment 95804 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron This issue is caused by duplicating the patron guarantor fieldset. The solution is to move it between the two forms insetad. In addition, this patch moves the guarantor information fieldset to the area below the "Quick add" fieldset, instead of *inside* it. This change preserves the correct styling and layout of the Guarantor information fieldset whilst it is moved back and forth by the "quick add"/"full form" toggle. Test Plan: 1) Quick add a child patron 2) Attempt to use the "Search to add" button 3) Note it does nothing 4) Apply this patch 5) Repeat steps 1 and 2 6) It works now! 7) Test toggling between the quick add and full form views, note the "Guarantor information" fieldset shows correctly in the full form view.
Created attachment 95812 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron This issue is caused by duplicating the patron guarantor fieldset. The solution is to move it between the two forms insetad. In addition, this patch moves the guarantor information fieldset to the area below the "Quick add" fieldset, instead of *inside* it. This change preserves the correct styling and layout of the Guarantor information fieldset whilst it is moved back and forth by the "quick add"/"full form" toggle. Test Plan: 1) Quick add a child patron 2) Attempt to use the "Search to add" button 3) Note it does nothing 4) Apply this patch 5) Repeat steps 1 and 2 6) It works now! 7) Test toggling between the quick add and full form views, note the "Guarantor information" fieldset shows correctly in the full form view. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 95813 [details] [review] Bug 23905: Remove extra closing span Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 95818 [details] [review] Bug 23905: Button "Search to add" doesn't work on Quick add new patron This issue is caused by duplicating the patron guarantor fieldset. The solution is to move it between the two forms insetad. In addition, this patch moves the guarantor information fieldset to the area below the "Quick add" fieldset, instead of *inside* it. This change preserves the correct styling and layout of the Guarantor information fieldset whilst it is moved back and forth by the "quick add"/"full form" toggle. Test Plan: 1) Quick add a child patron 2) Attempt to use the "Search to add" button 3) Note it does nothing 4) Apply this patch 5) Repeat steps 1 and 2 6) It works now! 7) Test toggling between the quick add and full form views, note the "Guarantor information" fieldset shows correctly in the full form view. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 95819 [details] [review] Bug 23905: Remove extra closing span Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Looks good to me, thanks guys.. PQA and Pushing.
Nice work! Pushed to master for 19.11.00