Commit 394b9d15 authored by Dries's avatar Dries

Issue #2053731 by StephaneQ: Replace theme() with drupal_render() in editor.

parent 656b3422
...@@ -122,8 +122,9 @@ public function submitForm(array &$form, array &$form_state) { ...@@ -122,8 +122,9 @@ public function submitForm(array &$form, array &$form_state) {
if (form_get_errors()) { if (form_get_errors()) {
unset($form['#prefix'], $form['#suffix']); unset($form['#prefix'], $form['#suffix']);
$status_messages = array('#theme' => 'status_messages');
$output = drupal_render($form); $output = drupal_render($form);
$output = '<div>' . theme('status_messages') . $output . '</div>'; $output = '<div>' . drupal_render($status_messages) . $output . '</div>';
$response->addCommand(new HtmlCommand('#editor-image-dialog-form', $output)); $response->addCommand(new HtmlCommand('#editor-image-dialog-form', $output));
} }
else { else {
......
...@@ -89,8 +89,9 @@ public function submitForm(array &$form, array &$form_state) { ...@@ -89,8 +89,9 @@ public function submitForm(array &$form, array &$form_state) {
if (form_get_errors()) { if (form_get_errors()) {
unset($form['#prefix'], $form['#suffix']); unset($form['#prefix'], $form['#suffix']);
$status_messages = array('#theme' => 'status_messages');
$output = drupal_render($form); $output = drupal_render($form);
$output = '<div>' . theme('status_messages') . $output . '</div>'; $output = '<div>' . drupal_render($status_messages) . $output . '</div>';
$response->addCommand(new HtmlCommand('#editor-link-dialog-form', $output)); $response->addCommand(new HtmlCommand('#editor-link-dialog-form', $output));
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment