Index: typo3/wizard_forms.php =================================================================== --- typo3/wizard_forms.php (revision 4400) +++ typo3/wizard_forms.php (working copy) @@ -458,7 +458,13 @@ // Special parts: if ($this->special=='formtype_mail' && t3lib_div::inList('formtype_mail,subject,html_enabled',$confData['fieldname'])) { - $specParts[$confData['fieldname']] = $confData['default']; + if ($confData['fieldname']=='formtype_mail' && $confData['type'] == 'submit') { + $specParts[$confData['fieldname'].'_submit'] = $confData['default']; + } elseif ($confData['fieldname']=='formtype_mail' && $confData['type'] == 'reset') { + $specParts[$confData['fieldname'].'_reset'] = $confData['default']; + } else { + $specParts[$confData['fieldname']] = $confData['default']; + } } else { // Render title/field preview COLUMN @@ -471,7 +477,7 @@ // Field type selector: $opt=array(); $opt[]=''; - $types = explode(',','input,textarea,select,check,radio,password,file,hidden,submit,property,label'); + $types = explode(',','input,textarea,select,check,checkboxes,radio,password,file,hidden,submit,property,label'); foreach($types as $t) { $opt[]=' '; @@ -541,7 +547,7 @@ } // Default data - if ($confData['type']=='select' || $confData['type']=='radio') { + if ($confData['type']=='select' || $confData['type']=='radio' || $confData['type']=='checkboxes') { $temp_cells[$LANG->getLL('forms_options')]=''; } elseif ($confData['type']=='check') { $temp_cells[$LANG->getLL('forms_checked')]=''; @@ -617,9 +623,20 @@ - doc->formWidth(15).' name="FORMCFG[c]['.(1000*2).'][default]" value="'.htmlspecialchars($specParts['formtype_mail']).'" /> + doc->formWidth(15).' name="FORMCFG[c]['.(1000*2).'][default]" value="'.htmlspecialchars($specParts['formtype_mail_submit']).'" /> '; + $tRows[]=' + +   +   + '.$LANG->getLL('forms_eform_formtype_reset',1).': + + + + doc->formWidth(15).' name="FORMCFG[c]['.(2001).'][default]" value="'.htmlspecialchars($specParts['formtype_mail_reset']).'" /> + + '; // "Send HTML mail": $tRows[]=' @@ -800,7 +817,7 @@ $thisLine[1]=str_replace('|','',$thisLine[1]); // Default: - if ($vv['type']=='select' || $vv['type']=='radio') { + if ($vv['type']=='select' || $vv['type']=='radio' || $vv['type']=='checkboxes') { $thisLine[2]=str_replace(chr(10),', ',str_replace(',','',$vv['options'])); } elseif ($vv['type']=='check') { if ($vv['default']) $thisLine[2]=1; @@ -871,6 +888,7 @@ switch((string)$confData['type']) { case 'select': case 'radio': + case 'checkboxes': $confData['default'] = implode(chr(10),t3lib_div::trimExplode(',',$parts[2])); break; default: Index: typo3/sysext/lang/locallang_wizards.xml =================================================================== --- typo3/sysext/lang/locallang_wizards.xml (revision 4400) +++ typo3/sysext/lang/locallang_wizards.xml (working copy) @@ -41,6 +41,7 @@ + @@ -66,6 +67,7 @@ + Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 4400) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -1826,7 +1826,7 @@ // Accessibility: Set id = fieldname attribute: if ($conf['accessibility'] || $xhtmlStrict) { - $elementIdAttribute = ' id="'.$prefix.$fName.'"'; + $elementIdAttribute = ' id="'.$prefix.$fName.'_'.$cc.'"'; } else { $elementIdAttribute = ''; } @@ -1881,6 +1881,55 @@ $fieldCode=sprintf('', 1, $confData['fieldname'], $elementIdAttribute, $checked, $addParams); break; + case 'checkboxes': + $option=''; + if ($conf['accessibility']) { + $option.=''.$confData['label'].''; + } + $valueParts = explode(',',$parts[2]); + $items=array(); // Where the items will be + $default=''; + $pCount = count($valueParts); + for($a=0;$a<$pCount;$a++) { + $valueParts[$a]=trim($valueParts[$a]); + if (substr($valueParts[$a],0,1)=='*') { + $sel='checked'; + $valueParts[$a] = substr($valueParts[$a],1); + } else { + sel=''; + } + // Get value/label + $subParts=explode('=',$valueParts[$a]); + $subParts[1] = (isset($subParts[1])?trim($subParts[1]):trim($subParts[0])); // Sets the value + $items[] = $subParts; // Adds the value/label pair to the items-array + if ($sel) { + // Sets the default value if value/label pair is marked as default. + $default=$subParts[1]; + } + } + // alternative default value: + $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], $default); + // Create the checkboxes: + $iCount = count($items); + for($a=0;$a<$iCount;$a++) { + $checkboxesId = $prefix.$fName.$this->cleanFormName($items[$a][0]); + if ($conf['accessibility']) { + $checkboxesLabelIdAttribute = ' id="'.$checkboxesId.'"'; + } else { + $checkboxesLabelIdAttribute = ''; + } + $option .= ''; + if ($conf['accessibility']) { + $option .= ''; + } else { + $option .= $this->stdWrap(trim($items[$a][0]), $conf['checkboxesWrap.']); + } + } + if ($conf['accessibility']) { + $option.=''; + } + $fieldCode = $option; + break; case 'select': $option=''; $valueParts = explode(',',$parts[2]); @@ -2007,17 +2056,31 @@ $image = ''; } if ($image) { - $fieldCode=sprintf('', - $confData['fieldname'], $elementIdAttribute, $image, $params); + $fieldCode=sprintf('', + $confData['fieldname'], $image, $params); } else { - $fieldCode=sprintf('', - $confData['fieldname'], $elementIdAttribute, t3lib_div::deHSCentities(htmlspecialchars($value)), $addParams); + $fieldCode=sprintf('', + $confData['fieldname'], t3lib_div::deHSCentities(htmlspecialchars($value)), $addParams); } break; case 'reset': $value=trim($parts[2]); - $fieldCode=sprintf('', - $confData['fieldname'], $elementIdAttribute, t3lib_div::deHSCentities(htmlspecialchars($value)), $addParams); + if ($conf['image_reset.']) { + $this->data[$this->currentValKey] = $value; + $image = $this->IMG_RESOURCE($conf['image_reset.']); + $params = $conf['image_reset.']['params'] ? ' '.$conf['image_reset.']['params'] : ''; + $params.= $this->getAltParam($conf['image_reset.'], false); + $params.= $addParams; + } else { + $image = ''; + } + if ($image) { + $fieldCode=sprintf('%s', + t3lib_div::deHSCentities(htmlspecialchars($value)), $confData['fieldname'], t3lib_div::deHSCentities(htmlspecialchars($value)), $image, $params); + } else { + $fieldCode=sprintf('', + $confData['fieldname'], t3lib_div::deHSCentities(htmlspecialchars($value)), $addParams); + } break; case 'label': $fieldCode = nl2br(htmlspecialchars(trim($parts[2]))); @@ -2063,7 +2126,7 @@ // Field: $fieldLabel = $confData['label']; if ($conf['accessibility'] && trim($fieldLabel) && !preg_match('/^(label|hidden|comment)$/',$confData['type'])) { - $fieldLabel = ''; + $fieldLabel = ''; } // Getting template code: @@ -2089,9 +2152,18 @@ if ($confData['type']=='radio' && $conf['RADIO.']['layout']) { $result = $conf['RADIO.']['layout']; } + if ($confData['type']=='checkboxes' && $conf['CHECKBOXES.']['layout']) { + $result = $conf['CHECKBOXES.']['layout']; + } if ($confData['type']=='label' && $conf['LABEL.']['layout']) { $result = $conf['LABEL.']['layout']; } + if ($confData['type']=='submit' && $conf['SUBMIT.']['layout']) { + $result = $conf['SUBMIT.']['layout']; + } + if ($confData['type']=='reset' && $conf['RESET.']['layout']) { + $result = $conf['RESET.']['layout']; + } $result = str_replace('###FIELD###',$fieldCode,$result); $result = str_replace('###LABEL###',$labelCode,$result); $result = str_replace('###COMMENT###',$commentCode,$result); //RTF @@ -2099,6 +2171,7 @@ } } } + if ($conf['stdWrap.']) { $content = $this->stdWrap($content, $conf['stdWrap.']); } @@ -7244,7 +7317,12 @@ $types = t3lib_div::trimExplode(',',strtolower($conf['allow']),1); $allow = array_flip($types); - $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page); + if ($conf['permissionCheckOnPid'] == 'pid' || $permsCheckPid = intval($conf['permissionCheckOnPid'])) { + $editpanelPermissionPage = ($conf['permissionCheckOnPid'] == 'pid') ? $GLOBALS['TSFE']->sys_page->getPage_noCheck($dataArr['pid']) : $GLOBALS['TSFE']->sys_page->getPage_noCheck($permsCheckPid); + } else { + $editpanelPermissionPage = $GLOBALS['TSFE']->page; + } + $perms = $GLOBALS['BE_USER']->calcPerms($editpanelPermissionPage); if ($table=='pages') { if (count($GLOBALS['TSFE']->config['rootLine'])==1) {unset($allow['move']); unset($allow['hide']); unset($allow['delete']);} // rootpage! if (!($perms&2)) {unset($allow['edit']);unset($allow['move']);unset($allow['hide']);} Index: typo3/sysext/css_styled_content/static/setup.txt =================================================================== --- typo3/sysext/css_styled_content/static/setup.txt (revision 4400) +++ typo3/sysext/css_styled_content/static/setup.txt (working copy) @@ -1204,6 +1204,7 @@ layout =
###LABEL### ###FIELD###
COMMENT.layout =
###LABEL###
RADIO.layout =
###LABEL### ###FIELD###
+ CHECKBOXES.layout =
###LABEL### ###FIELD###
LABEL.layout =
###LABEL### ###FIELD###
labelWrap.wrap = | commentWrap.wrap = |