Bug #14732 ยป class.tslib_content.php.labelfor.patch
class.tslib_content.php 2005-05-17 15:38:18.327788912 +0200 | ||
---|---|---|
$fieldname_hashArray = Array();
|
||
$cc = 0;
|
||
// Formname;
|
||
$formname = $GLOBALS['TSFE']->uniqueHash();
|
||
if (ctype_digit($formname{0})) { // must start with a letter
|
||
$formname = 'a'.$formname;
|
||
}
|
||
foreach($dataArr as $val) {
|
||
$cc++;
|
||
... | ... | |
// Accessibility: Set id = fieldname attribute:
|
||
if ($conf['accessibility']) {
|
||
$elementIdAttribute = ' id="'.$confData['fieldname'].'"';
|
||
$elementIdAttribute = ' id="'.$formname.'_'.md5($confData['fieldname']).'"';
|
||
} else {
|
||
$elementIdAttribute = '';
|
||
}
|
||
... | ... | |
// Field:
|
||
$fieldLabel = $confData['label'];
|
||
if ($conf['accessibility']) {
|
||
$fieldLabel = '<label for="'.htmlspecialchars($confData['fieldname']).'">'.$fieldLabel.'</label>';
|
||
$fieldLabel = '<label for="'.$formname.'_'.md5($confData['fieldname']).'">'.$fieldLabel.'</label>';
|
||
}
|
||
// Getting template code:
|
||
... | ... | |
}
|
||
}
|
||
// Formname;
|
||
$formname = $GLOBALS['TSFE']->uniqueHash();
|
||
if ($conf['REQ']) {
|
||
$validateForm=' onsubmit="return validateForm(\''.$formname.'\',\''.implode(',',$fieldlist).'\',\''.rawurlencode($conf['goodMess']).'\',\''.rawurlencode($conf['badMess']).'\',\''.rawurlencode($conf['emailMess']).'\')"';
|
||
$GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.validateform.js"></script>';
|