Merge branch '6.0'
authorAlexander Ebert <ebert@woltlab.com>
Sat, 8 Jun 2024 11:34:52 +0000 (13:34 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 8 Jun 2024 11:34:52 +0000 (13:34 +0200)
1  2 
com.woltlab.wcf/templates/shared_multilineItemListFormField.tpl
wcfsetup/install/files/lib/acp/form/PageAddForm.class.php
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php
wcfsetup/install/files/lib/system/box/BoxHandler.class.php
wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeProcessor.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 340637afa47ce2d149f8e8d4c4c761b62d16898b,0000000000000000000000000000000000000000..15734a3ae80b3d3be337170b5db977a7968dec6f
mode 100644,000000..100644
--- /dev/null
@@@ -1,44 -1,0 +1,44 @@@
-                       <button class="jsEditItem jsTooltip" type="button" title="{lang}wcf.global.button.edit{/lang}">
-                               {icon name='edit'}
-                       </button>
 +<ul class="scrollableCheckboxList" {*
 +    *}id="lineBreakSeparatedTextOption_{$field->getPrefixedId()}"{*
 +    *}{if $field->getValue()|empty} style="display: none"{/if}{*
 +*}>
 +      {foreach from=$field->getValue() item=value}
 +              <li data-value="{$value}">
++                      <button class="jsEditItem jsTooltip" type="button" title="{lang}wcf.global.button.edit{/lang}">
++                              {icon name='pencil'}
++                      </button>
 +                      <button class="jsDeleteItem jsTooltip" type="button" title="{lang}wcf.global.button.delete{/lang}">
 +                              {icon name='trash'}
 +                      </button>
 +                      <span>{$value}</span>
 +              </li>
 +      {/foreach}
 +</ul>
 +
 +<script data-relocate="true">
 +      require(["WoltLabSuite/Core/Form/Builder/Field/Controller/MultilineItemList"], ({ MultilineItemListFormField }) => {
 +              {jsphrase name='wcf.acp.option.type.lineBreakSeparatedText.placeholder'}
 +              {jsphrase name='wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage'}
 +              {jsphrase name='wcf.global.button.save'}
 +              {jsphrase name='wcf.global.button.cancel'}
 +              {jsphrase name='wcf.global.button.edit'}
 +              WoltLabLanguage.registerPhrase("wcf.acp.option.type.lineBreakSeparatedText.error.duplicate", '{jslang __literal=true}wcf.acp.option.type.lineBreakSeparatedText.error.duplicate{/jslang}');
 +
 +              new MultilineItemListFormField(document.getElementById('lineBreakSeparatedTextOption_{@$field->getPrefixedId()|encodeJS}'), {
 +                      submitFieldName: '{@$field->getPrefixedId()|encodeJS}[]',
 +              });
 +      });
 +      {if $field->isFilterable()}
 +      require(["WoltLabSuite/Core/Ui/ItemList/Filter"], (UiItemListFilter) => {
 +              {jsphrase name='wcf.global.filter.button.visibility'}
 +              {jsphrase name='wcf.global.filter.button.clear'}
 +              {jsphrase name='wcf.global.filter.error.noMatches'}
 +              {jsphrase name='wcf.global.filter.placeholder'}
 +              {jsphrase name='wcf.global.filter.visibility.activeOnly'}
 +              {jsphrase name='wcf.global.filter.visibility.highlightActive'}
 +              {jsphrase name='wcf.global.filter.visibility.showAll'}
 +
 +              new UiItemListFilter('lineBreakSeparatedTextOption_{@$field->getPrefixedId()|encodeJS}');
 +      });
 +      {/if}
 +</script>
index ad5fa33eff1339f66719272fa161129ad2b7ffad,9f8685f1d11b833250c7ea8c440af8b268701ee0..4dae577d31c6e82467e51c884297e751aa7c2d7c
@@@ -49,12 -49,15 +49,12 @@@ class BoxHandler extends SingletonFacto
       */
      protected function init()
      {
 -        // get active page id
          $pageID = 0;
          if (!self::$disablePageLayout) {
 -            if (($request = RequestHandler::getInstance()->getActiveRequest()) !== null) {
 -                $pageID = $request->getPageID();
 -            }
 +            $pageID = RequestHandler::getInstance()->getActivePageID() ?: 0;
          }
  
-         $this->boxesByPosition = self::loadBoxes($pageID, true);
+         $this->boxesByPosition = self::loadBoxes($pageID, !RequestHandler::getInstance()->isACPRequest());
          foreach ($this->boxesByPosition as $boxes) {
              foreach ($boxes as $box) {
                  $this->boxes[$box->boxID] = $box;
Simple merge
Simple merge