Commit 4ad8a3b8 authored by Christian Kuhn's avatar Christian Kuhn Committed by Benni Mack
Browse files

[BUGFIX] DocumentEditController save broken

With changing the input type=image to input type=submit, the x/y
values are no longer transferred the EditDocumentController
checked for, and content is no longer saved.
Adapt the controller code for the new parameters.

Resolves: #68776
Releases: master
Change-Id: Id1f3ec59ec728b48583c8ef79020c2feede4fd54
Reviewed-on: http://review.typo3.org/42297


Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent e4ee3f0b
......@@ -40,6 +40,8 @@
.c-inputButton {
color: inherit;
padding: 0;
}
input.c-inputButton {
text-indent: -1000px;
}
}
......
......@@ -507,7 +507,7 @@ class EditDocumentController {
* @return bool TRUE, then save the document (data submitted)
*/
public function doProcessData() {
$out = $this->doSave || isset($_POST['_savedok_x']) || isset($_POST['_saveandclosedok_x']) || isset($_POST['_savedokview_x']) || isset($_POST['_savedoknew_x']) || isset($_POST['_translation_savedok_x']) || isset($_POST['_translation_savedokclear_x']);
$out = $this->doSave || isset($_POST['_savedok']) || isset($_POST['_saveandclosedok']) || isset($_POST['_savedokview']) || isset($_POST['_savedoknew']) || isset($_POST['_translation_savedok_x']) || isset($_POST['_translation_savedokclear_x']);
return $out;
}
......@@ -615,7 +615,7 @@ class EditDocumentController {
$this->fixWSversioningInEditConf($tce->autoVersionIdMap);
}
// If a document is saved and a new one is created right after.
if (isset($_POST['_savedoknew_x']) && is_array($this->editconf)) {
if (isset($_POST['_savedoknew']) && is_array($this->editconf)) {
// Finding the current table:
reset($this->editconf);
$nTable = key($this->editconf);
......@@ -636,7 +636,7 @@ class EditDocumentController {
$this->compileStoreDat();
}
// If a preview is requested
if (isset($_POST['_savedokview_x'])) {
if (isset($_POST['_savedokview'])) {
// Get the first table and id of the data array from DataHandler
$table = reset(array_keys($this->data));
$id = reset(array_keys($this->data[$table]));
......@@ -647,11 +647,11 @@ class EditDocumentController {
$this->previewData['table'] = $table;
$this->previewData['id'] = $id;
}
$tce->printLogErrorMessages(isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
$tce->printLogErrorMessages(isset($_POST['_saveandclosedok']) || isset($_POST['_translation_savedok_x']) ? $this->retUrl : $this->R_URL_parts['path'] . '?' . GeneralUtility::implodeArrayForUrl('', $this->R_URL_getvars));
}
// || count($tce->substNEWwithIDs)... If any new items has been save, the document is CLOSED
// because if not, we just get that element re-listed as new. And we don't want that!
if (isset($_POST['_saveandclosedok_x']) || isset($_POST['_translation_savedok_x']) || $this->closeDoc < 0) {
if (isset($_POST['_saveandclosedok']) || isset($_POST['_translation_savedok_x']) || $this->closeDoc < 0) {
$this->closeDocument(abs($this->closeDoc));
}
}
......@@ -734,7 +734,7 @@ class EditDocumentController {
}
';
$previewCode = isset($_POST['_savedokview_x']) && $this->popViewId ? $this->generatePreviewCode() : '';
$previewCode = isset($_POST['_savedokview']) && $this->popViewId ? $this->generatePreviewCode() : '';
$this->doc->JScode = $this->doc->wrapScriptTags($javascript . $previewCode);
// Setting up the context sensitive menu:
......
......@@ -9067,6 +9067,8 @@ div#contentMenu1 {
#typo3-docheader .buttongroup .c-inputButton {
color: inherit;
padding: 0;
}
#typo3-docheader .buttongroup input.c-inputButton {
text-indent: -1000px;
}
#typo3-docheader select {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment