diff --git a/extension/qfq/qfq/AbstractBuildForm.php b/extension/qfq/qfq/AbstractBuildForm.php index de34a7047380998467f9172d79953d1d62ad9ec9..db716faffc3b665886d81325d7def77626d0bde2 100644 --- a/extension/qfq/qfq/AbstractBuildForm.php +++ b/extension/qfq/qfq/AbstractBuildForm.php @@ -2859,26 +2859,28 @@ abstract class AbstractBuildForm { $htmlImage = ''; if (!empty($formElement[FE_IMAGE_SOURCE])) { - if (is_readable($formElement[FE_IMAGE_SOURCE])) { + if (!is_readable($formElement[FE_IMAGE_SOURCE])) { throw new UserFormException("Error reading file: " . $formElement[FE_IMAGE_SOURCE], ERROR_IO_READ_FILE); } - $htmlImage = Support::wrapTag('<img src="' . $formElement[FE_IMAGE_SOURCE] . '" class="qfq-fabric-image">', '', false); } + $attributeImage = Support::doAttribute('id', 'qfq-fabric-image-1'); + $attributeImage .= Support::doAttribute('src', $formElement[FE_IMAGE_SOURCE]); + $attributeImage .= Support::doAttribute('class', 'qfq-fabric-image'); + $htmlImage = Support::wrapTag('<img ' . $attributeImage . '>', '', false); - $attributeFabric = ''; - $attributeFabric .= Support::doAttribute('id', 'fabric'); + $attributeFabric = Support::doAttribute('id', 'fabric'); $attributeFabric .= Support::doAttribute('data-cotrol-name', $formElement[FE_HTML_ID]); $attributeFabric .= Support::doAttribute('data-buttons', 'typo3conf/ext/qfq/Resources/Public/Json/fabric.buttons.json'); $attributeFabric .= Support::doAttribute('data-emojis', 'typo3conf/ext/qfq/Resources/Public/Json/qfq.emoji.json'); $attributeFabric .= $this->getAttributeFeMode($formElement[FE_MODE]); $htmlFabric = Support::wrapTag('<div ' . $attributeFabric . ' >', '', false); - $attributeInput = ''; - $attributeInput .= Support::doAttribute('id', $formElement[FE_HTML_ID]); + $attributeInput = Support::doAttribute('id', $formElement[FE_HTML_ID]); $attributeInput .= Support::doAttribute('name', $htmlFormElementName); $attributeInput .= Support::doAttribute('type', 'hidden'); + $htmlInput = Support::wrapTag('<input ' . $attributeInput . ' >', '', false); - $html = $htmlImage . $htmlFabric . $this->getHelpBlock() . $attributeInput; + $html = $htmlImage . $htmlFabric . $htmlInput . $this->getHelpBlock(); // $json = $this->getFormElementForJson($htmlFormElementName, $value, $formElement); diff --git a/extension/qfq/sql/formEditor.sql b/extension/qfq/sql/formEditor.sql index cb407146f55676b9e866a3b1a41565ca3d3d9f6d..6d36c83bb4d695b663e874b5eb28a216605a9812 100644 --- a/extension/qfq/sql/formEditor.sql +++ b/extension/qfq/sql/formEditor.sql @@ -77,7 +77,7 @@ CREATE TABLE IF NOT EXISTS `FormElement` ( `modeSql` TEXT NOT NULL, `class` ENUM('native', 'action', 'container') NOT NULL DEFAULT 'native', `type` ENUM('checkbox', 'date', 'datetime', 'dateJQW', 'datetimeJQW', 'extra', 'gridJQW', 'text', - 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', + 'editor', 'time', 'note', 'password', 'radio', 'select', 'subrecord', 'upload', 'annotate', 'fieldset', 'pill', 'templateGroup', 'beforeLoad', 'beforeSave', 'beforeInsert', 'beforeUpdate', 'beforeDelete', 'afterLoad', 'afterSave', 'afterInsert', 'afterUpdate', 'afterDelete', 'sendMail', 'paste') NOT NULL DEFAULT 'text', @@ -305,7 +305,7 @@ VALUES (2, 'type', 'Type', 'show', 'select', 'all', 'native', 190, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#class-native">native</a>, <a href="{{DOCUMENTATION_QFQ:Y}}#class-action">Action</a>, <a href="{{DOCUMENTATION_QFQ:Y}}#class-container">Container</a>', '', '', '', - 'itemList={{SELECT IF( "{{class:FRD0:alnumx}}"="native","checkbox,date,time,datetime,dateJQW,datetimeJQW,extra,gridJQW,text,editor,note,password,radio,select,subrecord,upload", IF("{{class:FRD0:alnumx}}"="action","beforeLoad,beforeSave,beforeInsert,beforeUpdate,beforeDelete,afterLoad,afterSave,afterInsert,afterUpdate,afterDelete,sendMail,paste", "fieldset,pill,templateGroup") ) }}', + 'itemList={{SELECT IF( "{{class:FRD0:alnumx}}"="native","checkbox,date,time,datetime,dateJQW,datetimeJQW,extra,gridJQW,text,editor,annotate,note,password,radio,select,subrecord,upload", IF("{{class:FRD0:alnumx}}"="action","beforeLoad,beforeSave,beforeInsert,beforeUpdate,beforeDelete,afterLoad,afterSave,afterInsert,afterUpdate,afterDelete,sendMail,paste", "fieldset,pill,templateGroup") ) }}', 100, '', 'yes', '', '', '', '', '', 'specialchar'), (2, 'subrecordOption', 'Subrecord Option', 'show', 'checkbox', 'all', 'native', 200, 0, 0, '<a href="{{DOCUMENTATION_QFQ:Y}}#subrecord-option">Info</a>', '', '', '', '', 100, '', 'yes', '', '', '', '{{ SELECT IF("{{type:FRE:alnumx}}"="subrecord" AND "{{class:FRE:alnumx}}"="native", "show", "hidden") }}', '', 'specialchar'),