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

Add draft support for site page translataions

parent c55f92f6
No related branches found
No related tags found
No related merge requests found
......@@ -150,8 +150,10 @@ $($('option:selected', this).val()).show(); ">
foreach ($langs as $tag) { ?>
<div id="translation-<?php echo $tag; ?>" style="display:none" lang="<?php echo $tag; ?>">
<textarea name="trans[<?php echo $tag; ?>]" cols="21" rows="12"
style="width:98%;" class="richtext"
><?php echo $info['trans'][$tag]; ?></textarea>
style="width:98%;" class="richtext draft"
<?php
list($draft, $attrs) = Draft::getDraftAndDataAttrs('page', $info['id'].'.'.$tag, $info['trans'][$tag]);
echo $attrs; ?>><?php echo $draft ?: $info['trans'][$tag]; ?></textarea>
</div>
<?php }
} ?>
......
......@@ -48,7 +48,7 @@ if($_POST) {
$page->attachments->upload(
Draft::getAttachmentIds($_POST['body']),
true);
Draft::deleteForNamespace('page.'.$page->getId());
Draft::deleteForNamespace('page.'.$page->getId().'%');
} elseif(!$errors['err'])
$errors['err'] = sprintf(__('Unable to update %s. Correct error(s) below and try again.'),
__('this site page'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment