Skip to content

Commit

Permalink
[TASK] Remove inline onclick code from MoveElementController
Browse files Browse the repository at this point in the history
Resolves: #91820
Releases: master, 10.4
Change-Id: Ib556d58df7f1c8d4e62387eab2800da4c7e3d415
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65055
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Daniel Windloff
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Daniel Windloff
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
ohader authored and maddy2101 committed Aug 15, 2020
1 parent 16d2877 commit fe6b1bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -151,9 +151,8 @@ protected function renderContent(): void
$assigns['recordTooltip'] = BackendUtility::getRecordToolTip($elRow, $this->table);
$assigns['recordTitle'] = BackendUtility::getRecordTitle($this->table, $elRow, true);
// Make-copy checkbox (clicking this will reload the page with the GET var makeCopy set differently):
$onClick = 'window.location.href=' . GeneralUtility::quoteJSvalue(GeneralUtility::linkThisScript(['makeCopy' => !$this->makeCopy])) . ';';
$assigns['makeCopyChecked'] = $this->makeCopy ? ' checked="checked"' : '';
$assigns['makeCopyOnClick'] = $onClick;
$assigns['makeCopyUrl'] = GeneralUtility::linkThisScript(['makeCopy' => !$this->makeCopy]);
// IF the table is "pages":
if ((string)$this->table === 'pages') {
// Get page record (if accessible):
Expand Down
Expand Up @@ -2,8 +2,8 @@ <h1><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf
<div>
<span {recordTooltip}><core:iconForRecord table="{table}" row="{elRow}" />{recordTitle -> f:format.raw()}</span>
<div>
<input type="hidden" name="makeCopy" value="0" />
<input type="checkbox" name="makeCopy" id="makeCopy" value="1"{makeCopyChecked} onclick="{makeCopyOnClick}" />
<input type="checkbox" name="makeCopy" id="makeCopy" value="1" {makeCopyChecked}
data-global-event="change" data-action-navigate="$data" data-navigate-value="{makeCopyUrl}">
<label for="makeCopy" class="t3-label-valign-top"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:makeCopy" /></label>
</div>
</div>
Expand Down

0 comments on commit fe6b1bf

Please sign in to comment.