Issue #2569419 by alexpott, lauriii, xjm: Replace remaining !placeholder in ConfigSync
parent
c382eadeff
commit
1a4fb65479
|
@ -217,12 +217,16 @@ class ConfigSync extends FormBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort($change_list);
|
sort($change_list);
|
||||||
$change_list_render = array(
|
$message = [
|
||||||
|
[
|
||||||
|
'#markup' => $this->t('The following items in your active configuration have changes since the last import that may be lost on the next import.')
|
||||||
|
],
|
||||||
|
[
|
||||||
'#theme' => 'item_list',
|
'#theme' => 'item_list',
|
||||||
'#items' => $change_list,
|
'#items' => $change_list,
|
||||||
);
|
]
|
||||||
$change_list_html = $this->renderer->renderPlain($change_list_render);
|
];
|
||||||
drupal_set_message($this->t('The following items in your active configuration have changes since the last import that may be lost on the next import. !changes', array('!changes' => $change_list_html)), 'warning');
|
drupal_set_message($this->renderer->renderPlain($message), 'warning');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +241,7 @@ class ConfigSync extends FormBase {
|
||||||
$form[$collection]['collection_heading'] = array(
|
$form[$collection]['collection_heading'] = array(
|
||||||
'#type' => 'html_tag',
|
'#type' => 'html_tag',
|
||||||
'#tag' => 'h2',
|
'#tag' => 'h2',
|
||||||
'#value' => $this->t('!collection configuration collection', array('!collection' => $collection)),
|
'#value' => $this->t('@collection configuration collection', array('@collection' => $collection)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
foreach ($storage_comparer->getChangelist(NULL, $collection) as $config_change_type => $config_names) {
|
foreach ($storage_comparer->getChangelist(NULL, $collection) as $config_change_type => $config_names) {
|
||||||
|
|
|
@ -187,13 +187,16 @@ class ConfigExportImportUITest extends WebTestBase {
|
||||||
->save();
|
->save();
|
||||||
$this->drupalGet('admin/config/development/configuration');
|
$this->drupalGet('admin/config/development/configuration');
|
||||||
$this->assertText(t('Warning message'));
|
$this->assertText(t('Warning message'));
|
||||||
$this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site');
|
$this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import.');
|
||||||
|
// Ensure the item is displayed as part of a list (to avoid false matches
|
||||||
|
// on the rest of the page) and that the list markup is not escaped.
|
||||||
|
$this->assertRaw('<li>system.site</li>');
|
||||||
// Remove everything from staging. The warning about differences between the
|
// Remove everything from staging. The warning about differences between the
|
||||||
// active and snapshot should no longer exist.
|
// active and snapshot should no longer exist.
|
||||||
\Drupal::service('config.storage.staging')->deleteAll();
|
\Drupal::service('config.storage.staging')->deleteAll();
|
||||||
$this->drupalGet('admin/config/development/configuration');
|
$this->drupalGet('admin/config/development/configuration');
|
||||||
$this->assertNoText(t('Warning message'));
|
$this->assertNoText(t('Warning message'));
|
||||||
$this->assertNoText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site');
|
$this->assertNoText('The following items in your active configuration have changes since the last import that may be lost on the next import.');
|
||||||
$this->assertText(t('There are no configuration changes to import.'));
|
$this->assertText(t('There are no configuration changes to import.'));
|
||||||
// Write a file to staging. The warning about differences between the
|
// Write a file to staging. The warning about differences between the
|
||||||
// active and snapshot should now exist.
|
// active and snapshot should now exist.
|
||||||
|
@ -205,7 +208,10 @@ class ConfigExportImportUITest extends WebTestBase {
|
||||||
$staging->write('system.site', $data);
|
$staging->write('system.site', $data);
|
||||||
$this->drupalGet('admin/config/development/configuration');
|
$this->drupalGet('admin/config/development/configuration');
|
||||||
$this->assertText(t('Warning message'));
|
$this->assertText(t('Warning message'));
|
||||||
$this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import. system.site');
|
$this->assertText('The following items in your active configuration have changes since the last import that may be lost on the next import.');
|
||||||
|
// Ensure the item is displayed as part of a list (to avoid false matches
|
||||||
|
// on the rest of the page) and that the list markup is not escaped.
|
||||||
|
$this->assertRaw('<li>system.site</li>');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue