2 namespace TYPO3\CMS\Rsaauth\Form\Element;
35 $table = $this->data[
'tableName'];
36 $fieldName = $this->data[
'fieldName'];
37 $row = $this->data[
'databaseRow'];
38 $parameterArray = $this->data[
'parameterArray'];
40 $resultArray[
'requireJsModules'] = array(
'TYPO3/CMS/Rsaauth/RsaEncryptionModule');
42 $config = $parameterArray[
'fieldConf'][
'config'];
52 if ($config[
'readOnly']) {
53 $itemFormElValue = $parameterArray[
'itemFormElValue'];
55 $options[
'parameterArray'] = array(
59 'itemFormElValue' => $itemFormElValue,
61 $options[
'renderType'] =
'none';
62 return $this->nodeFactory->create($options)->render();
66 foreach ($evalList as $func) {
72 $attributes[
'type'] =
'password';
73 $attributes[
'value'] =
'********';
74 $attributes[
'autocomplete'] =
'off';
80 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'tce'][
'formevals'][$func])) {
81 if (class_exists($func)) {
83 if (method_exists($evalObj,
'deevaluateFieldValue')) {
85 'value' => $parameterArray[
'itemFormElValue']
87 $parameterArray[
'itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
93 $evalList = array_filter($evalList,
function ($value) {
94 return $value !==
'password';
98 'field' => $parameterArray[
'itemFormElName'],
99 'evalList' => implode(
',', $evalList),
100 'is_in' => trim($config[
'is_in']),
103 $classes[] =
'form-control';
104 $classes[] =
't3js-clearable';
105 $classes[] =
'hasDefaultValue';
109 $attributes[
'data-formengine-input-params'] = json_encode($paramsList);
110 $attributes[
'data-formengine-input-name'] = htmlspecialchars($parameterArray[
'itemFormElName']);
112 if (isset($config[
'max']) && (
int)$config[
'max'] > 0) {
113 $attributes[
'maxlength'] = (int)$config[
'max'];
115 if (!empty($classes)) {
116 $attributes[
'class'] = implode(
' ', $classes);
118 if (isset($config[
'max']) && (
int)$config[
'max'] > 0) {
119 $attributes[
'maxlength'] = (int)$config[
'max'];
123 if (!empty($config[
'placeholder'])) {
124 $attributes[
'placeholder'] = trim($config[
'placeholder']);
127 if (isset($config[
'autocomplete'])) {
128 $attributes[
'autocomplete'] = empty($config[
'autocomplete']) ?
'off' :
'on';
132 $attributeString =
'';
133 foreach ($attributes as $attributeName => $attributeValue) {
134 $attributeString .=
' ' . $attributeName .
'="' . htmlspecialchars($attributeValue) .
'"';
140 . $parameterArray[
'onFocus'] .
' />';
143 $html .=
'<input type="hidden" data-rsa-encryption="" id="' . $parameterArray[
'itemFormElID'] .
'_hidden" name="' . $parameterArray[
'itemFormElName'] .
'" value="' . htmlspecialchars($parameterArray[
'itemFormElValue']) .
'" />';
147 foreach ($evalList as $evalData) {
148 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'tce'][
'formevals'][$evalData])) {
149 if (class_exists($evalData)) {
151 if (method_exists($evalObj,
'returnFieldJS')) {
152 $resultArray[
'extJSCODE'] .= LF .
'TBE_EDITOR.customEvalFunctions[' .
GeneralUtility::quoteJSvalue($evalData) .
'] = function(value) {' . $evalObj->returnFieldJS() .
'}';
159 $html = $this->renderWizards(
166 $parameterArray[
'itemFormElName'],
172 $html =
'<div class="form-control-wrap"' . ($width ?
' style="max-width: ' . $width .
'px"' :
'') .
'>' . $html .
'</div>';
173 $resultArray[
'html'] = $html;