mailjet_settingsform_usstates_commented.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. diff --git a/src/Form/MailjetSettingsForm.php b/src/Form/MailjetSettingsForm.php
  2. index 553de57..0a7b778 100644
  3. --- a/src/Form/MailjetSettingsForm.php
  4. +++ b/src/Form/MailjetSettingsForm.php
  5. @@ -231,21 +231,21 @@ public function buildForm(array $form, FormStateInterface $form_state)
  6. // States only show up for US citizens
  7. - $path = drupal_get_path('module', 'mailjet');
  8. - //include $path . '/lib/mailjet-api-php/src/UsStates.php';
  9. - $form['infos']['address_state'] = [
  10. - '#type' => 'select',
  11. - '#title' => t('State'),
  12. - '#options' => UsStates::getStates(),
  13. - '#default_value' => !empty($user_infos) ? $user_infos['AddressState'] : '',
  14. - '#required' => true,
  15. - '#states' => [
  16. - // Only show this field when the value of type is sell.
  17. - 'visible' => [
  18. - ':input[name="address_country"]' => ['value' => 'US'],
  19. - ],
  20. - ],
  21. - ];
  22. + // $path = drupal_get_path('module', 'mailjet');
  23. + // //include $path . '/lib/mailjet-api-php/src/UsStates.php';
  24. + // $form['infos']['address_state'] = [
  25. + // '#type' => 'select',
  26. + // '#title' => t('State'),
  27. + // '#options' => UsStates::getStates(),
  28. + // '#default_value' => !empty($user_infos) ? $user_infos['AddressState'] : '',
  29. + // '#required' => true,
  30. + // '#states' => [
  31. + // // Only show this field when the value of type is sell.
  32. + // 'visible' => [
  33. + // ':input[name="address_country"]' => ['value' => 'US'],
  34. + // ],
  35. + // ],
  36. + // ];
  37. $form['actions']['#type'] = 'actions';
  38. $form['actions']['submit'] = [