Skip to content

Commit

Permalink
Form should not be cached and minor array fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
kporras07 committed May 21, 2019
1 parent 568652d commit f7cfd02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/PluginForm/WireGateway/WirePaymentMethodAddForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ class WirePaymentMethodAddForm extends BasePaymentMethodAddForm {
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);

$form['payment_details'] = $this->buildWireTransferForm($form['payment_details'], $form_state);
$form['payment_details']['commerce_wire_receipt'] = $this->buildWireTransferForm($form['payment_details'], $form_state);
$form['payment_details']['instructions'] = $this->entity->getPaymentGateway()->getPlugin()->buildPaymentInstructions();
$form_state->setCached(FALSE);
$form_state->disableCache();

return $form;
}

/**
* {@inheritdoc}
*/
protected function buildWireTransferForm(array $element, FormStateInterface $form_state) {
$element['commerce_wire_receipt'] = [
$element = [
'#title' => $this->t('Receipt'),
'#type' => 'managed_file',
'#description' => $this->t("Allowed formats: jpg, jpeg, png"),
Expand Down

0 comments on commit f7cfd02

Please sign in to comment.