From e9154428f7f114cf29d20cf5746914f14e58e9d2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 5 Oct 2019 16:35:36 +0200 Subject: [PATCH] Add IFormField::getFieldHtml() Close #3085 --- com.woltlab.wcf/templates/__aclFormField.tpl | 4 ---- .../templates/__booleanFormField.tpl | 4 ---- .../templates/__contentLanguageFormField.tpl | 4 ---- com.woltlab.wcf/templates/__dateFormField.tpl | 4 ---- .../templates/__emailFormField.tpl | 4 ---- ...{__formFieldHeader.tpl => __formField.tpl} | 8 ++++++++ .../templates/__formFieldFooter.tpl | 6 ------ com.woltlab.wcf/templates/__iconFormField.tpl | 4 ---- .../templates/__itemListFormField.tpl | 4 ---- .../templates/__labelFormField.tpl | 4 ---- .../templates/__multilineTextFormField.tpl | 4 ---- .../__multipleSelectionFormField.tpl | 4 ---- .../templates/__numericFormField.tpl | 4 ---- .../templates/__pollOptionsFormField.tpl | 4 ---- .../templates/__radioButtonFormField.tpl | 4 ---- .../templates/__ratingFormField.tpl | 4 ---- .../__singleMediaSelectionFormField.tpl | 4 ---- .../templates/__singleSelectionFormField.tpl | 4 ---- com.woltlab.wcf/templates/__tagFormField.tpl | 4 ---- com.woltlab.wcf/templates/__textFormField.tpl | 4 ---- .../templates/__uploadFormField.tpl | 4 ---- com.woltlab.wcf/templates/__userFormField.tpl | 4 ---- .../templates/__usernameFormField.tpl | 4 ---- .../__wysiwygAttachmentFormField.tpl | 4 ---- .../templates/__wysiwygFormField.tpl | 4 ---- .../files/acp/templates/__aclFormField.tpl | 4 ---- .../acp/templates/__booleanFormField.tpl | 4 ---- .../templates/__contentLanguageFormField.tpl | 4 ---- .../files/acp/templates/__dateFormField.tpl | 4 ---- .../files/acp/templates/__emailFormField.tpl | 4 ---- ...{__formFieldHeader.tpl => __formField.tpl} | 8 ++++++++ .../files/acp/templates/__formFieldFooter.tpl | 6 ------ .../files/acp/templates/__iconFormField.tpl | 4 ---- .../acp/templates/__itemListFormField.tpl | 4 ---- .../files/acp/templates/__labelFormField.tpl | 4 ---- .../templates/__multilineTextFormField.tpl | 4 ---- .../__multipleSelectionFormField.tpl | 4 ---- .../acp/templates/__numericFormField.tpl | 4 ---- .../acp/templates/__pollOptionsFormField.tpl | 4 ---- .../acp/templates/__radioButtonFormField.tpl | 4 ---- .../files/acp/templates/__ratingFormField.tpl | 4 ---- .../__singleMediaSelectionFormField.tpl | 4 ---- .../templates/__singleSelectionFormField.tpl | 4 ---- .../files/acp/templates/__tagFormField.tpl | 4 ---- .../files/acp/templates/__textFormField.tpl | 4 ---- .../files/acp/templates/__uploadFormField.tpl | 4 ---- .../files/acp/templates/__userFormField.tpl | 4 ---- .../acp/templates/__usernameFormField.tpl | 4 ---- .../__wysiwygAttachmentFormField.tpl | 4 ---- .../acp/templates/__wysiwygFormField.tpl | 4 ---- .../builder/field/AbstractFormField.class.php | 19 +++++++++++++++++-- .../form/builder/field/IFormField.class.php | 8 ++++++++ .../builder/field/UploadFormField.class.php | 12 ++++++++++++ .../field/wysiwyg/WysiwygFormField.class.php | 4 ++-- 54 files changed, 55 insertions(+), 200 deletions(-) rename com.woltlab.wcf/templates/{__formFieldHeader.tpl => __formField.tpl} (69%) delete mode 100644 com.woltlab.wcf/templates/__formFieldFooter.tpl rename wcfsetup/install/files/acp/templates/{__formFieldHeader.tpl => __formField.tpl} (69%) delete mode 100644 wcfsetup/install/files/acp/templates/__formFieldFooter.tpl diff --git a/com.woltlab.wcf/templates/__aclFormField.tpl b/com.woltlab.wcf/templates/__aclFormField.tpl index 16b053dcbc..033074374b 100644 --- a/com.woltlab.wcf/templates/__aclFormField.tpl +++ b/com.woltlab.wcf/templates/__aclFormField.tpl @@ -1,9 +1,5 @@ -{include file='__formFieldHeader'} - {if $includeAclJavaScript} {include file='aclPermissions'} {/if} {include file='aclPermissionJavaScript' containerID=$field->getPrefixedId()|concat:'Container' categoryName=$field->getCategoryName() objectID=$field->getObjectID() objectTypeID=$field->getObjectType()->objectTypeID} - -{include file='__formFieldFooter'} diff --git a/com.woltlab.wcf/templates/__booleanFormField.tpl b/com.woltlab.wcf/templates/__booleanFormField.tpl index da10fb6550..af28e8e821 100644 --- a/com.woltlab.wcf/templates/__booleanFormField.tpl +++ b/com.woltlab.wcf/templates/__booleanFormField.tpl @@ -1,5 +1,3 @@ -{include file='__formFieldHeader'} -
  1. isAutofocused()} autofocus{/if}{if $field->isRequired()} required{/if}{if $field->isImmutable()} disabled{/if}{if $field->getValue()} checked{/if}> @@ -10,5 +8,3 @@
- -{include file='__formFieldFooter'} diff --git a/com.woltlab.wcf/templates/__contentLanguageFormField.tpl b/com.woltlab.wcf/templates/__contentLanguageFormField.tpl index f26a83a1a2..ff0b8e3db7 100644 --- a/com.woltlab.wcf/templates/__contentLanguageFormField.tpl +++ b/com.woltlab.wcf/templates/__contentLanguageFormField.tpl @@ -1,5 +1,3 @@ -{include file='__formFieldHeader'} -