/** * constructPostProcess * * @param array $config * @param \TYPO3\CMS\Backend\Controller\BackendController $backendReference */ public function constructPostProcess($config, &$backendReference) { $lastPwChange = $GLOBALS['BE_USER']->user['tx_besecurepw_lastpwchange']; $lastLogin = $GLOBALS['BE_USER']->user['lastlogin']; // get configuration of a secure password $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_secure_pw']); $validUntilConfiguration = trim($extConf['validUntil']); $validUntil = 0; if ($validUntilConfiguration != '') { $validUntil = strtotime('- ' . $validUntilConfiguration); } if ($validUntilConfiguration != '' && ($lastPwChange == 0 || $lastPwChange < $validUntil) || $lastLogin == 0) { // let the popup pop up :) $generatedLabels = array('passwordReminderWindow_title' => $GLOBALS['LANG']->sL('LLL:EXT:be_secure_pw/Resources/Private/Language/locallang_reminder.xml:passwordReminderWindow_title'), 'passwordReminderWindow_message' => $GLOBALS['LANG']->sL('LLL:EXT:be_secure_pw/Resources/Private/Language/locallang_reminder.xml:passwordReminderWindow_message'), 'passwordReminderWindow_button_changePassword' => $GLOBALS['LANG']->sL('LLL:EXT:be_secure_pw/Resources/Private/Language/locallang_reminder.xml:passwordReminderWindow_button_changePassword'), 'passwordReminderWindow_button_postpone' => $GLOBALS['LANG']->sL('LLL:EXT:be_secure_pw/Resources/Private/Language/locallang_reminder.xml:passwordReminderWindow_button_postpone')); // Convert labels/settings back to UTF-8 since json_encode() only works with UTF-8: if ($GLOBALS['LANG']->charSet !== 'utf-8') { $GLOBALS['LANG']->csConvObj->convArray($generatedLabels, $GLOBALS['LANG']->charSet, 'utf-8'); } $labelsForJS = 'TYPO3.LLL.beSecurePw = ' . json_encode($generatedLabels) . ';'; $backendReference->addJavascript($labelsForJS); $version7 = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('7.0.0'); $currentVersion = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version); if ($currentVersion < $version7) { $javaScriptFile = 'passwordreminder.js'; } else { $javaScriptFile = 'passwordreminder7.js'; } $backendReference->addJavascriptFile($GLOBALS['BACK_PATH'] . '../' . ExtensionManagementUtility::siteRelPath('be_secure_pw') . 'Resources/Public/JavaScript/' . $javaScriptFile); } }
/** * Adds RSA-specific JavaScript * * @param array $configuration * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController * @return void */ public function addRsaJsLibraries(array $configuration, \TYPO3\CMS\Backend\Controller\BackendController $backendController) { $javascriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('rsaauth') . 'resources/'; $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js'); foreach ($files as $file) { $backendController->getPageRenderer()->addJsLibrary($file, $javascriptPath . $file); } }
/** * Add javascript to be loaded in backend * * @param array $configuration Configuration * @param BackendController $parent Parent controller * * @return void */ public function addJsFiles(array $configuration, &$parent) { $extensionPath = '../typo3conf/ext/commerce/'; /*$parent->addJavascriptFile( '../typo3conf/ext/commerce/Resources/Public/JavaScript/extjs/components/categorytree/javascript/tree.js' ); $parent->addJavascriptFile( '../typo3conf/ext/commerce/Resources/Public/JavaScript/extjs/components/ordertree/javascript/tree.js' );*/ $parent->addJavascriptFile($extensionPath . 'Resources/Public/JavaScript/extjs/components/systemdatanavframe/javascript/tree.js'); }
/** * Adds the neccessary css ot the backend * * @return void */ protected function addCssToBackend() { $this->backendReference->addCssFile('sysaction', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->EXTKEY) . 'toolbarmenu/tx_sysactions.css'); }
/** * @param array $params * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController */ public function addStyles(&$params, &$backendController) { $backendCssFile = ExtensionManagementUtility::extRelPath('bootstrap_package') . 'Resources/Public/Css/Backend/backend-v6.css'; $backendController->addCssFile('bootstrap_package', $backendCssFile); }
/** * Adds ImportExport-specific JavaScript * * @param array $configuration * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController * @return void */ public function addJavaScript(array $configuration, \TYPO3\CMS\Backend\Controller\BackendController $backendController) { $backendController->getPageRenderer()->addInlineSetting('ImportExport', 'moduleUrl', BackendUtility::getModuleUrl('xMOD_tximpexp')); }
/** * Adds the necessary JavaScript to the backend * * @return void */ protected function addJavascriptToBackend() { $this->backendReference->addJavascriptFile('sysext/backend/Resources/Public/JavaScript/clearcachemenu.js'); }
/** * @param array $params * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController */ public function addStyles(&$params, &$backendController) { $backendCssFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('moox_core') . 'Resources/Public/Stylesheets/backend.css'; $backendController->addCssFile('moox_core', $backendCssFile); }
/** * adds the necessary JavaScript to the backend * * @return void */ protected function addJavascriptToBackend() { $this->backendReference->addJavascriptFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/JavaScript/workspacemenu.js'); }
/** * @param array $hookConfiguration * @param \TYPO3\CMS\Backend\Controller\BackendController $backendController */ public function includeJavaScript($hookConfiguration, $backendController) { $backendController->addJavascriptFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('nxcondensedbelayout') . 'Resources/Public/Scripts/PositionService.min.js'); }
/** * Adds the necessary JavaScript to the backend * * @return void */ protected function addJavascriptToBackend() { $pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer(); $this->backendReference->addJavascriptFile('sysext/backend/Resources/Public/JavaScript/livesearch.js'); }