From 2498a7762024d3464844b8d0511879ad934f4286 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 2 Jul 2016 14:04:07 +0200 Subject: [PATCH] Label group for labels is now permanent --- wcfsetup/install/files/acp/templates/labelAdd.tpl | 3 ++- .../install/files/lib/acp/form/LabelEditForm.class.php | 8 +++++--- wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/labelAdd.tpl b/wcfsetup/install/files/acp/templates/labelAdd.tpl index 9f92474bdc..a0767317db 100644 --- a/wcfsetup/install/files/acp/templates/labelAdd.tpl +++ b/wcfsetup/install/files/acp/templates/labelAdd.tpl @@ -43,12 +43,13 @@
- {foreach from=$labelGroupList item=group} {/foreach} + {lang}wcf.acp.label.group.permanentSelection{/lang} {if $errorField == 'groupID'} {if $errorType == 'empty'} diff --git a/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php b/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php index 1d722d38b7..8bc5a70ae7 100644 --- a/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LabelEditForm.class.php @@ -35,9 +35,9 @@ class LabelEditForm extends LabelAddForm { /** * label object - * @var \wcf\data\label\Label + * @var Label */ - public $labelObj = null; + public $labelObj; /** * @inheritDoc @@ -68,10 +68,12 @@ class LabelEditForm extends LabelAddForm { } // update label + + // groupID is immutable because altering it would cause issues with objects that are + // assigned to them, but the new group is not allowed at their current position $this->objectAction = new LabelAction([$this->labelID], 'update', ['data' => array_merge($this->additionalFields, [ 'label' => $this->label, 'cssClassName' => ($this->cssClassName == 'custom' ? $this->customCssClassName : $this->cssClassName), - 'groupID' => $this->groupID, 'showOrder' => $this->showOrder ])]); $this->objectAction->executeAction(); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 7159a3ed1d..70390b1106 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -536,6 +536,7 @@ + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index eb6e2461cc..eff916b552 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -535,6 +535,7 @@ Examples for medium ID detection: + -- 2.20.1