diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldAddForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldAddForm.php index 3ee2a90..e3f5cb0 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldAddForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldAddForm.php @@ -124,11 +124,6 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, $this->mode = $form_mode; $this->adminPath = $this->entityManager->getAdminPath($this->entity_type, $this->bundle); - $form['#attributes'] = array( - 'class' => array('field-ui-overview'), - 'id' => 'field-display-overview', - ); - // Gather bundle information. $instances = $this->fieldInfo->getBundleInstances($entity_type, $bundle); $field_types = $this->fieldTypePluginManager->getDefinitions(); @@ -148,9 +143,12 @@ public function buildForm(array $form, array &$form_state, $entity_type = NULL, 'class' => array('field-ui-overview'), 'id' => 'field-display-overview', ), + // @todo Remove once _title from \Drupal\field_ui\Routing\RouteSubscriber + // will start to work. + '#title' => 'Add a new field', ); - // Gather valid field types. + // Gather valid field types to add. $field_type_options = array(); foreach ($field_types as $name => $field_type) { // Skip field types which should not be added via user interface. @@ -318,7 +316,7 @@ public function validateForm(array &$form, array &$form_state) { * @param array $form_state * A reference to a keyed array containing the current state of the form. * - * @see Drupal\field_ui\FieldOverview::validateForm() + * @see \Drupal\field_ui\Form\FieldAddForm::validateForm() */ protected function validateAddNew(array $form, array &$form_state) { $field = $form_state['values']['_add_new_field']; @@ -366,7 +364,7 @@ protected function validateAddNew(array $form, array &$form_state) { * @param array $form_state * A reference to a keyed array containing the current state of the form. * - * @see Drupal\field_ui\FieldOverview::validate() + * @see \Drupal\field_ui\Form\FieldAddForm::validateForm() */ protected function validateAddExisting(array $form, array &$form_state) { // The form element might be absent if no existing fields can be added to