Fix typo in filename
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 8 Jan 2019 22:07:42 +0000 (23:07 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 8 Jan 2019 22:08:37 +0000 (23:08 +0100)
See #2825

com.woltlab.wcf/templates/uploadFIeldComponent.tpl [deleted file]
com.woltlab.wcf/templates/uploadFieldComponent.tpl [new file with mode: 0644]

diff --git a/com.woltlab.wcf/templates/uploadFIeldComponent.tpl b/com.woltlab.wcf/templates/uploadFIeldComponent.tpl
deleted file mode 100644 (file)
index f9a9d53..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<dl{if $errorField == $fieldId} class="formError"{/if}>
-       <dt><label for="{$fieldId}">{$field->getName()}</label></dt>
-       <dd>
-               {if !$field->supportMultipleFiles() && $field->isImageOnly()}
-                               <div class="selectedImagePreview uploadedFile" id="{$fieldId}uploadFileList" data-internal-id="{$field->getInternalId()}">{*
-                                       *}{if !$files|empty}{*
-                                               *}{assign var="file" value=$files|reset}{*
-                                               *}<img src="{$file->getImage()}" alt="" class="previewImage" id="{$fieldId}Image" style="max-width: 100%" data-unique-file-id="{$file->getUniqueFileId()}">{*
-                                       *}
-                                               <ul class="buttonGroup"></ul>
-                                       {/if}{*
-                               *}</div>
-               {else}
-                       <div class="formUploadHandlerContent">
-                               <ul class="formUploadHandlerList" id="{$fieldId}uploadFileList" data-internal-id="{$field->getInternalId()}">
-                                       {foreach from=$files item=file}
-                                               <li class="box64 uploadedFile" data-unique-file-id="{$file->getUniqueFileId()}">
-                                                       <span class="icon icon64 fa-{$file->getIconName()}"></span>
-                                                       
-                                                       <div>
-                                                               <div>
-                                                                       <p>{$file->getFilename()}</p>
-                                                                       <small>{@$file->filesize|filesize}</small>
-                                                               </div>
-                                                               
-                                                               <ul class="buttonGroup"></ul>
-                                                               
-                                                               {if $errorField == $file->getUniqueFileId()}
-                                                                       <small class="innerError innerFileError">{lang __optional="true"}{$errorType}{/lang}</small>
-                                                               {/if}
-                                                       </div>
-                                               </li>
-                                       {/foreach}
-                               </ul>
-                       </div>
-               {/if}
-               
-               <div id="{$fieldId}UploadButtonDiv" class="uploadButtonDiv"></div>
-               
-               {if $errorField == $fieldId}
-                       <small class="innerError">
-                               {if $errorType == 'empty'}
-                                       {lang}wcf.global.form.error.empty{/lang}
-                               {else}
-                                       {lang __optional="true"}{$errorType}{/lang}
-                               {/if}
-                       </small>
-               {/if}
-               
-               <input type="hidden" name="{$fieldId}" value="{$field->getInternalId()}">
-       </dd>
-</dl>
-
-<script data-relocate="true">
-       require(['WoltLabSuite/Core/Ui/File/Upload', 'Language'], function(Upload, Language) {
-               new Upload("{$fieldId}UploadButtonDiv", "{$fieldId}uploadFileList", {
-                       internalId: '{$field->getInternalId()}',
-                       maxFiles: {$field->getMaxFiles()},
-                       imagePreview: {if !$field->supportMultipleFiles() && $field->isImageOnly()}true{else}false{/if}
-               });
-               
-               Language.addObject({
-                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
-                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
-               });
-       });
-</script>
\ No newline at end of file
diff --git a/com.woltlab.wcf/templates/uploadFieldComponent.tpl b/com.woltlab.wcf/templates/uploadFieldComponent.tpl
new file mode 100644 (file)
index 0000000..f9a9d53
--- /dev/null
@@ -0,0 +1,67 @@
+<dl{if $errorField == $fieldId} class="formError"{/if}>
+       <dt><label for="{$fieldId}">{$field->getName()}</label></dt>
+       <dd>
+               {if !$field->supportMultipleFiles() && $field->isImageOnly()}
+                               <div class="selectedImagePreview uploadedFile" id="{$fieldId}uploadFileList" data-internal-id="{$field->getInternalId()}">{*
+                                       *}{if !$files|empty}{*
+                                               *}{assign var="file" value=$files|reset}{*
+                                               *}<img src="{$file->getImage()}" alt="" class="previewImage" id="{$fieldId}Image" style="max-width: 100%" data-unique-file-id="{$file->getUniqueFileId()}">{*
+                                       *}
+                                               <ul class="buttonGroup"></ul>
+                                       {/if}{*
+                               *}</div>
+               {else}
+                       <div class="formUploadHandlerContent">
+                               <ul class="formUploadHandlerList" id="{$fieldId}uploadFileList" data-internal-id="{$field->getInternalId()}">
+                                       {foreach from=$files item=file}
+                                               <li class="box64 uploadedFile" data-unique-file-id="{$file->getUniqueFileId()}">
+                                                       <span class="icon icon64 fa-{$file->getIconName()}"></span>
+                                                       
+                                                       <div>
+                                                               <div>
+                                                                       <p>{$file->getFilename()}</p>
+                                                                       <small>{@$file->filesize|filesize}</small>
+                                                               </div>
+                                                               
+                                                               <ul class="buttonGroup"></ul>
+                                                               
+                                                               {if $errorField == $file->getUniqueFileId()}
+                                                                       <small class="innerError innerFileError">{lang __optional="true"}{$errorType}{/lang}</small>
+                                                               {/if}
+                                                       </div>
+                                               </li>
+                                       {/foreach}
+                               </ul>
+                       </div>
+               {/if}
+               
+               <div id="{$fieldId}UploadButtonDiv" class="uploadButtonDiv"></div>
+               
+               {if $errorField == $fieldId}
+                       <small class="innerError">
+                               {if $errorType == 'empty'}
+                                       {lang}wcf.global.form.error.empty{/lang}
+                               {else}
+                                       {lang __optional="true"}{$errorType}{/lang}
+                               {/if}
+                       </small>
+               {/if}
+               
+               <input type="hidden" name="{$fieldId}" value="{$field->getInternalId()}">
+       </dd>
+</dl>
+
+<script data-relocate="true">
+       require(['WoltLabSuite/Core/Ui/File/Upload', 'Language'], function(Upload, Language) {
+               new Upload("{$fieldId}UploadButtonDiv", "{$fieldId}uploadFileList", {
+                       internalId: '{$field->getInternalId()}',
+                       maxFiles: {$field->getMaxFiles()},
+                       imagePreview: {if !$field->supportMultipleFiles() && $field->isImageOnly()}true{else}false{/if}
+               });
+               
+               Language.addObject({
+                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
+                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
+               });
+       });
+</script>
\ No newline at end of file