Commit 33b64fbe authored by Kevin Ditscheid's avatar Kevin Ditscheid

[BUGFIX] Loads of fixes to the lfeditor backend

parent 973b19e3
......@@ -77,7 +77,7 @@ class BackupService extends AbstractService {
$langFile = '';
if (!is_array($infos)) {
// build language file and extension path
if ($mode == 'xll') {
if ($mode == 'xlf') {
try {
$typo3RelFile = $confService->getFileObj()->getVar('typo3RelFile');
$typo3AbsFile = Typo3Lib::transTypo3File($typo3RelFile, TRUE);
......
......@@ -470,6 +470,12 @@ class FileBackupService extends FileService {
$backupName = GeneralUtility::shortMD5(md5($xml)) . '.bak';
$this->setVar(array('relFile' => $backupName));
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathSite = PATH_site;
} else {
$pathSite = Environment::getPublicPath() . '/';
}
// get new meta information
$metaArray = $this->getMetaInfos(3);
$metaArray[$this->relFile]['createdAt'] = time();
......
......@@ -104,7 +104,7 @@ class FileOverrideService extends FileBaseXMLService {
*/
protected function mergeOriginalWidthOverrideLangData() {
foreach ($this->originalFileObject->getLocalLang() as $lang => $langData) {
if (empty($langData)) {
if (!is_array($langData)) {
continue;
}
......
......@@ -26,9 +26,6 @@ namespace SGalinski\Lfeditor\Utility;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use Exception;
use RuntimeException;
use TYPO3\CMS\Core\Configuration\ConfigurationManager;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
......@@ -37,12 +34,24 @@ use TYPO3\CMS\Core\Utility\VersionNumberUtility;
* includes special typo3 methods
*/
class Typo3Lib {
/**
* @deprecated since version 5, will be removed as soon as TYPO3 8 support is dropped
*/
const PATH_LOCAL_EXT = 'typo3conf/ext/';
/**
* @deprecated since version 5, will be removed as soon as TYPO3 8 support is dropped
*/
const PATH_GLOBAL_EXT = 'typo3/ext/';
/**
* @deprecated since version 5, will be removed as soon as TYPO3 8 support is dropped
*/
const PATH_SYS_EXT = 'typo3/sysext/';
/**
* @deprecated since version 5, will be removed as soon as TYPO3 8 support is dropped
*/
const PATH_L10N = 'typo3conf/l10n/';
/**
......@@ -52,19 +61,40 @@ class Typo3Lib {
* @return string
*/
public static function checkFileLocation($file) {
if (strpos($file, self::PATH_LOCAL_EXT) !== FALSE) {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathExtensions = self::PATH_LOCAL_EXT;
} else {
$pathExtensions = Environment::getExtensionsPath() . '/';
}
if (strpos($file, $pathExtensions) !== FALSE) {
return 'local';
}
if (strpos($file, self::PATH_GLOBAL_EXT) !== FALSE) {
trigger_error(
'The typo3/ext folder does not exist anymore, so this functionality will be dropped',
E_USER_DEPRECATED
);
return 'global';
}
if (strpos($file, self::PATH_SYS_EXT) !== FALSE) {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathSysExtensions = self::PATH_SYS_EXT;
} else {
$pathSysExtensions = Environment::getFrameworkBasePath() . '/';
}
if (strpos($file, $pathSysExtensions) !== FALSE) {
return 'system';
}
if (strpos($file, self::PATH_L10N) !== FALSE) {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathL10N = self::PATH_L10N;
} else {
$pathL10N = Environment::getLabelsPath() . '/';
}
if (strpos($file, $pathL10N) !== FALSE) {
return 'l10n';
}
......@@ -74,51 +104,36 @@ class Typo3Lib {
/**
* converts an absolute or relative typo3 style (EXT:) file path
*
* @throws Exception raised, if the conversion fails
* @param string $file absolute file or an typo3 relative file (EXT:)
* @param boolean $mode generate to relative(false) or absolute file
* @param boolean $absolute generate to relative(false) or absolute file
* @return string converted file path
*
* @throws \Exception Conversion of file path failed
*/
public static function transTypo3File($file, $mode) {
$extType['local'] = self::PATH_LOCAL_EXT;
$extType['global'] = self::PATH_GLOBAL_EXT;
$extType['system'] = self::PATH_SYS_EXT;
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$pathSite = PATH_site;
} else {
$pathSite = Environment::getPublicPath() . '/';
}
// relative to absolute
if ($mode) {
if (strpos($file, 'EXT:') === FALSE) {
throw new RuntimeException('no typo3 relative path "' . $file . '"');
}
$cleanFile = SgLib::trimPath('EXT:', $file);
/** @var string[] $extType */
foreach ($extType as $type) {
$path = self::fixFilePath($pathSite . '/' . $type . '/' . $cleanFile);
if (is_dir(\dirname($path))) {
return $path;
public static function transTypo3File($file, $absolute) {
$path = GeneralUtility::getFileAbsFileName($file);
if (!$absolute) {
$fileLocation = self::checkFileLocation($path);
if ($fileLocation === 'local') {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathToRemove = PATH_site . self::PATH_LOCAL_EXT;
} else {
$pathToRemove = Environment::getExtensionsPath() . '/';
}
} elseif ($fileLocation === 'system') {
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.5.0', '<')) {
$pathToRemove = PATH_site . self::PATH_SYS_EXT;
} else {
$pathToRemove = Environment::getFrameworkBasePath() . '/';
}
} else {
throw new \Exception('Can not convert absolute file "' . $file . '"');
}
throw new RuntimeException('cant convert typo3 relative file "' . $file . '"');
}
// absolute to relative
/** @var string[] $extType */
foreach ($extType as $type) {
if (strpos($file, $type) === FALSE) {
continue;
}
return 'EXT:' . SgLib::trimPath($type, SgLib::trimPath($pathSite, $file));
$path = 'EXT:' . SgLib::trimPath($pathToRemove, $path);
}
throw new RuntimeException('cant convert absolute file "' . $file . '"');
return $path;
}
/**
......
......@@ -94,7 +94,7 @@ class ActionMenuViewHelper extends AbstractTagBasedViewHelper {
$options .= $childNode->evaluate($this->renderingContext);
}
$this->tag->setContent($options);
return '<div class="docheader-funcmenu">' . $this->tag->render() . '</div>';
return $this->tag->render();
}
/**
......
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
<lfe:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/FormUtility.js')}" />
<lfe:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/Lfeditor.js')}" />
<lfe:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'Scripts/textareaResize.js')}" />
<lfe:addJavaScriptFile javaScriptFile="{f:uri.resource(path: 'JavaScript/textareaResize.js')}" />
<lfe:inlineLanguageLabels labels="function.langfile.confirmCancel" />
<lfe:addCssFile cssFile="{f:uri.resource(path: 'StyleSheets/Lfeditor.css')}" />
<f:be.container>
<div class="typo3-fullDoc">
<div id="typo3-docheader">
<div class="typo3-docheader-functions">
<f:be.menus.actionMenu>
<f:be.menus.actionMenuItem label="{f:translate(key:'function.general.general')}"
controller="General"
action="general" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.langfile.edit')}"
controller="EditFile"
action="editFile"
arguments="{buttonType: 0}" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.edit.edit')}"
controller="EditConstant"
action="editConstant" />
<f:if condition="{defaultLanguagePermission}">
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.add.add')}"
controller="AddConstant"
action="addConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.delete.delete')}"
controller="DeleteConstant"
action="deleteConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.rename.rename')}"
controller="RenameConstant"
action="renameConstant" />
</f:if>
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.search.search')}"
controller="SearchConstant"
action="searchConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.treeview.treeview')}"
controller="ViewTree"
action="viewTree" />
<f:if condition="{editingMode} == 'extension'">
<f:be.menus.actionMenuItem label="{f:translate(key:'function.backupMgr.backupMgr')}"
controller="ManageBackups"
action="manageBackups" />
</f:if>
</f:be.menus.actionMenu>
<f:if condition="{canChangeEditingModes}">
<f:be.container includeRequireJsModules="{
0: 'TYPO3/CMS/Lfeditor/Lfeditor'
}">
<div class="module" data-module-id="" data-module-name="">
<div class="module-docheader t3js-module-docheader">
<div class="module-docheader-bar module-docheader-bar-navigation t3js-module-docheader-bar t3js-module-docheader-bar-navigation">
<div class="module-docheader-bar-column-left">
<f:be.menus.actionMenu>
<f:for each="{editingModeOptions}" key="editingModeOption" as="editingModeLabel">
<f:if condition="{editingMode} == {editingModeOption}">
<f:then>
<f:be.menus.actionMenuItem label="{editingModeLabel}"
controller="General"
action="switchEditingMode"
arguments="{editingMode: editingModeOption}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<f:be.menus.actionMenuItem label="{editingModeLabel}"
controller="General"
action="switchEditingMode"
arguments="{editingMode: editingModeOption}" />
</f:else>
</f:if>
</f:for>
<f:be.menus.actionMenuItem label="{f:translate(key:'function.general.general')}"
controller="General"
action="general" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.langfile.edit')}"
controller="EditFile"
action="editFile"
arguments="{buttonType: 0}" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.edit.edit')}"
controller="EditConstant"
action="editConstant" />
<f:if condition="{defaultLanguagePermission}">
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.add.add')}"
controller="AddConstant"
action="addConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.delete.delete')}"
controller="DeleteConstant"
action="deleteConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.rename.rename')}"
controller="RenameConstant"
action="renameConstant" />
</f:if>
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.search.search')}"
controller="SearchConstant"
action="searchConstant" />
<f:be.menus.actionMenuItem label="{f:translate(key:'function.const.treeview.treeview')}"
controller="ViewTree"
action="viewTree" />
<f:if condition="{editingMode} == 'extension'">
<f:be.menus.actionMenuItem label="{f:translate(key:'function.backupMgr.backupMgr')}"
controller="ManageBackups"
action="manageBackups" />
</f:if>
</f:be.menus.actionMenu>
</f:if>
<f:if condition="{canChangeEditingModes}">
<f:be.menus.actionMenu>
<f:for each="{editingModeOptions}" key="editingModeOption" as="editingModeLabel">
<f:if condition="{editingMode} == {editingModeOption}">
<f:then>
<f:be.menus.actionMenuItem label="{editingModeLabel}"
controller="General"
action="switchEditingMode"
arguments="{editingMode: editingModeOption}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<f:be.menus.actionMenuItem label="{editingModeLabel}"
controller="General"
action="switchEditingMode"
arguments="{editingMode: editingModeOption}" />
</f:else>
</f:if>
</f:for>
</f:be.menus.actionMenu>
</f:if>
</div>
</div>
</div>
<div id="typo3-docbody">
<div id="typo3-inner-docbody">
<f:render section="selectItems" />
<f:flashMessages />
<f:render section="main" />
<div class="module-docheader-bar module-docheader-bar-buttons t3js-module-docheader-bar t3js-module-docheader-bar-buttons">
<div class="module-docheader-bar-column-left">
<f:render section="ButtonBarLeft" arguments="{displayBackButton: displayBackButton, displayNextButton: displayNextButton}" />
</div>
<div class="module-docheader-bar-column-right">
</div>
</div>
</div>
</div>
<div id="typo3-docbody">
<div id="typo3-inner-docbody">
<f:render section="selectItems" />
<f:flashMessages />
<f:render section="main" />
</div>
</div>
</f:be.container>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
<f:if condition="{extensionSelection} && {languageFileSelection}">
<h2 class="uppercase">
<f:translate key="select.constant" />
</h2>
<f:form.select name="constantSelection"
value="{constantSelection}"
options="{constantOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="select.constant" />
</div>
<div class="panel-body">
<f:form.select name="constantSelection"
class="form-control"
value="{constantSelection}"
options="{constantOptions}"
additionalAttributes="{onchange: 'TYPO3.lfEditor.submitForm(\'mainMenuForm\')'}" />
</div>
</div>
</f:if>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<h2 class="uppercase">
<f:translate key="select.langfile" />
</h2>
<div>
<strong>
{extensionLabel}
</strong>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="select.langfile" />
</div>
<div class="panel-body">
<div class="form-group">
<label>
<strong>
{extensionLabel}
</strong>
</label>
<div class="input-group">
<lfe:be.menus.actionMenu additionalAttributes="{class: 'form-control'}">
<f:for each="{extensions}" as="extension" key="extAddress">
<optgroup label="{extension.extLabel}">
<f:for each="{extension.languageFileOptions}" as="langFileLabel" key="langFileOption">
<f:if condition="{extAddress} == {extensionSelection} && {langFileOption} == {languageFileSelection}">
<f:then>
<f:be.menus.actionMenuItem label="{langFileLabel}"
controller="{controllerName}"
action="changeSelection"
arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<f:be.menus.actionMenuItem label="{langFileLabel}"
controller="{controllerName}"
action="changeSelection"
arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}" />
</f:else>
</f:if>
</f:for>
</optgroup>
</f:for>
</lfe:be.menus.actionMenu>
<span class="input-group-btn">
<button class="btn btn-default"
onclick="document.getElementById('refreshLanguageFileListForm').submit();"
title="{f:translate(key:'button.refreshLanguageFileList.title')}">
<core:icon identifier="actions-system-refresh" size="small" />
</button>
</span>
</div>
</div>
<f:form id="refreshLanguageFileListForm" action="refreshLanguageFileList" class="tx-lfeditor-inline-block-form"></f:form>
</div>
</div>
<lfe:be.menus.actionMenu>
<f:for each="{extensions}" as="extension" key="extAddress">
<optgroup label="{extension.extLabel}">
<f:for each="{extension.languageFileOptions}" as="langFileLabel" key="langFileOption">
<f:if condition="{extAddress} == {extensionSelection} && {langFileOption} == {languageFileSelection}">
<f:then>
<f:be.menus.actionMenuItem label="{langFileLabel}"
controller="{controllerName}"
action="changeSelection"
arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}"
additionalAttributes="{selected: 'selected'}" />
</f:then>
<f:else>
<f:be.menus.actionMenuItem label="{langFileLabel}"
controller="{controllerName}"
action="changeSelection"
arguments="{extensionSelection: extAddress, languageFileSelection: langFileOption}" />
</f:else>
</f:if>
</f:for>
</optgroup>
</f:for>
</lfe:be.menus.actionMenu>
<f:form id="refreshLanguageFileListForm" action="refreshLanguageFileList" class="tx-lfeditor-inline-block-form">
<span class="tx-lfeditor-buttons">
<button class="tx-lfeditor-buttons-refresh" title="{f:translate(key:'button.refreshLanguageFileList.title')}">
<core:icon identifier="actions-system-refresh" size="small" />
</button>
</span>
</f:form>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
<f:if condition="{extensionSelection} && {languageFileSelection} && {referenceLanguageOptions}">
<h2 class="uppercase">
<f:translate key="select.languageAndPattern" />
</h2>
<f:form.select name="languageSelection"
value="{languageSelection}"
options="{languageOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
<f:form.select name="referenceLanguageSelection"
value="{referenceLanguageSelection}"
options="{referenceLanguageOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="select.languageAndPattern" />
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<f:form.select name="languageSelection"
class="form-control"
value="{languageSelection}"
options="{languageOptions}"
additionalAttributes="{onchange: 'TYPO3.lfEditor.submitForm(\'mainMenuForm\')'}" />
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<f:form.select name="referenceLanguageSelection"
value="{referenceLanguageSelection}"
class="form-control"
options="{referenceLanguageOptions}"
additionalAttributes="{onchange: 'TYPO3.lfEditor.submitForm(\'mainMenuForm\')'}" />
</div>
</div>
</div>
</div>
</div>
</f:if>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
<f:if condition="{extensionSelection} && {languageFileSelection}">
<h2 class="uppercase">
<f:translate key="select.numConstants" />
</h2>
<f:form.select name="numSiteConstsSelection"
value="{numSiteConstsSelection}"
options="{numSiteConstsOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="select.numConstants" />
</div>
<div class="panel-body">
<div class="panel-body">
<f:form.select name="numSiteConstsSelection"
class="form-control"
value="{numSiteConstsSelection}"
options="{numSiteConstsOptions}"
additionalAttributes="{onchange: 'TYPO3.lfEditor.submitForm(\'mainMenuForm\')'}" />
</div>
</div>
</div>
</f:if>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
<f:if condition="{languageFileSelection} && {bottomReferenceLanguageOptions}">
<h2 class="uppercase">
<f:translate key="select.referenceLanguage" />
</h2>
<f:form.select name="bottomReferenceLanguageSelection"
value="{bottomReferenceLanguageSelection}"
options="{bottomReferenceLanguageOptions}"
additionalAttributes="{onchange: 'submitForm(\'mainMenuForm\')'}"
/>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="select.referenceLanguage" />
</div>
<div class="panel-body">
<div class="form-group">
<f:form.select name="bottomReferenceLanguageSelection"
class="form-control"
value="{bottomReferenceLanguageSelection}"
options="{bottomReferenceLanguageOptions}"
additionalAttributes="{onchange: 'TYPO3.lfEditor.submitForm(\'mainMenuForm\')'}" />
</div>
</div>
</div>
</f:if>
......@@ -5,7 +5,7 @@
<f:for each="{treeNode.icons}" iteration="iterator" as="icon" reverse="TRUE">
<f:if condition="{iterator.isLast} && {treeNode.children}">
<f:then>
<a href="javascript:openCloseTreeEntry(
<a href="javascript:TYPO3.lfEditor.openCloseTreeEntry(
'{f:uri.resource(path: 'Icons')}',
'ul-{constantKey}', 'icon-{constantKey}',
{treeNode.isBottom})">
......@@ -22,7 +22,7 @@
<f:if condition="{treeNode.children}">
<f:then>
<a href="javascript:openCloseTreeEntry(
<a href="javascript:TYPO3.lfEditor.openCloseTreeEntry(
'{f:uri.resource(path: 'Icons')}', 'ul-{constantKey}', 'icon-{constantKey}', {treeNode.isBottom})">
{treeNode.label}
</a>
......
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:layout name="Default" />
......@@ -8,39 +9,42 @@
<f:section name="main">
<f:if condition="{extensionSelection} && {languageFileSelection} && {languages}">
<h2 class="uppercase">
<f:translate key="function.const.add.add" />
</h2>
<f:form id="contentForm" action="addConstantSave">
<f:if condition="{constantSelection} != '###default###'">
<div class="tx-lfeditor-buttons">
<f:form.submit id="tx-lfeditor-button-submit" value="{f:translate(key:'button.save')}" />
</div>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.add.add" />
</div>
<div class="panel-body">
<f:form id="contentForm" action="addConstantSave">
<f:if condition="{constantSelection} != '###default###'">
<div class="form-group">
<label>
<f:translate key="function.const.add.name" />
</label>
<f:form.textfield name="nameOfConstant" class="form-control" />
</div>
<p>
<f:form.textfield name="nameOfConstant" class="tx-lfeditor-wideField" />
<strong>
<f:translate key="function.const.add.name" />
</strong>
</p>
<f:for each="{languages}" as="lang" iteration="iterator">
<fieldset class="tx-lfeditor-fieldset bgColor5 {f:if(condition: iterator.isEven, then: 'tx-lfeditor-fright')}{f:if(condition: iterator.isOdd, then: 'tx-lfeditor-fleft')}">
<legend class="bgColor3">
{f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')}
</legend>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
name="addConstTextArea[{lang}]"
lang="{f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')}"
class="tx-lfeditor-textarea" />
</fieldset>
</f:for>
<div class="tx-lfeditor-buttons">
<f:form.submit value="{f:translate(key:'button.save')}" />
</div>
</f:if>
</f:form>
<f:for each="{languages}" as="lang" iteration="iterator">
<fieldset class="tx-lfeditor-fieldset bgColor5 {f:if(condition: iterator.isEven, then: 'tx-lfeditor-fright')}{f:if(condition: iterator.isOdd, then: 'tx-lfeditor-fleft')}">
<legend class="bgColor3">
{f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')}
</legend>
<f:form.textarea
cols="80" rows="{numTextAreaRows}"
name="addConstTextArea[{lang}]"
lang="{f:if(condition: '{lang} == \'default\'', then: 'en', else: '{lang}')}"
class="tx-lfeditor-textarea" />
</fieldset>
</f:for>
</f:if>
</f:form>
</div>
</div>
</f:if>
</f:section>
<f:section name="ButtonBarLeft">
<button class="btn btn-default btn-sm" onclick="document.getElementById('contentForm').submit();">
<f:translate key="button.save" />
<core:icon identifier="actions-save" />
</button>
</f:section>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:layout name="Default" />
......@@ -11,18 +12,24 @@
<f:section name="main">
<f:if condition="{extensionSelection} && {languageFileSelection} && {constantSelection} && {constantSelection} != '###default###'">
<h2 class="uppercase">
<f:translate key="function.const.delete.delete" />
</h2>
<f:form id="contentForm" action="deleteConstantSave">
<f:translate key="function.const.delete.question" />
<p class="tx-lfeditor-delConst">{constantSelection}</p>
<p>
<div class="tx-lfeditor-buttons">
<f:form.submit id="tx-lfeditor-button-submit" value="{f:translate(key:'button.delete')}" />
</div>
</p>
</f:form>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.delete.delete" />
</div>
<div class="panel-body">
<f:form id="contentForm" action="deleteConstantSave">
<f:translate key="function.const.delete.question" />
<p class="tx-lfeditor-delConst">{constantSelection}</p>
<button class="btn btn-default" onclick="document.getElementById('contentForm').submit();">
<f:translate key="button.delete" />
<core:icon identifier="actions-delete" />
</button>
</f:form>
</div>
</div>
</f:if>
</f:section>
<f:section name="ButtonBarLeft">
</f:section>
{namespace lfe=SGalinski\Lfeditor\ViewHelpers}
{namespace core=TYPO3\CMS\Core\ViewHelpers}