Bug 34478: Changes for opac-sendshelf

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Marcel de Rooy 2024-02-01 14:39:46 +00:00 committed by Jonathan Druart
parent 9439c9a36e
commit 672c0eafce
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 3 additions and 1 deletions

View file

@ -41,6 +41,7 @@
<textarea id="comment" name="comment" rows="4" cols="40" class="form-control"></textarea>
<input type="hidden" name="shelfid" value="[% shelfid | html %]" />
<input type="hidden" name="op" value="cud-send" />
</fieldset>
[% IF Koha.Preference('OPACHoldRequests') || Koha.Preference('OpacRenewalAllowed') %]<p id="donotrequestbymail">Please do not use this mail to request or renew books.</p>[% END %]
<fieldset class="action">

View file

@ -54,10 +54,11 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
my $shelfid = $query->param('shelfid');
my $email = $query->param('email');
my $op = $query->param('op') // q{};
my $shelf = Koha::Virtualshelves->find($shelfid);
if ( $shelf and $shelf->can_be_viewed($borrowernumber) ) {
if ($email) {
if ( $email && $op eq 'cud-send' ) {
my $comment = $query->param('comment');
my $patron = Koha::Patrons->find($borrowernumber);