Project

General

Profile

Actions

Bug #19158

closed

Wrong alert text in Constant editor

Added by Dmitry Dulepov over 16 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2008-07-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Try to edit template reference in tt_news. It will ask you this: "This will make a copy of the current file, '%s'. Do you really want that?". This looks like a question but in fact it is not. The box has only "OK" button (see screenshot), so the whole thing is confusing.

This is not tt_news bug! Problem is in t3lib/class.t3lib_tsparser_ext.php, like 1314:

if ($copyFile && @is_file($copyFile)) {
    $p_field.='<img src="clear.gif" width="20" height="1" alt="" /><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/clip_copy.gif','width="12" height="12"').' border="0" alt="" /><input type="checkbox" name="_copyResource['.$params['name'].']" value="'.htmlspecialchars($copyFile).'" onClick="uFormUrl('.$aname.');if (this.checked) {alert(unescape(\''.rawurlencode(sprintf("This will make a copy of the current file, '%s'. Do you really want that?",$params['value'])).'\'));}" />';
}

(issue imported from #M9060)


Files

constant-editor-alert.png (14.4 KB) constant-editor-alert.png Administrator Admin, 2008-07-28 10:12
9060.diff (2.11 KB) 9060.diff Administrator Admin, 2008-07-28 10:36
9060_v2.diff (2.13 KB) 9060_v2.diff Administrator Admin, 2008-08-05 12:20
Actions #1

Updated by Dmitry Dulepov over 16 years ago

The attached patch converts "alert" to "confirm" and resets checkbox if user did not agree.

Actions #2

Updated by Dmitry Dulepov over 16 years ago

Attached updated patch as per Masi's suggestions

Actions

Also available in: Atom PDF