View | Details | Raw Unified | Return to bug 34650
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (-1 / +8 lines)
Lines 17-23 Link Here
17
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
17
            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span></button>
18
            <ul class="dropdown-menu">
18
            <ul class="dropdown-menu">
19
                <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=edit_form&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;referer=[% op | uri %]">Edit list</a></li>
19
                <li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=edit_form&amp;shelfnumber=[% shelf.shelfnumber | uri %]&amp;referer=[% op | uri %]">Edit list</a></li>
20
                <li><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=delete&amp;shelfnumber=[% shelf.shelfnumber | html %]">Delete list</a></li>
20
                <li>
21
                    <a id="deleteshelf_toolbar" href="#">Delete list</a>
22
                    <form id="deleteshelf_toolbar_form" action="shelves.pl" method="post">
23
                        [% INCLUDE 'csrf-token.inc' %]
24
                        <input type="hidden" name="op" value="delete">
25
                        <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]">
26
                    </form>
27
                </li>
21
            </ul>
28
            </ul>
22
        </div>
29
        </div>
23
        [% END %]
30
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-1 / +8 lines)
Lines 957-962 Link Here
957
                        e.preventDefault();
957
                        e.preventDefault();
958
                    }
958
                    }
959
                });
959
                });
960
                $("#deleteshelf_toolbar").on('click',function(e){
961
                    if(confirm(_("Are you sure you want to delete this list?"))){
962
                        $("#deleteshelf_toolbar_form").submit();
963
                        return false;
964
                    } else {
965
                        e.preventDefault();
966
                    }
967
                });
960
             });
968
             });
961
969
962
        [% END %]
970
        [% END %]
963
- 

Return to bug 34650