Skip to content

Commit

Permalink
LPs: Add save button in ckeditor see BT#17378
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 16, 2021
1 parent 69d8ceb commit b4d865d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions main/lp/lp_controller.php
Expand Up @@ -876,7 +876,7 @@ function(reponse) {
require 'lp_list.php';
} else {
Session::write('refresh', 1);
if (isset($_POST['submit_button']) && !empty($post_title)) {
if (isset($_POST) && !empty($post_title)) {
// Updating the lp.modified_on
$_SESSION['oLP']->set_modified_on();

Expand Down Expand Up @@ -907,7 +907,6 @@ function(reponse) {
$_SESSION['oLP']->edit_document($_course);
}
$is_success = true;

$extraFieldValues = new ExtraFieldValue('lp_item');
$extraFieldValues->saveFieldValues($_POST, true);

Expand Down
Expand Up @@ -37,7 +37,7 @@ public function getConfig()
protected function getMaximizedToolbar()
{
return [
['NewPage', 'Templates', '-', 'Preview', 'Print'],
['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
Expand Down Expand Up @@ -76,7 +76,7 @@ protected function getMaximizedToolbar()
protected function getNormalToolbar()
{
return [
['PasteFromWord', '-', 'Undo', 'Redo'],
['Save', 'PasteFromWord', '-', 'Undo', 'Redo'],
['Link', 'Unlink', 'Anchor', 'Glossary'],
[
'Image',
Expand Down Expand Up @@ -117,7 +117,7 @@ protected function getNormalToolbar()
protected function getMinimizedToolbar()
{
return [
$this->getNewPageBlock(),
array_merge(['Save'], $this->getNewPageBlock()),
['Undo', 'Redo'],
['Link', 'Image', 'Video', 'Youtube', 'VimeoEmbed', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
['BulletedList', 'NumberedList', 'HorizontalRule'],
Expand Down

0 comments on commit b4d865d

Please sign in to comment.