From 5117f0df4c856154255fc03d8a5c3c65c6c124e3 Mon Sep 17 00:00:00 2001 From: Steve Binkowski Date: Fri, 21 Jun 2024 13:08:53 -0400 Subject: [PATCH] Ensure bill widget form recognizes canceled subscription status --- .../custom/nys_bill_vote/src/Form/BillVoteWidgetForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/modules/custom/nys_bill_vote/src/Form/BillVoteWidgetForm.php b/web/modules/custom/nys_bill_vote/src/Form/BillVoteWidgetForm.php index d4792eb96a..06dc5288ff 100644 --- a/web/modules/custom/nys_bill_vote/src/Form/BillVoteWidgetForm.php +++ b/web/modules/custom/nys_bill_vote/src/Form/BillVoteWidgetForm.php @@ -258,7 +258,8 @@ public function addSubscriptionForm(&$form, FormStateInterface $form_state, $nod $form_state->addBuildInfo('tid', $tid); // Check if already subscribed. - if ($this->billHelper->findSubscription($ref_node)) { + $subscription = $this->billHelper->findSubscription($ref_node); + if ($subscription && !$subscription->getCanceled()) { $nys_bill_subscribe = [ '#type' => 'markup', '#markup' => '
You Are Subscribed.
',