Loading src/Form/InviteTypeForm.php +12 −2 Changes for src/Form/InviteTypeForm.php: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -152,17 +152,27 @@ class InviteTypeForm extends EntityForm { ]; } else { $this->messenger->addWarning($this->t('Please enable a sending method module such as Invite by email.')); $form['send_method'] = [ '#type' => 'item', '#markup' => $this->t('Please enable a sending method module such as Invite by email.'), ]; $form['actions']['submit']['#disabled'] = TRUE; } return $form; } /** * {@inheritdoc} */ protected function actions(array $form, FormStateInterface $form_state) { $actions = parent::actions($form, $form_state); if (empty($this->pluginManager->getDefinitions())) { $actions['submit']['#disabled'] = TRUE; } return $actions; } /** * Helper method to add an invite_sender record. */ Loading Loading
src/Form/InviteTypeForm.php +12 −2 Changes for src/Form/InviteTypeForm.php: 12 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -152,17 +152,27 @@ class InviteTypeForm extends EntityForm { ]; } else { $this->messenger->addWarning($this->t('Please enable a sending method module such as Invite by email.')); $form['send_method'] = [ '#type' => 'item', '#markup' => $this->t('Please enable a sending method module such as Invite by email.'), ]; $form['actions']['submit']['#disabled'] = TRUE; } return $form; } /** * {@inheritdoc} */ protected function actions(array $form, FormStateInterface $form_state) { $actions = parent::actions($form, $form_state); if (empty($this->pluginManager->getDefinitions())) { $actions['submit']['#disabled'] = TRUE; } return $actions; } /** * Helper method to add an invite_sender record. */ Loading