Skip to content

Commit

Permalink
Remove new options for checkin and checkout notices, they are always …
Browse files Browse the repository at this point in the history
…digest notices
  • Loading branch information
kylemhall committed Feb 1, 2021
1 parent 6252be8 commit f4df8b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 30 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.9] - 2021-02-01
### Added
- Add ability to send only first of HOLD notices for each patron

## [0.0.5] - 2021-01-15
### Changed
Don't reset any call status back to "pending", it may be causing duplicate calls.
- Don't reset any call status back to "pending", it may be causing duplicate calls.

## [0.0.2] - 2020-05-13
### Added
This plugin, initial commit ;)
- This plugin, initial commit ;)
18 changes: 2 additions & 16 deletions Koha/Plugin/Com/ByWaterSolutions/TwilioVoice.pm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ sub before_send_messages {
my $AccountSid = $self->retrieve_data('AccountSid');
my $AuthToken = $self->retrieve_data('AuthToken');
my $single_notice_hold = $self->retrieve_data('single_notice_hold');
my $single_notice_checkin = $self->retrieve_data('single_notice_checkin');
my $single_notice_checkout = $self->retrieve_data('single_notice_checkout');

my $from = $self->retrieve_data('From');

Expand All @@ -71,14 +69,6 @@ sub before_send_messages {
next if $sent->{HOLD}->{ $m->borrowernumber };
$sent->{HOLD}->{ $m->borrowernumber } = 1;
}
elsif ( $m->letter_code eq 'CHECKIN' && $single_notice_checkin ) {
next if $sent->{CHECKIN}->{ $m->borrowernumber };
$sent->{CHECKIN}->{ $m->borrowernumber } = 1;
}
elsif ( $m->letter_code eq 'CHECKOUT' && $single_notice_checkout ) {
next if $sent->{CHECKOUT}->{ $m->borrowernumber };
$sent->{CHECKOUT}->{ $m->borrowernumber } = 1;
}

my $patron = Koha::Patrons->find( $m->borrowernumber );
next unless $patron;
Expand Down Expand Up @@ -135,9 +125,7 @@ sub configure {
AccountSid => $self->retrieve_data('AccountSid'),
AuthToken => $self->retrieve_data('AuthToken'),
From => $self->retrieve_data('From'),
single_notice_hold => $self->retrieve_data('single_notice_hold'),
single_notice_checkin => $self->retrieve_data('single_notice_checkin'),
single_notice_checkout => $self->retrieve_data('single_notice_checkout'),
single_notice_hold => $self->retrieve_data('single_notice_hold'),
);

$self->output_html( $template->output() );
Expand All @@ -148,9 +136,7 @@ sub configure {
AccountSid => $cgi->param('AccountSid'),
AuthToken => $cgi->param('AuthToken'),
From => $cgi->param('From'),
single_notice_hold => $cgi->param('single_notice_hold') ? 1 : 0,
single_notice_checkin => $cgi->param('single_notice_checkin') ? 1 : 0,
single_notice_checkout => $cgi->param('single_notice_checkout') ? 1 : 0,
single_notice_hold => $cgi->param('single_notice_hold') ? 1 : 0,
}
);
$self->go_home();
Expand Down
12 changes: 0 additions & 12 deletions Koha/Plugin/Com/ByWaterSolutions/TwilioVoice/configure.tt
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@
Send only the first <em>HOLD</em> notice for each patron, mark all others as sent
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="single_notice_checkin" value="1" [% IF single_notice_checkin %]checked="checked"[% END %]>
Send only the first <em>CHECKIN</em> notice for each patron, mark all others as sent
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="single_notice_checkout" value="1" [% IF single_notice_checkout %]checked="checked"[% END %]>
Send only the first <em>CHECKOUT</em> notice for each patron, mark all others as sent
</label>
</div>
</fieldset>

<button type="submit" class="btn btn-default">Submit</button>
Expand Down

0 comments on commit f4df8b0

Please sign in to comment.