Bug 14358: Changing the module refreshes the page and resets library choice

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 edf173e6ef)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2019-04-04 14:05:21 +00:00 committed by Martin Renvoize
parent 6dd197f8be
commit 99bc0ba719
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 20 additions and 6 deletions

View File

@ -59,12 +59,27 @@
</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 %]
@ -150,7 +165,6 @@
[% END %]
[% END %]
[% IF add_form or copy_form %]
<h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
@ -164,7 +178,7 @@
<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">