[BUGFIX] IRRE bidirectional relation not highlighted 35/27235/5
authorBenjamin Kott <info@bk2k.info>
Sat, 1 Feb 2014 15:04:56 +0000 (16:04 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 24 Mar 2014 13:07:17 +0000 (14:07 +0100)
Currently the user is not able to recognize that he is working on
record relations. These records may be used in several places in
the system and the user should be aware of that specific behaviour.

In previous versions of TYPO3 there has been a wrapper which
highlighted input fields, but had no explanation. This was removed
later. To restore the functionality and make it understandable to the
user why he should edit the fields wisely, the wrapper has been replaced
by a flash message. This explains to the user what happens when the
record gets changed.

Resolves: #55553
Releases: 6.2
Change-Id: Ic8a41cdb251cfc8d0134e2b53927ff71ddd5e594
Reviewed-on: https://review.typo3.org/27235
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/lang/locallang_core.xlf
typo3/sysext/t3skin/Resources/Public/Css/visual/element_tceforms.css

index eb9a981..cd6cc39 100644 (file)
@@ -30,6 +30,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Database\RelationHandler;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 
@@ -767,9 +768,11 @@ class InlineElement {
                                $comboRecord = $this->getNewRecord($this->inlineFirstPid, $comboConfig['foreign_table']);
                                $isNewRecord = TRUE;
                        }
+                       $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:warning.inline_use_combination'), '', FlashMessage::WARNING);
+                       $out = $flashMessage->render();
                        // Get the TCEforms interpretation of the TCA of the child table
-                       $out = $this->renderMainFields($comboConfig['foreign_table'], $comboRecord);
-                       $out = $this->wrapFormsSection($out, array(), array('class' => 'wrapperAttention'));
+                       $out .= $this->renderMainFields($comboConfig['foreign_table'], $comboRecord);
+                       $out = $this->wrapFormsSection($out, array(), array());
                        // If this is a new record, add a pid value to store this record and the pointer value for the intermediate table
                        if ($isNewRecord) {
                                $comboFormFieldName = $this->prependFormFieldNames . '[' . $comboConfig['foreign_table'] . '][' . $comboRecord['uid'] . '][pid]';
index defa35a..d45aed0 100644 (file)
@@ -955,6 +955,9 @@ Would you like to save now in order to refresh the display?</source>
                        <trans-unit id="warning.message.storage_is_no_public" xml:space="preserve">
                                <source>The storage has been marked to be "publicly available" but is not detected as such by the driver. The setting has been reverted.</source>
                        </trans-unit>
+                       <trans-unit id="warning.inline_use_combination" xml:space="preserve">
+                               <source>This record will be modified globally.</source>
+                       </trans-unit>
                        <trans-unit id="error.formProtection.tokenInvalid" xml:space="preserve">
                                <source>Validating the security token of this form has failed. Please reload the form and submit it again.</source>
                        </trans-unit>
index 4020e20..f9de2b9 100644 (file)
@@ -411,6 +411,10 @@ TCEforms Inline-Relational-Record-Editing
        border-top: 1px solid #aaaaaa;
 }
 
+.t3-form-field-record-inline .typo3-message {
+       margin-bottom: 1.5em;
+}
+
 .typo3-TCEforms .t3-form-field-container-inline .wrapperTable,
 .typo3-TCEforms .t3-form-field-container-inline .wrapperTable1,
 .typo3-TCEforms .t3-form-field-container-inline .wrapperTable2,