Fix error message if no valid user group is selected for automatic assignment
authorMatthias Schmidt <gravatronics@live.com>
Sat, 21 May 2016 06:51:24 +0000 (08:51 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 21 May 2016 06:51:24 +0000 (08:51 +0200)
wcfsetup/install/files/acp/templates/userGroupAssignmentAdd.tpl
wcfsetup/install/files/lib/acp/form/UserGroupAssignmentAddForm.class.php

index 8f28e8da55c4ba242a6d75e6e77b9e707605ff0c..a411d19f39a500f075304563aefad26c2f9303b8 100644 (file)
                                <dd>
                                        {htmlOptions name='groupID' options=$userGroups selected=$groupID}
                                        {if $errorField == 'groupID'}
-                                               <small class="innerError">{lang}wcf.acp.group.assignment.groupID.error.{@$errorType}{/lang}</small>
+                                               {if $errorType == 'noValidSelection'}
+                                                       <small class="innerError">{lang}wcf.global.form.error.noValidSelection{/lang}</small>
+                                               {else}
+                                                       <small class="innerError">{lang}wcf.acp.group.assignment.groupID.error.{@$errorType}{/lang}</small>
+                                               {/if}
+                                               
                                        {/if}
                                </dd>
                        </dl>
index d72f3758f675b8c6278496729db223037a90985a..362965a9142629670f227df391927d1123dc1e77 100644 (file)
@@ -170,7 +170,7 @@ class UserGroupAssignmentAddForm extends AbstractForm {
                }
                
                if (!isset($this->userGroups[$this->groupID])) {
-                       throw new UserInputException('groupID', 'notValid');
+                       throw new UserInputException('groupID', 'noValidSelection');
                }
                
                $hasData = false;