[BUGFIX] Default login (without EXT:felogin) form should be removed
authorSusanne Moog <typo3@susannemoog.de>
Sun, 17 Apr 2011 16:19:43 +0000 (18:19 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Thu, 28 Apr 2011 16:55:13 +0000 (18:55 +0200)
When EXT:felogin is not installed, a FE login content element is available, that is
out of date and should not be used anymore.
As we ship felogin since 4.2 and install it by default, the default login form is
useless and confusing.

Thanks to naw.info for sponsoring 135 beers at the bug auction for this fix.

Change-Id: I765b3d391b06dac34550f46f19992c9cf9d1c5c7
Resolves: #22408
Reviewed-on: http://review.typo3.org/1369
Reviewed-by: Björn Pedersen
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
typo3/sysext/cms/ext_localconf.php
typo3/sysext/cms/tbl_tt_content.php
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/felogin/ext_localconf.php
typo3/sysext/felogin/ext_tables.php

index 823d968..3e60ebf 100644 (file)
@@ -142,17 +142,8 @@ Contact me: | tv=check | 1
                                CType = search
                        }
                }
-               login {
-                       icon = gfx/c_wiz/login_form.gif
-                       title = LLL:EXT:cms/layout/locallang_db_new_content_el.xml:forms_login_title
-                       description = LLL:EXT:cms/layout/locallang_db_new_content_el.xml:forms_login_description
-                       tt_content_defValues {
-                               CType = login
-                       }
-               }
-
        }
-       forms.show = mailform,search,login
+       forms.show = mailform,search
 
        plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xml:plugins
        plugins.elements {
index fd153b3..aae25b6 100755 (executable)
@@ -109,11 +109,6 @@ $TCA['tt_content'] = array(
                                                'i/tt_content_search.gif',
                                        ),
                                        array(
-                                               'LLL:EXT:cms/locallang_ttc.xml:CType.I.10',
-                                               'login',
-                                               'i/tt_content_login.gif',
-                                       ),
-                                       array(
                                                'LLL:EXT:cms/locallang_ttc.xml:CType.div.special',
                                                '--div--',
                                        ),
@@ -1853,19 +1848,6 @@ $TCA['tt_content'] = array(
                                        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.searchform;searchform,
                                --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended',
                ),
-               'login' =>              array(
-                       'showitem' =>
-                                       '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,
-                                       --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.header;header,
-                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,
-                                       --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.visibility;visibility,
-                                       --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.access;access,
-                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.appearance,
-                                       --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.frames;frames,
-                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.behaviour,
-                                       --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.loginform;loginform,
-                               --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended',
-               ),
                'shortcut' =>   array(
                        'showitem' =>
                                        '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,
@@ -2032,10 +2014,6 @@ $TCA['tt_content'] = array(
                        'showitem' => 'pages;LLL:EXT:cms/locallang_ttc.xml:pages.ALT.searchform',
                        'canNotCollapse' => 1,
                ),
-               'loginform' => array(
-                       'showitem' => 'pages;LLL:EXT:cms/locallang_ttc.xml:pages.ALT.loginform',
-                       'canNotCollapse' => 1,
-               ),
                'menu' => array(
                        'showitem' => 'menu_type;LLL:EXT:cms/locallang_ttc.xml:menu_type_formlabel, --linebreak--, pages;LLL:EXT:cms/locallang_ttc.xml:pages.ALT.menu_formlabel',
                        'canNotCollapse' => 1,
index fbcbc2c..d98b926 100644 (file)
@@ -1277,60 +1277,6 @@ tt_content.search.30 {
        }
 }
 
-
-# ******************
-# CType: login
-# ******************
-tt_content.login < tt_content.mailform
-tt_content.login.10 = < lib.stdheader
-tt_content.login.20 {
-       goodMess = {$styles.content.loginform.goodMess}
-       redirect >
-       recipient >
-       data >
-       dataArray {
-               10.label.data = LLL:EXT:css_styled_content/pi1/locallang.xml:login.username
-               10.type = *user=input
-               20.label.data = LLL:EXT:css_styled_content/pi1/locallang.xml:login.password
-               20.type = *pass=password
-               30.type = logintype=hidden
-               30.value = login
-               40.type = submit=submit
-               40.value.data = LLL:EXT:css_styled_content/pi1/locallang.xml:login.login
-       }
-       type.field = pages
-       type.listNum = 0
-       target = {$styles.content.loginform.target}
-       locationData = 0
-       hiddenFields.pid = TEXT
-       hiddenFields.pid {
-               value = {$styles.content.loginform.pid}
-               override.field = pages
-               override.listNum = 1
-       }
-
-       stdWrap.wrap = <div class="csc-loginform"> | </div>
-       stdWrap {
-               editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xml:eIcon.login
-
-               prefixComment = 2 | Login/Logout form:
-       }
-}
-[loginUser = *]
-tt_content.login.20 {
-       dataArray >
-       dataArray {
-               10.label.data = LLL:EXT:css_styled_content/pi1/locallang.xml:login.username
-               10.label.wrap = |&nbsp;<!--###USERNAME###-->
-               30.type = logintype=hidden
-               30.value = logout
-               40.type = submit=submit
-               40.value.data = LLL:EXT:css_styled_content/pi1/locallang.xml:login.logout
-       }
-}
-[global]
-
-
 # ******************
 # CType: splash
 # ******************
index e9b8f64..d945336 100644 (file)
@@ -13,17 +13,32 @@ plugin.tx_felogin_pi1 {
 # Setting '.$_EXTKEY.' plugin TypoScript
 '.$pluginContent);
 
-$addLine = trim('
+$addLine = '
 tt_content.login = COA
 tt_content.login {
        10 = < lib.stdheader
        20 >
        20 = < plugin.tx_felogin_pi1
 }
-');
+';
 
 t3lib_extMgm::addTypoScript($_EXTKEY,'setup','# Setting '.$_EXTKEY.' plugin TypoScript'.$addLine.'',43);
 
+t3lib_extMgm::addPageTSConfig('
+mod.wizards.newContentElement.wizardItems.forms {
+       elements {
+               login {
+                       icon = gfx/c_wiz/login_form.gif
+                       title = LLL:EXT:cms/layout/locallang_db_new_content_el.xml:forms_login_title
+                       description = LLL:EXT:cms/layout/locallang_db_new_content_el.xml:forms_login_description
+                       tt_content_defValues {
+                               CType = login
+                       }
+               }
+       }
+       show :=addToList(login)
+}
+');
 
 //activate support for kb_md5fepw
 if (t3lib_extMgm::isLoaded('kb_md5fepw') && (TYPO3_MODE == 'FE')) {
index 5c71af7..3c2fe16 100644 (file)
@@ -9,9 +9,18 @@ if(t3lib_div::int_from_ver(TYPO3_version) >= 4002000)
 else
        t3lib_extMgm::addPiFlexFormValue('default','FILE:EXT:'.$_EXTKEY.'/flexform.xml');
 
+t3lib_extMgm::addTcaSelectItem(
+       'tt_content',
+       'CType',
+       array(
+               'LLL:EXT:cms/locallang_ttc.xml:CType.I.10',
+               'login',
+               'i/tt_content_login.gif',
+       ),
+       'mailform',
+       'after'
+);
 
-
-       #replace login
 $TCA['tt_content']['types']['login']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xml:palette.general;general,
                                                                                                        --palette--;LLL:EXT:cms/locallang_ttc.xml:palette.header;header,
                                                                                                        --div--;LLL:EXT:cms/locallang_ttc.xml:tabs.plugin,