diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php index 2ce81a5..44d730f 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php @@ -98,9 +98,10 @@ public function buildForm(array $form, array &$form_state) { ); foreach ($uninstallable as $module) { + $module_name = $module->info['name'] ?: $module->name; - $form['modules'][$module->name]['checkbox'] = array( + $form['modules'][$module->name]['uninstall']['checkbox'] = array( '#type' => 'checkbox', '#title' => $this->t('Uninstall @module module', array('@module' => $module_name)), '#title_display' => 'invisible', @@ -109,14 +110,16 @@ public function buildForm(array $form, array &$form_state) { // All modules which depend on this one must be uninstalled first, before // we can allow this module to be uninstalled. (The installation profile // is excluded from this list.) + $required_by = array(); foreach (array_keys($module->required_by) as $dependent) { if ($dependent != $profile && drupal_get_installed_schema_version($dependent) != SCHEMA_UNINSTALLED) { $name = isset($modules[$dependent]->info['name']) ? $modules[$dependent]->info['name'] : $dependent; $required_by[] = $name; - $form['modules'][$module->name]['checkbox']['#disabled'] = TRUE; + $form['modules'][$module->name]['uninstall']['checkbox']['#disabled'] = TRUE; } } + $form['modules'][$module->name]['name'] = array( '#markup' => '' . $module_name . '', ); @@ -133,7 +136,8 @@ public function buildForm(array $form, array &$form_state) { $disabled_message = '