Skip to content

Commit

Permalink
Fix button name on updated form
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Aug 3, 2020
1 parent 0fc6c3b commit 347e321
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CRM/Contribute/Form/Task/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function buildQuickForm() {
$this->_rows = [];
$attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Contribution');
$defaults = [];
$now = date("Y-m-d");
$now = date('Y-m-d');
$paidByOptions = ['' => ts('- select -')] + CRM_Contribute_PseudoConstant::paymentInstrument();

while ($dao->fetch()) {
Expand All @@ -116,10 +116,10 @@ public function buildQuickForm() {
$row['trxn_date'] = $this->add('datepicker', "trxn_date_{$row['contribution_id']}", ts('Transaction Date'), [], FALSE, ['time' => FALSE]);
$defaults["trxn_date_{$row['contribution_id']}"] = $now;

$this->add("text", "check_number_{$row['contribution_id']}", ts('Check Number'));
$this->add('text', "check_number_{$row['contribution_id']}", ts('Check Number'));
$defaults["check_number_{$row['contribution_id']}"] = $dao->check_no;

$this->add("select", "payment_instrument_id_{$row['contribution_id']}", ts('Payment Method'), $paidByOptions);
$this->add('select', "payment_instrument_id_{$row['contribution_id']}", ts('Payment Method'), $paidByOptions);
$defaults["payment_instrument_id_{$row['contribution_id']}"] = $dao->paid_by;

$this->_rows[] = $row;
Expand All @@ -130,7 +130,7 @@ public function buildQuickForm() {
$this->addButtons([
[
'type' => 'next',
'name' => ts('Update Pending Status'),
'name' => ts('Record Payments'),
'isDefault' => TRUE,
],
[
Expand Down Expand Up @@ -167,7 +167,7 @@ public static function formRule($fields) {
$contribID = substr($name, 13);

if ($fields["payment_instrument_id_{$contribID}"] != CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'payment_instrument_id', 'Check')) {
$errors["payment_instrument_id_{$contribID}"] = ts("Payment Method should be Check when a check number is entered for a contribution.");
$errors["payment_instrument_id_{$contribID}"] = ts('Payment Method should be Check when a check number is entered for a contribution.');
}
}
}
Expand Down

0 comments on commit 347e321

Please sign in to comment.