Move form field templates to shared template-group
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 25 Jan 2024 14:17:55 +0000 (15:17 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 25 Jan 2024 14:17:55 +0000 (15:17 +0100)
22 files changed:
com.woltlab.wcf/acpTemplateDelete.xml
com.woltlab.wcf/templateDelete.xml
com.woltlab.wcf/templates/__formContainerChildren.tpl [deleted file]
com.woltlab.wcf/templates/__formContainerDependencies.tpl [deleted file]
com.woltlab.wcf/templates/__formField.tpl [deleted file]
com.woltlab.wcf/templates/__formFieldDependencies.tpl [deleted file]
com.woltlab.wcf/templates/__formFieldDescription.tpl [deleted file]
com.woltlab.wcf/templates/__formFieldErrors.tpl [deleted file]
com.woltlab.wcf/templates/shared_form.tpl
com.woltlab.wcf/templates/shared_formContainerChildren.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/shared_formContainerDependencies.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/shared_formField.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/shared_formFieldDependencies.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/shared_formFieldDescription.tpl [new file with mode: 0644]
com.woltlab.wcf/templates/shared_formFieldErrors.tpl [new file with mode: 0644]
syncTemplates.json
wcfsetup/install/files/acp/templates/__formContainerChildren.tpl [deleted file]
wcfsetup/install/files/acp/templates/__formContainerDependencies.tpl [deleted file]
wcfsetup/install/files/acp/templates/__formField.tpl [deleted file]
wcfsetup/install/files/acp/templates/__formFieldDependencies.tpl [deleted file]
wcfsetup/install/files/acp/templates/__formFieldDescription.tpl [deleted file]
wcfsetup/install/files/acp/templates/__formFieldErrors.tpl [deleted file]

index 3da36659222e4840cb30d7058b109d608c826768..7a549bd0a3477f7ceb614909c59cb60f940a6742 100644 (file)
                <template>__uploadFormField</template>
                <template>__wysiwygSmileyFormNode</template>
                <template>__form</template>
+               <template>__formField</template>
+               <template>shared_formContainerChildren</template>
+               <template>shared_formContainerDependencies</template>
+               <template>shared_formField</template>
+               <template>shared_formFieldDependencies</template>
+               <template>shared_formFieldDescription</template>
+               <template>shared_formFieldErrors</template>
        </delete>
 </data>
index 6fb652456e1e37b7096e9fdf851d8addc8843361..519312a66630e810b8b3aa92a2af06224e3af8cf 100644 (file)
                <template>__uploadFormField</template>
                <template>__wysiwygSmileyFormNode</template>
                <template>__form</template>
+               <template>__formField</template>
+               <template>shared_formContainerChildren</template>
+               <template>shared_formContainerDependencies</template>
+               <template>shared_formField</template>
+               <template>shared_formFieldDependencies</template>
+               <template>shared_formFieldDescription</template>
+               <template>shared_formFieldErrors</template>
        </delete>
 </data>
diff --git a/com.woltlab.wcf/templates/__formContainerChildren.tpl b/com.woltlab.wcf/templates/__formContainerChildren.tpl
deleted file mode 100644 (file)
index 67486e3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{foreach from=$container item='child'}
-       {if $child->isAvailable()}
-               {@$child->getHtml()}
-       {/if}
-{/foreach}
\ No newline at end of file
diff --git a/com.woltlab.wcf/templates/__formContainerDependencies.tpl b/com.woltlab.wcf/templates/__formContainerDependencies.tpl
deleted file mode 100644 (file)
index 20b7a74..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{if !$container->getDependencies()|empty}
-       <script data-relocate="true">
-               {foreach from=$container->getDependencies() item=dependency}
-                       {@$dependency->getHtml()}
-               {/foreach}
-       </script>
-{/if}
diff --git a/com.woltlab.wcf/templates/__formField.tpl b/com.woltlab.wcf/templates/__formField.tpl
deleted file mode 100644 (file)
index 8bd4d10..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<dl id="{$field->getPrefixedId()}Container"{*
-       *}{if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
-       *}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
-       *}{if !$field->checkDependencies()} style="display: none;"{/if}{*
-*}>
-       <dt>{if $field->getLabel() !== null}<label for="{$field->getPrefixedId()}">{@$field->getLabel()}</label>{if $field->isRequired() && $form->marksRequiredFields()} <span class="formFieldRequired">*</span>{/if}{/if}</dt>
-       <dd>
-               {@$field->getFieldHtml()}
-               
-               {include file='__formFieldErrors'}
-               {include file='__formFieldDescription'}
-               {include file='__formFieldDependencies'}
-               {include file='__formFieldDataHandler'}
-       </dd>
-</dl>
diff --git a/com.woltlab.wcf/templates/__formFieldDependencies.tpl b/com.woltlab.wcf/templates/__formFieldDependencies.tpl
deleted file mode 100644 (file)
index c3525c3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{if !$field->getDependencies()|empty}
-       <script data-relocate="true">
-               {foreach from=$field->getDependencies() item=dependency}
-                       {@$dependency->getHtml()}
-               {/foreach}
-       </script>
-{/if}
diff --git a/com.woltlab.wcf/templates/__formFieldDescription.tpl b/com.woltlab.wcf/templates/__formFieldDescription.tpl
deleted file mode 100644 (file)
index b21aac7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{if $field->getDescription() !== null}
-       <small>{@$field->getDescription()}</small>
-{/if}
diff --git a/com.woltlab.wcf/templates/__formFieldErrors.tpl b/com.woltlab.wcf/templates/__formFieldErrors.tpl
deleted file mode 100644 (file)
index e907273..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{foreach from=$field->getValidationErrors() item='validationError'}
-       {@$validationError->getHtml()}
-{/foreach}
index 1777609dc081ea4c6daa8301d054eb9f1358726a..cda2f88b36ebf6b77207a3e62b84923a9533d89c 100644 (file)
@@ -71,7 +71,7 @@
 {if $form->needsRequiredFieldsInfo()}
        <div class="formFieldRequiredNotice">
                <p><span class="formFieldRequired">*</span> {lang}wcf.global.form.required{/lang}</p>
-               
+
                {event name='requiredFieldsInfo'}
        </div>
 {/if}
diff --git a/com.woltlab.wcf/templates/shared_formContainerChildren.tpl b/com.woltlab.wcf/templates/shared_formContainerChildren.tpl
new file mode 100644 (file)
index 0000000..67486e3
--- /dev/null
@@ -0,0 +1,5 @@
+{foreach from=$container item='child'}
+       {if $child->isAvailable()}
+               {@$child->getHtml()}
+       {/if}
+{/foreach}
\ No newline at end of file
diff --git a/com.woltlab.wcf/templates/shared_formContainerDependencies.tpl b/com.woltlab.wcf/templates/shared_formContainerDependencies.tpl
new file mode 100644 (file)
index 0000000..20b7a74
--- /dev/null
@@ -0,0 +1,7 @@
+{if !$container->getDependencies()|empty}
+       <script data-relocate="true">
+               {foreach from=$container->getDependencies() item=dependency}
+                       {@$dependency->getHtml()}
+               {/foreach}
+       </script>
+{/if}
diff --git a/com.woltlab.wcf/templates/shared_formField.tpl b/com.woltlab.wcf/templates/shared_formField.tpl
new file mode 100644 (file)
index 0000000..8bd4d10
--- /dev/null
@@ -0,0 +1,15 @@
+<dl id="{$field->getPrefixedId()}Container"{*
+       *}{if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
+       *}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
+       *}{if !$field->checkDependencies()} style="display: none;"{/if}{*
+*}>
+       <dt>{if $field->getLabel() !== null}<label for="{$field->getPrefixedId()}">{@$field->getLabel()}</label>{if $field->isRequired() && $form->marksRequiredFields()} <span class="formFieldRequired">*</span>{/if}{/if}</dt>
+       <dd>
+               {@$field->getFieldHtml()}
+               
+               {include file='__formFieldErrors'}
+               {include file='__formFieldDescription'}
+               {include file='__formFieldDependencies'}
+               {include file='__formFieldDataHandler'}
+       </dd>
+</dl>
diff --git a/com.woltlab.wcf/templates/shared_formFieldDependencies.tpl b/com.woltlab.wcf/templates/shared_formFieldDependencies.tpl
new file mode 100644 (file)
index 0000000..c3525c3
--- /dev/null
@@ -0,0 +1,7 @@
+{if !$field->getDependencies()|empty}
+       <script data-relocate="true">
+               {foreach from=$field->getDependencies() item=dependency}
+                       {@$dependency->getHtml()}
+               {/foreach}
+       </script>
+{/if}
diff --git a/com.woltlab.wcf/templates/shared_formFieldDescription.tpl b/com.woltlab.wcf/templates/shared_formFieldDescription.tpl
new file mode 100644 (file)
index 0000000..b21aac7
--- /dev/null
@@ -0,0 +1,3 @@
+{if $field->getDescription() !== null}
+       <small>{@$field->getDescription()}</small>
+{/if}
diff --git a/com.woltlab.wcf/templates/shared_formFieldErrors.tpl b/com.woltlab.wcf/templates/shared_formFieldErrors.tpl
new file mode 100644 (file)
index 0000000..e907273
--- /dev/null
@@ -0,0 +1,3 @@
+{foreach from=$field->getValidationErrors() item='validationError'}
+       {@$validationError->getHtml()}
+{/foreach}
index 2f1288b5b13aaadaac72234379fe331a3cd4cd1b..cae81b2dcfec575e05ca207be46af861f42d2586 100644 (file)
@@ -1,11 +1,6 @@
 {
   "directories": ["com.woltlab.wcf/templates", "wcfsetup/install/files/acp/templates"],
   "templates": [
-    "__formContainerChildren",
-    "__formContainerDependencies",
-    "__formFieldDependencies",
-    "__formFieldDescription",
-    "__formFieldErrors",
     "__mediaSetCategoryDialog",
     "__messageQuoteManager",
     "__multiPageCondition",
diff --git a/wcfsetup/install/files/acp/templates/__formContainerChildren.tpl b/wcfsetup/install/files/acp/templates/__formContainerChildren.tpl
deleted file mode 100644 (file)
index 67486e3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-{foreach from=$container item='child'}
-       {if $child->isAvailable()}
-               {@$child->getHtml()}
-       {/if}
-{/foreach}
\ No newline at end of file
diff --git a/wcfsetup/install/files/acp/templates/__formContainerDependencies.tpl b/wcfsetup/install/files/acp/templates/__formContainerDependencies.tpl
deleted file mode 100644 (file)
index 20b7a74..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{if !$container->getDependencies()|empty}
-       <script data-relocate="true">
-               {foreach from=$container->getDependencies() item=dependency}
-                       {@$dependency->getHtml()}
-               {/foreach}
-       </script>
-{/if}
diff --git a/wcfsetup/install/files/acp/templates/__formField.tpl b/wcfsetup/install/files/acp/templates/__formField.tpl
deleted file mode 100644 (file)
index 8bd4d10..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<dl id="{$field->getPrefixedId()}Container"{*
-       *}{if !$field->getClasses()|empty} class="{implode from=$field->getClasses() item='class' glue=' '}{$class}{/implode}"{/if}{*
-       *}{foreach from=$field->getAttributes() key='attributeName' item='attributeValue'} {$attributeName}="{$attributeValue}"{/foreach}{*
-       *}{if !$field->checkDependencies()} style="display: none;"{/if}{*
-*}>
-       <dt>{if $field->getLabel() !== null}<label for="{$field->getPrefixedId()}">{@$field->getLabel()}</label>{if $field->isRequired() && $form->marksRequiredFields()} <span class="formFieldRequired">*</span>{/if}{/if}</dt>
-       <dd>
-               {@$field->getFieldHtml()}
-               
-               {include file='__formFieldErrors'}
-               {include file='__formFieldDescription'}
-               {include file='__formFieldDependencies'}
-               {include file='__formFieldDataHandler'}
-       </dd>
-</dl>
diff --git a/wcfsetup/install/files/acp/templates/__formFieldDependencies.tpl b/wcfsetup/install/files/acp/templates/__formFieldDependencies.tpl
deleted file mode 100644 (file)
index c3525c3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{if !$field->getDependencies()|empty}
-       <script data-relocate="true">
-               {foreach from=$field->getDependencies() item=dependency}
-                       {@$dependency->getHtml()}
-               {/foreach}
-       </script>
-{/if}
diff --git a/wcfsetup/install/files/acp/templates/__formFieldDescription.tpl b/wcfsetup/install/files/acp/templates/__formFieldDescription.tpl
deleted file mode 100644 (file)
index b21aac7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{if $field->getDescription() !== null}
-       <small>{@$field->getDescription()}</small>
-{/if}
diff --git a/wcfsetup/install/files/acp/templates/__formFieldErrors.tpl b/wcfsetup/install/files/acp/templates/__formFieldErrors.tpl
deleted file mode 100644 (file)
index e907273..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{foreach from=$field->getValidationErrors() item='validationError'}
-       {@$validationError->getHtml()}
-{/foreach}