From: Alexander Ebert Date: Sat, 2 Jul 2016 12:04:07 +0000 (+0200) Subject: Label group for labels is now permanent X-Git-Tag: 3.0.0_Beta_1~1274 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2498a7762024d3464844b8d0511879ad934f4286;p=GitHub%2FWoltLab%2FWCF.git Label group for labels is now permanent --- 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: +