Commit f131fcb6 authored by Benni Mack's avatar Benni Mack Committed by Wouter Wolters
Browse files

[TASK] Style rename file/folder controller

The form to rename a file or folder
isn't styled via bootstrap yet.

Resolves: #63295
Releases: master
Change-Id: I76ce668c5d69de35402e1a0fc0135c682c448504
Reviewed-on: http://review.typo3.org/34545


Reviewed-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber's avatarMathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent a8b50b72
......@@ -131,34 +131,30 @@ class RenameFileController {
// Make page header:
$this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
$pageContent .= $this->doc->spacer(5);
$pageContent .= $this->doc->divider(5);
if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
$fileIdentifier = $this->fileOrFolderObject->getCombinedIdentifier();
} else {
$fileIdentifier = $this->fileOrFolderObject->getUid();
}
$code = '<form action="tce_file.php" method="post" name="editform">';
$pageContent .= '<form action="tce_file.php" method="post" name="editform" role="form">';
// Making the formfields for renaming:
$code .= '
$pageContent .= '
<div id="c-rename">
<input type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />
<div class="form-group">
<input class="form-control" type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />
<input type="hidden" name="file[rename][0][data]" value="' . htmlspecialchars($fileIdentifier) . '" />
</div>
';
// Making submit button:
$code .= '
<div id="c-submit">
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) . '" />
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) . '" onclick="backToList(); return false;" />
$pageContent .= '
<div class="form-group">
<input class="btn btn-primary" type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) . '" />
<input class="btn btn-danger" type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) . '" onclick="backToList(); return false;" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) . '" />
' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '
</div>
';
$code .= '</form>';
// Add the HTML as a section:
$pageContent .= $code;
$pageContent .= '</form>';
$docHeaderButtons = array(
'back' => ''
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment