diff --git a/include/ajax.content.php b/include/ajax.content.php index 536b4d48fe2b423d78bb7b93f0b033436d39cb42..fb5b49540ac4cf4726d7bc310e6e95f47407da4a 100644 --- a/include/ajax.content.php +++ b/include/ajax.content.php @@ -209,6 +209,7 @@ class ContentAjaxAPI extends AjaxController { Http::response(400, '`root` is required parameter'); switch ($_GET['root']) { + case 'thank-you': case 'cannedresponse': $roots = array('ticket'); break; diff --git a/include/staff/page.inc.php b/include/staff/page.inc.php index 6326500aba5bd1b6d545eb1f8eae59bb7645cbda..ea373533c886b1b9bd7d11f8cd651e461dca1072 100644 --- a/include/staff/page.inc.php +++ b/include/staff/page.inc.php @@ -145,6 +145,7 @@ if ($page && count($langs) > 1) { ?> lang="<?php echo $cfg->getPrimaryLanguage(); ?>"> <textarea name="body" cols="21" rows="12" style="width:100%" class="richtext draft" <?php + if (!$info['type'] || $info['type'] == 'thank-you') echo 'data-root-context="thank-you"'; list($draft, $attrs) = Draft::getDraftAndDataAttrs('page', $info['id'], $info['body']); echo $attrs; ?>><?php echo $draft ?: $info['body']; ?></textarea> </div> @@ -156,6 +157,7 @@ if ($page && count($langs) > 1) { ?> <div id="translation-<?php echo $tag; ?>" class="tab_content" style="display:none;" lang="<?php echo $tag; ?>"> <textarea name="trans[<?php echo $tag; ?>][body]" cols="21" rows="12" +<?php if ($info['type'] == 'thank-you') echo 'data-root-context="thank-you"'; ?> style="width:100%" class="richtext draft" <?php list($draft, $attrs) = Draft::getDraftAndDataAttrs('page', $info['id'].'.'.$tag, $info['trans'][$tag]);