diff --git a/core/modules/config/config.module b/core/modules/config/config.module index 05f4b6d..925be4e 100644 --- a/core/modules/config/config.module +++ b/core/modules/config/config.module @@ -24,6 +24,11 @@ function config_help($route_name, RouteMatchInterface $route_match) { $output = ''; $output .= '

' . t('Import configuration that is placed in your staging directory. All changes, deletions, renames, and additions are listed below.') . '

'; return $output; + + case 'config.import_full': + $output = ''; + $output .= '

' . t('After uploading a configuration archive here, you will be able to examine the changes and import them.') . '

'; + return $output; } } diff --git a/core/modules/config/src/Form/ConfigImportForm.php b/core/modules/config/src/Form/ConfigImportForm.php index 9ed9b83..85618cb 100644 --- a/core/modules/config/src/Form/ConfigImportForm.php +++ b/core/modules/config/src/Form/ConfigImportForm.php @@ -55,13 +55,10 @@ public function getFormId() { * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { - $form['description'] = array( - '#markup' => '

' . $this->t('Use the upload button below.') . '

', - ); $form['import_tarball'] = array( '#type' => 'file', - '#title' => $this->t('Select your configuration export file'), - '#description' => $this->t('This form will redirect you to the import configuration screen.'), + '#title' => $this->t('Configuration archive'), + '#description' => $this->t('Allowed types: @extensions.', array('@extensions' => 'tar.gz tgz')), ); $form['submit'] = array( @@ -80,7 +77,7 @@ public function validateForm(array &$form, FormStateInterface $form_state) { $form_state->setValue('import_tarball', $file_upload->getRealPath()); } else { - $form_state->setErrorByName('import_tarball', $this->t('The import tarball could not be uploaded.')); + $form_state->setErrorByName('import_tarball', $this->t('The file could not be uploaded.')); } } @@ -97,7 +94,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $files[] = $file['filename']; } $archiver->extractList($files, config_get_config_directory(CONFIG_STAGING_DIRECTORY)); - drupal_set_message($this->t('Your configuration files were successfully uploaded, ready for import.')); + drupal_set_message($this->t('Your configuration files were successfully uploaded and are ready for import.')); $form_state->setRedirect('config.sync'); } catch (\Exception $e) {