To recreate: 1 - create a patron list with no patrons 2 - Go to Tools->Batch patron modification 3 - Select that empty list 4 - Stare blankly at a blank screen
You get the same result if you simply do not fill any of "Use a file", "Or use a patron list", "Or list card numbers...".
Changed Bug title to reflect all of the cases (see comment #1)
Created attachment 53149 [details] [review] Bug 16682 - Fix display if Batch patron modification tool does not get any patrons To reproduce: - Go to Tools->Batch patron modification - Submit without filling any of "Use a file", "Or use a patron list", "Or list card numbers..." or use a patron lists with zero members Result: Screen without any information To test: - Apply patch - Repeat steps above - Verify that you get a nice message
I think this needs an additional level of indentation, and maybe a comment at the [% END %] , just to mark what is being closed, because it is far away. Also, I prefer [% IF something %] [% ELSE %] rather than [% IF !something %] [% ELSE %], but that's not that important.
(In reply to Srdjan Jankovic from comment #4) > I think this needs an additional level of indentation, and maybe a comment > at the [% END %] , just to mark what is being closed, because it is far away. > Also, I prefer [% IF something %] [% ELSE %] rather than [% IF !something %] > [% ELSE %], but that's not that important. Hi Srdjan, thanks for testing. I'll change the strategy for this, patch follows.
Created attachment 53163 [details] [review] Bug 16682: Fix display if Batch patron modification tool does not get any patrons To reproduce: - Go to Tools->Batch patron modification - Submit without filling any of "Use a file", "Or use a patron list", "Or list card numbers..." or use a patron lists with zero members Result: Screen without any information To test: - Apply patch - Repeat steps above - Verify that you get a nice message - Verify that the tool works as before - with invalid card numbers only - with valid and invalid card numbers - with valid card numbers only
Created attachment 53211 [details] [review] [SIGNED-OFF] Bug 16682: Fix display if Batch patron modification tool does not get any patrons To reproduce: - Go to Tools->Batch patron modification - Submit without filling any of "Use a file", "Or use a patron list", "Or list card numbers..." or use a patron lists with zero members Result: Screen without any information To test: - Apply patch - Repeat steps above - Verify that you get a nice message - Verify that the tool works as before - with invalid card numbers only - with valid and invalid card numbers - with valid card numbers only Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
I think the message should follow the pattern used when you try to delete a currency which is in use. Something like this: <h1>Batch patrons modification</h1> <div class="dialog alert"> <p>No patron card numbers given.</p> <form action="/cgi-bin/koha/tools/modborrowers.pl" method="get"> <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> </form> </div>
Created attachment 53235 [details] [review] Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons Format message as proposed in comment #8
Created attachment 53236 [details] [review] Bug 16682: Fix display if Batch patron modification tool does not get any patrons To reproduce: - Go to Tools->Batch patron modification - Submit without filling any of "Use a file", "Or use a patron list", "Or list card numbers..." or use a patron lists with zero members Result: Screen without any information To test: - Apply patch - Repeat steps above - Verify that you get a nice message - Verify that the tool works as before - with invalid card numbers only - with valid and invalid card numbers - with valid card numbers only Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 53237 [details] [review] Bug 16682: (followup) Fix display if Batch patron modification tool does not get any patrons Format message as proposed in comment #8 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 16.11, thanks Marc!
Pushed in 16.05. Will be in 16.05.02.
Patches pushed to 3.22.x, will be in 3.22.10