Bug 34478: Add 'op' to opac-messaging

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2024-01-31 11:42:57 +01:00
parent 20a94efb4d
commit 8de3f8a8f6
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 3 additions and 2 deletions

View file

@ -39,7 +39,7 @@
[% END %]
<form action="/cgi-bin/koha/opac-messaging.pl" method="post" name="opacmessaging">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="modify" value="yes" />
<input type="hidden" name="op" value="cud-modify" />
[% IF Koha.Preference( 'EnhancedMessagingPreferencesOPAC' ) %]
<table class="table table-bordered table-condensed table-striped">

View file

@ -51,8 +51,9 @@ my $patron = Koha::Patrons->find( $borrowernumber ); # FIXME and if borrowernumb
my $messaging_options;
$messaging_options = C4::Members::Messaging::GetMessagingOptions() if $opac_messaging;
if ( defined $query->param('cud-modify') && $query->param('cud-modify') eq 'yes' ) {
my $op = $query->param('op') || q{};
if ( $op eq 'cud-modify' ) {
if( $opac_messaging ) {
my $sms = $query->param('SMSnumber');
my $sms_provider_id = $query->param('sms_provider_id');