Skip to content

Commit

Permalink
CIWEMB-475: Update manage instalment screen notification messages
Browse files Browse the repository at this point in the history
  • Loading branch information
omarabuhussein committed Sep 26, 2023
1 parent cc24ce1 commit 0a50f92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ private function sendConfirmationEmail($contributionId) {

private function showOnSuccessNotifications() {
CRM_Core_Session::setStatus(
ts('The line item has been added.'),
ts('The line item has been added to payment plan and a payment has been created successfully'),
ts('Adding line item'),
'success'
);
}

private function showErrorNotification(Exception $e) {
CRM_Core_Session::setStatus(
ts('An error occurred while trying to add the line item') . ':' . $e->getMessage(),
ts('The line item could not be added to the payment plan. Error reason:') . $e->getMessage(),
ts('Error Adding Line item'),
'error'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,21 @@ private function sendConfirmationEmail($contributionId) {
}

private function showOnSuccessNotifications() {
$message = 'The membership has been added to payment plan and a payment has been created successfully';
if ($this->submittedValues['payment_type'] == self::PAYMENT_TYPE_NO_PAYMENT) {
$message = 'The membership has been added to payment plan but no payment has been created.';
}

CRM_Core_Session::setStatus(
$this->membershipType->name . ' ' . ts('has been added.'),
$message,
ts('Add') . ' ' . $this->membershipType->name,
'success'
);
}

private function showErrorNotification(Exception $e) {
CRM_Core_Session::setStatus(
ts('An error occurred while trying to add') . ' ' . $this->membershipType->name . ':' . $e->getMessage(),
ts('The membership could not be added to the payment plan. Error reason:') . $e->getMessage(),
ts('Error Adding') . $this->membershipType->name,
'error'
);
Expand Down

0 comments on commit 0a50f92

Please sign in to comment.