From 423d7d7dc1107e14602457113715ac84cb737789 Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@bywatersolutions.com>
Date: Fri, 13 Dec 2019 14:24:33 +0000
Subject: [PATCH] Bug 24240: Move form closing tag outside of conditional

To test:
1 - Create a public list
2 - View the list as a user not signed in
3 - Validate the HTML, note the div closed with open elements, and a form tag unclosed
4 - Apply patch
5 - Those errors are fixed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
---
 koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
index d96c4a3684..5e9f40d3f2 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
@@ -547,15 +547,14 @@
                         <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
                         <input type="hidden" name="modifyshelfcontents" value="1" />
                         <input type="submit" value="Remove selected items" id="remove-selected" class="btn btn-danger"/>
-                        </form>
                     [% ELSIF !itemsloop && can_manage_shelf %]
                         <form method="post" action="opac-shelves.pl">
                         <input type="hidden" name="op" value="delete" />
                         <input type="hidden" name="referer" value="list" />
                         <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]"/>
                         <input type="submit" class="btn btn-danger" value="Delete this list" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST)" />
-                        </form>
                     [% END %]
+                            </form> <!-- / myform -->
 
                     [% IF op == 'add_form' OR op == 'edit_form' %]
                         <form method="post" action="/cgi-bin/koha/opac-shelves.pl">
-- 
2.11.0