Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -89,10 +89,9 @@ class MetadataGenerator implements MetadataGeneratorInterface {
|
|||
$label = $items->getFieldDefinition()->getLabel();
|
||||
$editor = $this->editorManager->createInstance($editor_id);
|
||||
$metadata = array(
|
||||
'label' => SafeMarkup::checkPlain($label),
|
||||
'label' => $label,
|
||||
'access' => TRUE,
|
||||
'editor' => $editor_id,
|
||||
'aria' => t('Entity @type @id, field @field', array('@type' => $entity->getEntityTypeId(), '@id' => $entity->id(), '@field' => $label)),
|
||||
);
|
||||
$custom_metadata = $editor->getMetadata($items);
|
||||
if (count($custom_metadata)) {
|
||||
|
|
|
@ -216,7 +216,7 @@ class QuickEditController extends ControllerBase {
|
|||
$response->addCommand(new FieldFormSavedCommand($output, $other_view_modes));
|
||||
}
|
||||
else {
|
||||
$output = (string) $this->renderer->renderRoot($form);
|
||||
$output = $this->renderer->renderRoot($form);
|
||||
// When working with a hidden form, we don't want its CSS/JS to be loaded.
|
||||
if ($request->request->get('nocssjs') !== 'true') {
|
||||
$response->setAttachments($form['#attached']);
|
||||
|
@ -228,7 +228,7 @@ class QuickEditController extends ControllerBase {
|
|||
$status_messages = array(
|
||||
'#type' => 'status_messages'
|
||||
);
|
||||
$response->addCommand(new FieldFormValidationErrorsCommand((string) $this->renderer->renderRoot($status_messages)));
|
||||
$response->addCommand(new FieldFormValidationErrorsCommand($this->renderer->renderRoot($status_messages)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ class QuickEditController extends ControllerBase {
|
|||
* The view mode the field should be rerendered in. Either an Entity Display
|
||||
* view mode ID, or a custom one. See hook_quickedit_render_field().
|
||||
*
|
||||
* @return string
|
||||
* @return \Drupal\Component\Utility\SafeStringInterface
|
||||
* Rendered HTML.
|
||||
*
|
||||
* @see hook_quickedit_render_field()
|
||||
|
@ -275,7 +275,7 @@ class QuickEditController extends ControllerBase {
|
|||
$output = $this->moduleHandler()->invoke($module, 'quickedit_render_field', $args);
|
||||
}
|
||||
|
||||
return (string) $this->renderer->renderRoot($output);
|
||||
return $this->renderer->renderRoot($output);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,7 +107,6 @@ class MetadataGeneratorTest extends QuickEditTestBase {
|
|||
'access' => TRUE,
|
||||
'label' => 'Plain text field',
|
||||
'editor' => 'plain_text',
|
||||
'aria' => 'Entity entity_test 1, field Plain text field',
|
||||
);
|
||||
$this->assertEqual($expected_1, $metadata_1, 'The correct metadata is generated for the first field.');
|
||||
|
||||
|
@ -118,7 +117,6 @@ class MetadataGeneratorTest extends QuickEditTestBase {
|
|||
'access' => TRUE,
|
||||
'label' => 'Simple number field',
|
||||
'editor' => 'form',
|
||||
'aria' => 'Entity entity_test 1, field Simple number field',
|
||||
);
|
||||
$this->assertEqual($expected_2, $metadata_2, 'The correct metadata is generated for the second field.');
|
||||
}
|
||||
|
@ -177,7 +175,6 @@ class MetadataGeneratorTest extends QuickEditTestBase {
|
|||
'access' => TRUE,
|
||||
'label' => 'Rich text field',
|
||||
'editor' => 'wysiwyg',
|
||||
'aria' => 'Entity entity_test 1, field Rich text field',
|
||||
'custom' => array(
|
||||
'format' => 'full_html'
|
||||
),
|
||||
|
|
|
@ -174,7 +174,6 @@ class QuickEditLoadingTest extends WebTestBase {
|
|||
'label' => 'Body',
|
||||
'access' => TRUE,
|
||||
'editor' => 'form',
|
||||
'aria' => 'Entity node 1, field Body',
|
||||
)
|
||||
);
|
||||
$this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
|
||||
|
@ -333,7 +332,6 @@ class QuickEditLoadingTest extends WebTestBase {
|
|||
'label' => 'Title',
|
||||
'access' => TRUE,
|
||||
'editor' => 'plain_text',
|
||||
'aria' => 'Entity node 1, field Title',
|
||||
)
|
||||
);
|
||||
$this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.');
|
||||
|
@ -514,7 +512,7 @@ class QuickEditLoadingTest extends WebTestBase {
|
|||
$ajax_commands = Json::decode($response);
|
||||
$this->assertIdentical(2, count($ajax_commands), 'The field form HTTP request results in two AJAX commands.');
|
||||
$this->assertIdentical('quickeditFieldFormValidationErrors', $ajax_commands[1]['command'], 'The second AJAX command is a quickeditFieldFormValidationErrors command.');
|
||||
$this->assertTrue(strpos($ajax_commands[1]['data'], t('The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.')), 'Error message returned to user.');
|
||||
$this->assertTrue(strpos($ajax_commands[1]['data'], 'The content has either been modified by another user, or you have already submitted modifications. As a result, your changes cannot be saved.'), 'Error message returned to user.');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue