From 310fbddfb53599827213122d461adef9d7dfc54e Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 21 May 2020 20:18:38 +0200 Subject: [PATCH] Mark required fields in output when using form builder (#3296) Close #3265 --- com.woltlab.wcf/templates/__form.tpl | 8 +++++++ com.woltlab.wcf/templates/__formContainer.tpl | 4 ++-- com.woltlab.wcf/templates/__formField.tpl | 2 +- .../install/files/acp/templates/__form.tpl | 8 +++++++ .../files/acp/templates/__formContainer.tpl | 4 ++-- .../files/acp/templates/__formField.tpl | 2 +- .../form/builder/FormDocument.class.php | 23 +++++++++++++++++++ .../form/builder/IFormDocument.class.php | 8 +++++++ .../builder/container/FormContainer.class.php | 8 +++++++ .../container/IFormContainer.class.php | 8 +++++++ .../wysiwyg/WysiwygFormContainer.class.php | 8 +++++++ wcfsetup/install/files/style/layout/form.scss | 1 + 12 files changed, 78 insertions(+), 6 deletions(-) diff --git a/com.woltlab.wcf/templates/__form.tpl b/com.woltlab.wcf/templates/__form.tpl index 8719c7e04b..d6ad54d0e6 100644 --- a/com.woltlab.wcf/templates/__form.tpl +++ b/com.woltlab.wcf/templates/__form.tpl @@ -61,6 +61,14 @@ {/if} +{if $form->needsRequiredFieldsInfo()} +
+

* {lang}wcf.global.form.required{/lang}

+ + {event name='requiredFieldsInfo'} +
+{/if} +