';
- // Label schreiben.
- $content .= '
';
+
+ if ($fieldConfig['type'] !== 'check') {
+ // Label schreiben.
+ $content .= '
';
+ }
switch ($fieldConfig['type']) {
@@ -2361,8 +2381,13 @@ public function showCheck($fieldName, $fieldConfig, $arrCurrentData, $disabledFi
} else {
$checked = ($arrCurrentData[$fieldName]) ? ' checked="checked"' : '';
+ $content .= '
';
+
+
}
return $content;
@@ -2647,6 +2672,32 @@ public function showCaptcha($fieldName, $valueCheck, $iItem) {
switch ($this->conf['captcha.']['use']) {
+ case 'powermail':
+ $viewHelperInvoker = GeneralUtility::makeInstance(\TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker::class);
+ $renderingContext = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContext::class);
+
+ $field = new Field();
+ $field->_setProperty('uid', $this->contentId);
+
+ $result = $viewHelperInvoker->invoke(
+ \In2code\Powermail\ViewHelpers\Validation\CaptchaViewHelper::class,
+ [
+ 'field' => $field,
+ 'class' => $this->conf['captcha.']['class'] ?: '',
+ ],
+ $renderingContext,
+ );
+ $captcha = $result;
+ if ($this->conf['captcha.']['reload_class']) {
+ $captcha .= '
';
+ if ($this->conf['captcha.']['reload_icon_path']) {
+ $captcha .= '
';
+ }
+ $captcha .= '';
+ }
+
+ break;
+
case 'captcha':
$captcha = '
) . 'captcha/captcha.php') . ')
';
@@ -2690,8 +2741,11 @@ public function showCaptcha($fieldName, $valueCheck, $iItem) {
$content .= '
';
$content .= '
';
+ if ($this->getLabel('captcha_info')) {
+ $content .= '
' . $this->getLabel('captcha_info') . '
';
+ }
$content .= '
' . $captcha . '
';
- $content .= '
';
+ $content .= '
';
// $content .= ($showInput) ? '
' : '';
$content .= $this->getErrorLabel($fieldName, $valueCheck);
$content .= '
';
@@ -2783,8 +2837,15 @@ public function getLabel($fieldName, $checkRequired = TRUE) {
return $label . (($checkRequired) ? $this->isRequiredField($fieldName) : '');
}
+ //Label aus der Flexform holen
+ $label = $this->getFlexformLabelByFieldName($fieldName);
+ if ($label) {
+ return $label;
+ }
+
// LanguageString ermitteln.
$languageString = $this->feUsersTca['columns'][$fieldName]['label'];
+
} else {
$languageString = $fieldName;
}
@@ -2809,6 +2870,19 @@ public function getLabel($fieldName, $checkRequired = TRUE) {
return $fieldName . (($checkRequired) ? $this->isRequiredField($fieldName) : '');
}
+ /**
+ * @param string $fieldName
+ * @return mixed|string
+ */
+ public function getFlexformLabelByFieldName(string $fieldName) {
+ foreach($this->conf['databasefields'] as $databaseField) {
+ if ($databaseField['field'] === $fieldName) {
+ return $databaseField['label'];
+ }
+ }
+ return '';
+ }
+
/**
* Ermittelt den Fehlertyp aus dem Feldnamen.
*
@@ -3011,7 +3085,7 @@ public function determineConfiguration() {
$flexConf = array();
// Extension Konfiguration ermitteln.
- $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
+ $this->extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$this->extKey];
// Alle Tabs der Flexformkonfiguration durchgehn.
if (is_array($this->cObj->data['pi_flexform']['data'])) {
diff --git a/pi1/de.locallang.xlf b/pi1/de.locallang.xlf
index be775be..dd1881c 100644
--- a/pi1/de.locallang.xlf
+++ b/pi1/de.locallang.xlf
@@ -293,4 +293,4 @@