Lines 49-58
my $borrower = GetMemberDetails( $borrowernumber );
Link Here
|
49 |
my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); |
49 |
my $messaging_options = C4::Members::Messaging::GetMessagingOptions(); |
50 |
|
50 |
|
51 |
if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { |
51 |
if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) { |
52 |
|
52 |
my $sms = $query->param('SMSnumber'); |
53 |
if ( $query->param('SMSnumber') ne $borrower->{'mobile'} ) { |
53 |
if ( defined $sms && ( $borrower->{'smsalertnumber'} // '' ) ne $sms ) { |
54 |
ModMember( borrowernumber => $borrowernumber, |
54 |
ModMember( borrowernumber => $borrowernumber, |
55 |
smsalertnumber => $query->param('SMSnumber') ); |
55 |
smsalertnumber => $sms ); |
56 |
$borrower = GetMemberDetails( $borrowernumber ); |
56 |
$borrower = GetMemberDetails( $borrowernumber ); |
57 |
} |
57 |
} |
58 |
|
58 |
|
Lines 61-70
if ( defined $query->param('modify') && $query->param('modify') eq 'yes' ) {
Link Here
|
61 |
|
61 |
|
62 |
C4::Form::MessagingPreferences::set_form_values({ borrowernumber => $borrower->{'borrowernumber'} }, $template); |
62 |
C4::Form::MessagingPreferences::set_form_values({ borrowernumber => $borrower->{'borrowernumber'} }, $template); |
63 |
|
63 |
|
64 |
# warn( Data::Dumper->Dump( [ $messaging_options ], [ 'messaging_options' ] ) ); |
|
|
65 |
$template->param( BORROWER_INFO => [ $borrower ], |
64 |
$template->param( BORROWER_INFO => [ $borrower ], |
66 |
messagingview => 1, |
65 |
messagingview => 1, |
67 |
SMSnumber => $borrower->{'smsalertnumber'} ? $borrower->{'smsalertnumber'} : $borrower->{'mobile'}, |
66 |
SMSnumber => $borrower->{'smsalertnumber'}, |
68 |
SMSSendDriver => C4::Context->preference("SMSSendDriver"), |
67 |
SMSSendDriver => C4::Context->preference("SMSSendDriver"), |
69 |
TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") ); |
68 |
TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification") ); |
70 |
|
69 |
|
71 |
- |
|
|