Skip to content
Snippets Groups Projects
Commit 87665b08 authored by Jared Hancock's avatar Jared Hancock
Browse files

templates: Add typeahead to thank-you pages

parent 65f0a1b7
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment