[BUGFIX] Fix file upload and directory creation in file browser
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Resources / Private / Templates / File / ReplaceFile.html
1 <h1><f:translate key="LLL:EXT:lang/locallang_core.xlf:file_replace.php.pagetitle" /></h1>
2 <div>
3 <form action="{moduleUrlTceFile}" role="form" method="post" name="editform" enctype="multipart/form-data">
4 <div class="form-group">
5 <input type="checkbox" value="1" id="keepFilename" name="data[replace][1][keepFilename]">
6 <label for="keepFilename"><f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_replace.php.keepfiletitle" /></label>
7 </div>
8
9 <div class="form-group">
10 <label for="file_replace"><f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_replace.php.selectfile" /></label>
11 <div class="input-group col-xs-6">
12 <input type="text" name="fakefile" id="fakefile" class="form-control input-xlarge" readonly>
13 <a class="input-group-addon btn btn-primary" onclick="$('#file_replace').click();">
14 <f:translate key="LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_replace.php.browse" />
15 </a>
16 </div>
17 <input class="form-control" type="file" id="file_replace" name="replace_1" style="visibility: hidden;" />
18 </div>
19
20 <script>
21 $('#file_replace').change(function() {
22 $('#fakefile').val($(this).val());
23 });
24 </script>
25
26 <input type="hidden" name="overwriteExistingFiles" value="replace" />
27 <input type="hidden" name="data[replace][1][data]" value="1" />
28 <input type="hidden" name="data[replace][1][uid]" value="{uid}" />
29
30 <div class="form-group">
31 <input class="btn btn-primary" type="submit" value="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:file_replace.php.submit')}" />
32 <input class="btn btn-danger" type="submit" value="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.cancel')}"
33 onclick="backToList(); return false;" />
34 <input type="hidden" name="data[replace][1][redirect]" value="{returnUrl}" />
35 </div>
36 </form>
37 </div>