Add plugin to embed BusPro password change form

This commit is contained in:
Björn Fromme
2018-10-29 09:27:02 +01:00
parent 15c2a87d68
commit 1afbc9add0
4 changed files with 80 additions and 0 deletions
@@ -0,0 +1,45 @@
<?php
namespace EP\EpProducts\Controller;
/***************************************************************
*
* Copyright notice
*
* (c) 2018 Björn Fromme <[email protected]>, dreipunktnull
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
class PasswordController extends ActionController
{
public function indexAction()
{
// Conflicting argument 'id' needs to be replaced with 'bpn_id'!
$this->view->assignMultiple([
'bpnDbPassword' => GeneralUtility::_GET('db_passwort'),
'bpnId' => GeneralUtility::_GET('bpn_id'),
]);
}
}
@@ -149,6 +149,12 @@ call_user_func(function () {
'Merkliste'
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'EP.EpProducts',
'password',
'Passwort BusPro'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['epproducts_product_detail'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'epproducts_product_detail', 'FILE:EXT:ep_products/Configuration/FlexForms/flexform_product_detail.xml'
@@ -308,6 +308,17 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\EP\EpProducts\T
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'EP.' . $_EXTKEY,
'password',
[
'Password' => 'index',
],
[
'Password' => '',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'EP.' . $_EXTKEY,
'ajax',
@@ -0,0 +1,18 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default"/>
<f:section name="Main">
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-6">
<iframe class="passwordform" scrolling="no" frameborder="none"
src="https://bpn.ep-reisen.de/buspronet/maske_konto_pw.php?db_passwort={bpnDbPassword}&amp;id={bpnId}&amp;templatezusatz=_base"
width="100%" height="300"></iframe>
</div>
</div>
</div>
</f:section>
</html>