Bug 14358: Changing the module refreshes the page and resets library choice
authorOwen Leonard <oleonard@myacpl.org>
Thu, 4 Apr 2019 14:05:21 +0000 (14:05 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 17 Apr 2019 20:54:10 +0000 (20:54 +0000)
This patch makes an incremental change towards fixing Bug 14358: The
"New notice" button is converted to a dropdown button which asks the
user to select a module to start with.

To test, apply the patch and go to Tools -> Notices. Test the "New
notice" button and confirm that module selections are reflected in the
notice add form you are shown.

Signed-off-by: Mikaƫl Olangcay Brisebois <mikael.olangcay-brisebois@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit edf173e6ef1fa6de6e07f41c229799733456901a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 99bc0ba719b2e23eb5b89f4ec8fc033461576109)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt

index 5acbfa7..01e1e87 100644 (file)
             </select>
       </p>
     [% END %]
-      <div id="toolbar" class="btn-toolbar">
-          <button type="submit" class="btn btn-default btn-sm" id="newnotice"><i class="fa fa-plus"></i> New notice</button>
-        <input type="hidden" id="op" name="op" />
-      </div>
     </form>
 
+        <div id="toolbar" class="btn-toolbar">
+            <div class="btn-group">
+                <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New notice <span class="caret"></span></button>
+                <ul class="dropdown-menu">
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=acquisition">Acquisition</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=catalogue">Catalog</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=circulation">Circulation</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=claimacquisition">Claim acquisition</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=claimissues">Claim serial issue</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=reserves">Holds</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=orderacquisition">Order acquisition</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=members">Patrons</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=serial">Serials (new issue)</a></li>
+                    <li><a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=suggestions">Suggestions</a></li>
+
+                </ul>
+            </div>
+        </div>
+
                [% IF ( search ) %]
         <p>You searched for <b>[% searchfield | html %]</b></p>
                [% END %]
         [% END %]
 [% END %]
 
-       
 [% IF add_form or copy_form %]
 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
 
                 <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
             </ul>
         </div>
-        <a class="btn btn-default btn-sm cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
+        <a class="btn btn-default cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
     </div>
 
         <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate">