Skip to content

Commit

Permalink
Merge pull request #257 from humhub/fix/256-richtext-template-editor
Browse files Browse the repository at this point in the history
Fix richtext on template editor
  • Loading branch information
luke- committed Jan 10, 2023
2 parents 28d18de + 6fab23d commit 6f2ed59
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.8.8 (Unreleased)
-----------------------
- Fix #256: Fix richtext on template editor

1.8.7 (January 8, 2023)
-----------------------
- Enh: Translatable Titles
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Custom Pages",
"description": "Allows admins to create custom pages (html or markdown) or external links to various navigations (e.g. top navigation, account menu).",
"keywords": ["pages", "custom", "iframe", "markdown", "link", "navigation", "spaces"],
"version": "1.8.7",
"version": "1.8.8",
"homepage": "https://github.com/humhub/custom-pages",
"humhub": {
"minVersion": "1.12"
Expand Down
6 changes: 3 additions & 3 deletions modules/template/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function actionResetElement($id)
return $this->asJson([
'success' => true,
'id' => $id,
'output' => TemplateElementAdminRow::widget(['model' => $element, 'saved' => true])
'output' => $this->renderAjaxPartial(TemplateElementAdminRow::widget(['model' => $element, 'saved' => true]))
]);
}

Expand Down Expand Up @@ -318,11 +318,11 @@ public function actionEditMultiple($id)
TemplateCache::flushByTemplateId($id);
return $this->asJson([
'success' => true,
'output' => TemplateContentTable::widget(['template' => $form->template, 'saved' => true])
'output' => $this->renderAjaxPartial(TemplateContentTable::widget(['template' => $form->template, 'saved' => true]))
]);
}

$this->asJson([
return $this->asJson([
'success' => false,
'output' => $this->renderAjaxPartial(EditMultipleElementsModal::widget([
'model' => $form,
Expand Down
4 changes: 2 additions & 2 deletions modules/template/controllers/OwnerContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public function actionEditMultiple($id)
}

return $this->asJson([
'output' => EditMultipleElementsModal::widget([
'output' => $this->renderAjaxPartial(EditMultipleElementsModal::widget([
'model' => $form,
'title' => Yii::t('CustomPagesModule.modules_template_controllers_AdminController', '<strong>Edit</strong> elements of {templateName}', ['templateName' => $form->template->name])
])
]))
]);
}

Expand Down

0 comments on commit 6f2ed59

Please sign in to comment.