From 743ad7c9de881a28b10b3a119671955b1c8649aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 14 Jan 2019 20:47:56 +0100 Subject: [PATCH] Rewrite template to fit the FormBuilder system See #2825 --- .../templates/uploadFieldComponent.tpl | 97 ++++++++----------- .../system/file/upload/UploadField.class.php | 36 +------ .../file/upload/UploadHandler.class.php | 6 +- 3 files changed, 45 insertions(+), 94 deletions(-) diff --git a/com.woltlab.wcf/templates/uploadFieldComponent.tpl b/com.woltlab.wcf/templates/uploadFieldComponent.tpl index 2362d74cb7..1045b2878a 100644 --- a/com.woltlab.wcf/templates/uploadFieldComponent.tpl +++ b/com.woltlab.wcf/templates/uploadFieldComponent.tpl @@ -1,62 +1,47 @@ - -
-
- {if !$field->supportMultipleFiles() && $field->isImageOnly()} -
{* - *}{if !$files|empty}{* - *}{assign var="file" value=$files|reset}{* - *}{* - *} -
    - {/if}{* - *}
    - {else} -
    -
      - {foreach from=$files item=file} -
    • - - -
      -
      -

      {$file->getFilename()}

      - {@$file->filesize|filesize} -
      - -
        - - {if $errorField == $file->getUniqueFileId()} - {lang __optional="true"}{$errorType}{/lang} - {/if} -
        -
      • - {/foreach} -
      -
      - {/if} - -
      - - {if $errorField == $fieldId} - - {if $errorType == 'empty'} - {lang}wcf.global.form.error.empty{/lang} - {else} - {lang}{$errorType}{/lang} - {/if} - - {/if} - - -
      - +{if !$uploadField->supportMultipleFiles() && $uploadField->isImageOnly()} +
      {* + *}{if !$files|empty}{* + *}{assign var="file" value=$uploadFieldFiles|reset}{* + *}{* + *} +
        + {/if}{* + *}
        +{else} +
        +
          + {foreach from=$uploadFieldFiles item=file} +
        • + + +
          +
          +

          {$file->getFilename()}

          + {@$file->filesize|filesize} +
          + +
            + + {if $errorField == $file->getUniqueFileId()} + {lang __optional="true"}{$errorType}{/lang} + {/if} +
            +
          • + {/foreach} +
          +
          +{/if} + +
          + +