Added user ban function
authorMarcel Werk <burntime@woltlab.com>
Mon, 29 Apr 2013 23:01:58 +0000 (01:01 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 29 Apr 2013 23:01:58 +0000 (01:01 +0200)
wcfsetup/install/files/acp/templates/userAdd.tpl
wcfsetup/install/files/acp/templates/userList.tpl
wcfsetup/install/files/acp/templates/userSearch.tpl
wcfsetup/install/files/lib/acp/form/UserEditForm.class.php
wcfsetup/install/files/style/layout.less
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index f46e85ca7a9555d783531eb2f727b1369ae081f8..638bc0b99b2dd514118cb701b7d8086d5cc42baf 100644 (file)
@@ -44,6 +44,8 @@
                                {foreach from=$optionTree item=categoryLevel1}
                                        <li><a href="{@$__wcf->getAnchor($categoryLevel1[object]->categoryName)}">{lang}wcf.user.option.category.{@$categoryLevel1[object]->categoryName}{/lang}</a></li>
                                {/foreach}
+                               
+                               {event name='tabMenuTabs'}
                        </ul>
                </nav>
                
                                        {event name='passwordFields'}
                                </fieldset>
                        {/if}
+                       
+                       {if $action == 'edit'}
+                               <fieldset>
+                                       <legend>{lang}wcf.acp.user.banUser{/lang}</legend>
+                                       
+                                       <dl>
+                                               <dd>
+                                                       <label><input type="checkbox" id="banned" name="banned" value="1" {if $banned == 1}checked="checked" {/if}/> {lang}wcf.acp.user.banUser{/lang}</label>
+                                                       <small>{lang}wcf.acp.user.banUser.description{/lang}</small>    
+                                               </dd>
+                                       </dl>
+                                       
+                                       <dl>
+                                               <dt><label for="banReason">{lang}wcf.acp.user.banReason{/lang}</label></dt>
+                                               <dd>
+                                                       <textarea name="banReason" id="banReason" cols="40" rows="10">{$banReason}</textarea>
+                                                       <small>{lang}wcf.acp.user.banReason.description{/lang}</small>
+                                               </dd>
+                                       </dl>
+                                       
+                                       {event name='banFields'}
+                               </fieldset>
+                               
+                               <script type="text/javascript">
+                                       //<![CDATA[
+                                       $('#banned').change(function (event) {
+                                               if ($('#banned').is(':checked')) {
+                                                       $('#banReason').attr('readonly', false);
+                                               }
+                                               else {
+                                                       $('#banReason').attr('readonly', true);
+                                               }
+                                       });
+                                       $('#banned').change();
+                                       //]]>
+                               </script>
+                       {/if}
+                       
+                       {event name='fieldsets'}
                </div>
                
                {foreach from=$optionTree item=categoryLevel1}
                                {/foreach}
                        </div>
                {/foreach}
+               
+               {event name='tabMenuContent'}
        </div>
        
        <div class="formSubmit">
index a14561cdf99a97d7a22e051a042f9bd403309ab2..d31ebbe600bdb5aacdef2280007230fede222e48 100644 (file)
        </nav>
 </div>
 
-<div id="userTableContainer" class="tabularBox marginTop">
-       <nav class="menu">
-               <ul>
-                       <li{if $action == ''} class="active"{/if}><a href="{link controller='UserList'}{/link}"><span>{lang}wcf.acp.user.list.all{/lang}</span> <span class="wcf-badge" title="{lang}wcf.acp.user.list.count{/lang}">{#$items}</span></a></li>
-                       
-                       {event name='userListOptions'}
-               </ul>
-       </nav>
-       
-       {hascontent}
+{if $users|count}
+       <div id="userTableContainer" class="tabularBox tabularBoxTitle marginTop">
+               <header>
+                       <h2>{lang}wcf.acp.user.list{/lang} <span class="badge badgeInverse">{#$items}</span></h2>
+               </header>
+               
                <table data-type="com.woltlab.wcf.user" class="table jsClipboardContainer">
                        <thead>
                                <tr>
@@ -64,7 +60,7 @@
                                        <th class="columnTitle columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.user.username{/lang}</a></th>
                                        
                                        {foreach from=$columnHeads key=column item=columnLanguageVariable}
-                                               <th class="column{$column|ucfirst}{if $sortField == $column} active{/if}"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField={$column}&sortOrder={if $sortField == $column && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}{$columnLanguageVariable}{/lang}{if $sortField == $column} <span class="icon icon16 icon-sort-{@$sortOrder}"></span>{/if}</a></th>
+                                               <th class="column{$column|ucfirst}{if $sortField == $column} active {@$sortOrder}{/if}"><a href="{link controller='UserList'}searchID={@$searchID}&action={@$encodedAction}&pageNo={@$pageNo}&sortField={$column}&sortOrder={if $sortField == $column && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}{$columnLanguageVariable}{/lang}</a></th>
                                        {/foreach}
                                        
                                        {event name='columnHeads'}
                        </thead>
                        
                        <tbody>
-                               {content}
-                                       {foreach from=$users item=user}
-                                               <tr class="jsUserRow">
-                                                       <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$user->userID}" /></td>
-                                                       <td class="columnIcon">
-                                                               {if $user->editable}
-                                                                       <a href="{link controller='UserEdit' id=$user->userID}{/link}" title="{lang}wcf.acp.user.edit{/lang}" class="jsTooltip"><span class="icon icon16 icon-pencil"></span></a>
-                                                               {else}
-                                                                       <span class="icon icon16 icon-pencil disabled" title="{lang}wcf.acp.user.edit{/lang}"></span>
-                                                               {/if}
-                                                               {if $user->deletable}
-                                                                       <span class="icon icon16 icon-remove jsTooltip jsDeleteButton pointer" title="{lang}wcf.acp.user.delete{/lang}" data-object-id="{@$user->userID}" data-confirm-message="{lang}wcf.acp.user.delete.sure{/lang}"></span>
-                                                               {else}
-                                                                       <span class="icon icon16 icon-remove disabled" title="{lang}wcf.acp.user.delete{/lang}"></span>
-                                                               {/if}
-                                                               
-                                                               {event name='rowButtons'}
-                                                       </td>
-                                                       <td class="columnID columnUserID">{@$user->userID}</td>
-                                                       <td class="columnTitle columnUsername">{if $user->editable}<a title="{lang}wcf.acp.user.edit{/lang}" href="{link controller='UserEdit' id=$user->userID}{/link}">{$user->username}</a>{else}{$user->username}{/if}</td>
-                                                       
-                                                       {foreach from=$columnHeads key=column item=columnLanguageVariable}
-                                                               <td class="column{$column|ucfirst}">{if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]}{/if}</td>
-                                                       {/foreach}
+                               {foreach from=$users item=user}
+                                       <tr class="jsUserRow">
+                                               <td class="columnMark"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$user->userID}" /></td>
+                                               <td class="columnIcon">
+                                                       {if $user->editable}
+                                                               <a href="{link controller='UserEdit' id=$user->userID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 icon-pencil"></span></a>
+                                                       {else}
+                                                               <span class="icon icon16 icon-pencil disabled" title="{lang}wcf.global.button.edit{/lang}"></span>
+                                                       {/if}
+                                                       {if $user->deletable}
+                                                               <span class="icon icon16 icon-remove jsTooltip jsDeleteButton pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$user->userID}" data-confirm-message="{lang}wcf.acp.user.delete.sure{/lang}"></span>
+                                                       {else}
+                                                               <span class="icon icon16 icon-remove disabled" title="{lang}wcf.global.button.delete{/lang}"></span>
+                                                       {/if}
                                                        
-                                                       {event name='columns'}
-                                               </tr>
-                                       {/foreach}
-                               {/content}
+                                                       {event name='rowButtons'}
+                                               </td>
+                                               <td class="columnID columnUserID">{@$user->userID}</td>
+                                               <td class="columnTitle columnUsername">{if $user->editable}<a title="{lang}wcf.acp.user.edit{/lang}" href="{link controller='UserEdit' id=$user->userID}{/link}">{$user->username}</a>{else}{$user->username}{/if}</td>
+                                               
+                                               {foreach from=$columnHeads key=column item=columnLanguageVariable}
+                                                       <td class="column{$column|ucfirst}">{if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]}{/if}</td>
+                                               {/foreach}
+                                               
+                                               {event name='columns'}
+                                       </tr>
+                               {/foreach}
                        </tbody>
                </table>
        </div>
-       
+               
        <div class="contentNavigation">
                {@$pagesLinks}
                
                
                <nav class="jsClipboardEditor" data-types="[ 'com.woltlab.wcf.user' ]"></nav>
        </div>
-{hascontentelse}
-</div>
-
-<p class="info">{lang}wcf.acp.user.search.error.noMatches{/lang}</p>
-{/hascontent}
+{else}
+       <p class="info">{lang}wcf.acp.user.search.error.noMatches{/lang}</p>
+{/if}
 
 {include file='footer'}
index 65a5e5fd0fb9c0e94b7dce2cf06cd81e4bbf6fab..be594950e9bc61443d274c42f1d0c51e633c6953 100644 (file)
 </div>
 
 <form method="post" action="{link controller='UserSearch'}{/link}">
-       <div class="container containerPadding marginTop">
-               <fieldset>
-                       <legend>{lang}wcf.acp.user.search.conditions.general{/lang}</legend>
-                       
-                       <dl>
-                               <dt><label for="username">{lang}wcf.user.username{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="username" name="username" value="{$username}" class="medium" />
-                               </dd>
-                       </dl>
-                       
-                       <dl>
-                               <dt><label for="userID">{lang}wcf.user.userID{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="userID" name="userID" value="{$userID}" class="short" />
-                               </dd>
-                       </dl>
-                       
-                       {if $__wcf->session->getPermission('admin.user.canEditMailAddress')}
-                               <dl>
-                                       <dt><label for="email">{lang}wcf.user.email{/lang}</label></dt>
-                                       <dd>
-                                               <input type="email" id="email" name="email" value="{$email}" class="medium" />
-                                       </dd>
-                               </dl>
-                       {/if}
-                       
-                       {if $availableGroups|count}
+       <div class="tabMenuContainer">
+               <nav class="tabMenu">
+                       <ul>
+                               <li><a href="{@$__wcf->getAnchor('__general')}">{lang}wcf.acp.user.search.conditions.general{/lang}</a></li>
+                               
+                               {if $optionTree|count}
+                                       <li><a href="{@$__wcf->getAnchor('profile')}">{lang}wcf.acp.user.search.conditions.profile{/lang}</a></li>
+                               {/if}
+                               
+                               {event name='tabMenuTabs'}
+                               
+                               <li><a href="{@$__wcf->getAnchor('resultOptions')}">{lang}wcf.acp.user.search.display{/lang}</a></li>
+                       </ul>
+               </nav>
+               
+               <div id="__general" class="container containerPadding tabMenuContent hidden">
+                       <fieldset>
+                               <legend>{lang}wcf.acp.user.search.conditions.general{/lang}</legend>
+                               
                                <dl>
-                                       <dt>
-                                               <label>{lang}wcf.acp.user.groups{/lang}</label>
-                                       </dt>
+                                       <dt><label for="username">{lang}wcf.user.username{/lang}</label></dt>
                                        <dd>
-                                               {htmlCheckboxes options=$availableGroups name='groupIDs' selected=$groupIDs}
-                                                       
-                                               <!-- ToDo --><label style="margin-top: 10px"><input type="checkbox" name="invertGroupIDs" value="1" {if $invertGroupIDs == 1}checked="checked" {/if}/> {lang}wcf.acp.user.groups.invertSearch{/lang}</label>
+                                               <input type="text" id="username" name="username" value="{$username}" class="medium" />
                                        </dd>
                                </dl>
-                       {/if}
-                       
-                       {if $availableLanguages|count > 1}
+                               
                                <dl>
-                                       <dt>
-                                               <label>{lang}wcf.user.language{/lang}</label>
-                                       </dt>
+                                       <dt><label for="userID">{lang}wcf.user.userID{/lang}</label></dt>
                                        <dd>
-                                               {htmlCheckboxes options=$availableLanguages name='languageIDs' selected=$languageIDs disableEncoding=true}
+                                               <input type="text" id="userID" name="userID" value="{$userID}" class="short" />
                                        </dd>
                                </dl>
-                       {/if}
-                       
-                       {event name='generalFields'}
-               </fieldset>
-               
-               {event name='fieldsets'}
-               
-               <div class="tabMenuContainer">
-                       <nav class="tabMenu">
-                               <ul>
-                                       {if $optionTree|count}
-                                               <li><a href="{@$__wcf->getAnchor('profile')}">{lang}wcf.acp.user.search.conditions.profile{/lang}</a></li>
-                                       {/if}
-                                       
-                                       {event name='tabMenuTabs'}
-                                       
-                                       <li><a href="{@$__wcf->getAnchor('resultOptions')}">{lang}wcf.acp.user.search.display{/lang}</a></li>
-                               </ul>
-                       </nav>
-                       
-                       {if $optionTree|count}
-                               <div id="profile" class="container containerPadding tabMenuContent hidden">
-                                       {foreach from=$optionTree[0][categories] item=category}
-                                               <fieldset>
-                                                       <legend>{lang}wcf.user.option.category.{@$category[object]->categoryName}{/lang}</legend>
-                                                       {hascontent}<p>{content}{lang __optional=true}wcf.user.option.category.{@$category[object]->categoryName}.description{/lang}{/content}</p>{/hascontent}
-                                                       
-                                                       {include file='optionFieldList' options=$category[options] langPrefix='wcf.user.option.'}
-                                               </fieldset>
-                                       {/foreach}
-                                       
-                                       {event name='profileFieldsets'}
-                               </div>
-                       {/if}
-                       
-                       {event name='tabMenuContent'}
-                       
-                       <div id="resultOptions" class="container containerPadding tabMenuContent hidden">
-                               <fieldset>
-                                       <legend>{lang}wcf.acp.user.search.display.general{/lang}</legend>
-                                       
+                               
+                               {if $__wcf->session->getPermission('admin.user.canEditMailAddress')}
                                        <dl>
-                                               <dt><label for="sortField">{lang}wcf.acp.user.search.display.sort{/lang}</label></dt>
+                                               <dt><label for="email">{lang}wcf.user.email{/lang}</label></dt>
                                                <dd>
-                                                       <select id="sortField" name="sortField">
-                                                               <option value="userID"{if $sortField == 'userID'} selected="selected"{/if}>{lang}wcf.user.userID{/lang}</option>
-                                                               <option value="username"{if $sortField == 'username'} selected="selected"{/if}>{lang}wcf.user.username{/lang}</option>
-                                                               <option value="email"{if $sortField == 'email'} selected="selected"{/if}>{lang}wcf.user.email{/lang}</option>
-                                                               <option value="registrationDate"{if $sortField == 'registrationDate'} selected="selected"{/if}>{lang}wcf.user.registrationDate{/lang}</option>
-                                                               
-                                                               {if $additionalSortFields|isset}{@$additionalSortFields}{/if}
-                                                       </select>
+                                                       <input type="email" id="email" name="email" value="{$email}" class="medium" />
                                                </dd>
+                                       </dl>
+                               {/if}
+                               
+                               {if $availableGroups|count}
+                                       <dl>
+                                               <dt>
+                                                       <label>{lang}wcf.acp.user.groups{/lang}</label>
+                                               </dt>
                                                <dd>
-                                                       <select id="sortOrder" name="sortOrder">
-                                                               <option value="ASC"{if $sortOrder == 'ASC'} selected="selected"{/if}>{lang}wcf.global.sortOrder.ascending{/lang}</option>
-                                                               <option value="DESC"{if $sortOrder == 'DESC'} selected="selected"{/if}>{lang}wcf.global.sortOrder.descending{/lang}</option>
-                                                       </select>
+                                                       {htmlCheckboxes options=$availableGroups name='groupIDs' selected=$groupIDs}
+                                                               
+                                                       <!-- ToDo --><label style="margin-top: 10px"><input type="checkbox" name="invertGroupIDs" value="1" {if $invertGroupIDs == 1}checked="checked" {/if}/> {lang}wcf.acp.user.groups.invertSearch{/lang}</label>
                                                </dd>
                                        </dl>
-                                       
+                               {/if}
+                               
+                               {if $availableLanguages|count > 1}
                                        <dl>
-                                               <dt><label for="itemsPerPage">{lang}wcf.acp.user.search.display.itemsPerPage{/lang}</label></dt>
+                                               <dt>
+                                                       <label>{lang}wcf.user.language{/lang}</label>
+                                               </dt>
                                                <dd>
-                                                       <input type="text" id="itemsPerPage" name="itemsPerPage" value="{@$itemsPerPage}" class="short" />
+                                                       {htmlCheckboxes options=$availableLanguages name='languageIDs' selected=$languageIDs disableEncoding=true}
                                                </dd>
                                        </dl>
-                               </fieldset>
+                               {/if}
                                
-                               <fieldset>
-                                       <legend>{lang}wcf.acp.user.search.display.columns{/lang}</legend>
-                                       
-                                       {* TODO: Do we still want all this columns supported? *}
-                                       {*if $optionTree|count}
-                                               <dl>
-                                                       <dt>
-                                                               <label>{lang}wcf.acp.user.search.display.columns.profile{/lang}</label>
-                                                       </dt>
-                                                       <dd>
-                                                               {foreach from=$optionTree item=option}
-                                                                       <label><input type="checkbox" name="columns[]" value="{$option->optionName}" {if $option->optionName|in_array:$columns}checked="checked" {/if}/> {lang}wcf.user.option.{$option->optionName}{/lang}</label>
-                                                               {/foreach}
-                                                       </dd>
-                                               </dl>
-                                       {/if*}
-                                       
+                               {event name='generalFields'}
+                       </fieldset>
+               </div>
+               
+               {if $optionTree|count}
+                       <div id="profile" class="container containerPadding tabMenuContent hidden">
+                               {foreach from=$optionTree[0][categories] item=category}
+                                       <fieldset>
+                                               <legend>{lang}wcf.user.option.category.{@$category[object]->categoryName}{/lang}</legend>
+                                               {hascontent}<p>{content}{lang __optional=true}wcf.user.option.category.{@$category[object]->categoryName}.description{/lang}{/content}</p>{/hascontent}
+                                               
+                                               {include file='optionFieldList' options=$category[options] langPrefix='wcf.user.option.'}
+                                       </fieldset>
+                               {/foreach}
+                               
+                               {event name='profileFieldsets'}
+                       </div>
+               {/if}
+               
+               {event name='tabMenuContent'}
+               
+               <div id="resultOptions" class="container containerPadding tabMenuContent hidden">
+                       <fieldset>
+                               <legend>{lang}wcf.acp.user.search.display.general{/lang}</legend>
+                               
+                               <dl>
+                                       <dt><label for="sortField">{lang}wcf.acp.user.search.display.sort{/lang}</label></dt>
+                                       <dd>
+                                               <select id="sortField" name="sortField">
+                                                       <option value="userID"{if $sortField == 'userID'} selected="selected"{/if}>{lang}wcf.user.userID{/lang}</option>
+                                                       <option value="username"{if $sortField == 'username'} selected="selected"{/if}>{lang}wcf.user.username{/lang}</option>
+                                                       <option value="email"{if $sortField == 'email'} selected="selected"{/if}>{lang}wcf.user.email{/lang}</option>
+                                                       <option value="registrationDate"{if $sortField == 'registrationDate'} selected="selected"{/if}>{lang}wcf.user.registrationDate{/lang}</option>
+                                                       
+                                                       {if $additionalSortFields|isset}{@$additionalSortFields}{/if}
+                                               </select>
+                                               
+                                               <select id="sortOrder" name="sortOrder">
+                                                       <option value="ASC"{if $sortOrder == 'ASC'} selected="selected"{/if}>{lang}wcf.global.sortOrder.ascending{/lang}</option>
+                                                       <option value="DESC"{if $sortOrder == 'DESC'} selected="selected"{/if}>{lang}wcf.global.sortOrder.descending{/lang}</option>
+                                               </select>
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dt><label for="itemsPerPage">{lang}wcf.acp.user.search.display.itemsPerPage{/lang}</label></dt>
+                                       <dd>
+                                               <input type="number" id="itemsPerPage" name="itemsPerPage" value="{@$itemsPerPage}" class="tiny" />
+                                       </dd>
+                               </dl>
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.user.search.display.columns{/lang}</legend>
+                               
+                               {* TODO: Do we still want all this columns supported? *}
+                               {*if $optionTree|count}
                                        <dl>
-                                               <dt><label>{lang}wcf.acp.user.search.display.columns.other{/lang}</label></dt>
+                                               <dt>
+                                                       <label>{lang}wcf.acp.user.search.display.columns.profile{/lang}</label>
+                                               </dt>
                                                <dd>
-                                                       <label><input type="checkbox" name="columns[]" value="email" {if "email"|in_array:$columns}checked="checked" {/if}/> {lang}wcf.user.email{/lang}</label>
-                                                       <label><input type="checkbox" name="columns[]" value="registrationDate" {if "registrationDate"|in_array:$columns}checked="checked"{/if}/> {lang}wcf.user.registrationDate{/lang}</label>
+                                                       {foreach from=$optionTree item=option}
+                                                               <label><input type="checkbox" name="columns[]" value="{$option->optionName}" {if $option->optionName|in_array:$columns}checked="checked" {/if}/> {lang}wcf.user.option.{$option->optionName}{/lang}</label>
+                                                       {/foreach}
                                                </dd>
                                        </dl>
-                               </fieldset>
+                               {/if*}
                                
-                               {event name='resultOptionFieldsets'}
-                       </div>
+                               <dl>
+                                       <dt><label>{lang}wcf.acp.user.search.display.columns.other{/lang}</label></dt>
+                                       <dd>
+                                               <label><input type="checkbox" name="columns[]" value="email" {if "email"|in_array:$columns}checked="checked" {/if}/> {lang}wcf.user.email{/lang}</label>
+                                               <label><input type="checkbox" name="columns[]" value="registrationDate" {if "registrationDate"|in_array:$columns}checked="checked"{/if}/> {lang}wcf.user.registrationDate{/lang}</label>
+                                       </dd>
+                               </dl>
+                       </fieldset>
+                       
+                       {event name='resultOptionFieldsets'}
                </div>
        </div>
        
index d2e7c39ff2871fd0b1e47a701775a44439305822..f43fe121988c3ad67859a207f5c11e747ba42240 100755 (executable)
@@ -43,6 +43,18 @@ class UserEditForm extends UserAddForm {
         */
        public $user = null;
        
+       /**
+        * ban status
+        * @var boolean
+        */
+       public $banned = 0;
+       
+       /**
+        * ban reason
+        * @var string
+        */
+       public $banReason = '';
+       
        /**
         * @see wcf\page\IPage::readParameters()
         */
@@ -76,6 +88,9 @@ class UserEditForm extends UserAddForm {
                
                if (!WCF::getSession()->getPermission('admin.user.canEditPassword')) $this->password = $this->confirmPassword = '';
                if (!WCF::getSession()->getPermission('admin.user.canEditMailAddress')) $this->email = $this->confirmEmail = $this->user->email;
+               
+               if (!empty($_POST['banned'])) $this->banned = 1;
+               if (isset($_POST['banReason'])) $this->banReason = StringUtil::trim($_POST['banReason']);
        }
        
        /**
@@ -108,6 +123,8 @@ class UserEditForm extends UserAddForm {
                $this->email = $this->confirmEmail = $this->user->email;
                $this->groupIDs = $this->user->getGroupIDs(true);
                $this->languageID = $this->user->languageID;
+               $this->banned = $this->user->banned;
+               $this->banReason = $this->user->banReason;
        }
        
        /**
@@ -121,7 +138,9 @@ class UserEditForm extends UserAddForm {
                        'action' => 'edit',
                        'url' => '',
                        'markedUsers' => 0,
-                       'user' => $this->user
+                       'user' => $this->user,
+                       'banned' => $this->banned,
+                       'banReason' => $this->banReason
                ));
        }
        
@@ -149,6 +168,8 @@ class UserEditForm extends UserAddForm {
                                'username' => $this->username,
                                'email' => $this->email,
                                'password' => $this->password,
+                               'banned' => $this->banned,
+                               'banReason' => $this->banReason
                        )),
                        'groups' => $this->groupIDs,
                        'languages' => $this->visibleLanguages,
index ad3cae31bda5fbcd13b7ed4af1e6dcb1a4809668..50c7db05e1e28d833768fee52c39fc0f2bb887fe 100644 (file)
                        padding: @wcfGapSmall;
                        
                        > input[type="checkbox"] {
-                               margin: 0 3px;
+                               margin: -1px 3px 0;
                        }
                }
        }
index d69fbc9214b7e6173f5c9019ac0ff160e0f6ee66..2d69db590c8028bc264010504812d7b533c8844e 100644 (file)
                <item name="wcf.acp.user.add"><![CDATA[Benutzer hinzufügen]]></item>
                <item name="wcf.acp.user.assignToGroup"><![CDATA[Benutzergruppe zuweisen]]></item>
                <item name="wcf.acp.user.assignToGroup.markedUsers"><![CDATA[Folgende Benutzer den unten ausgewählten Benutzergruppen zuweisen]]></item>
+               <item name="wcf.acp.user.banUser"><![CDATA[Benutzer sperren]]></item>
+               <item name="wcf.acp.user.banUser.description"><![CDATA[Der Benutzer wird dauerhaft von der Nutzung aller Funktionen ausgeschlossen und erhält beim Aufruf der Seite eine entsprechende Fehlermeldung.]]></item>
+               <item name="wcf.acp.user.banReason"><![CDATA[Begründung]]></item>
+               <item name="wcf.acp.user.banReason.description"><![CDATA[Die Begründung wird dem gesperrten Benutzer beim Aufruf der Seite angezeigt.]]></item>
                <item name="wcf.acp.user.delete.sure"><![CDATA[Wollen Sie Benutzer „{$user->username}“ wirklich löschen?]]></item>
                <item name="wcf.acp.user.edit"><![CDATA[Benutzer bearbeiten]]></item>
                <item name="wcf.acp.user.edit.warning.selfEdit"><![CDATA[Sie bearbeiten Ihr eigenes Benutzerkonto. Änderungen an den Mitgliedschaften in Benutzergruppen können womöglich dazu führen, dass Sie aus der Administrationsoberfläche ausgeschlossen werden. Bitte seien Sie entsprechend vorsichtig!]]></item>
index d261a9ce41fe825848e619721627e022aa90b713..58c834ae548b89dc6dc06262e6948d92633c3f35 100644 (file)
                <item name="wcf.acp.user.add"><![CDATA[Add User]]></item>
                <item name="wcf.acp.user.assignToGroup"><![CDATA[Assign to User Group]]></item>
                <item name="wcf.acp.user.assignToGroup.markedUsers"><![CDATA[Assigning the following users to user groups selected below]]></item>
+               <item name="wcf.acp.user.banUser"><![CDATA[TODO: Benutzer sperren]]></item>
+               <item name="wcf.acp.user.banUser.description"><![CDATA[TODO: Der Benutzer wird dauerhaft von der Nutzung aller Funktionen ausgeschlossen und erhält beim Aufruf der Seite eine entsprechende Fehlermeldung.]]></item>
+               <item name="wcf.acp.user.banReason"><![CDATA[TODO: Begründung]]></item>
+               <item name="wcf.acp.user.banReason.description"><![CDATA[TODO: Die Begründung wird dem gesperrten Benutzer beim Aufruf der Seite angezeigt.]]></item>
                <item name="wcf.acp.user.delete.sure"><![CDATA[Do you really want to delete the user “{$user->username}”?]]></item>
                <item name="wcf.acp.user.edit"><![CDATA[Edit User]]></item>
                <item name="wcf.acp.user.edit.warning.selfEdit"><![CDATA[Heads up! You’re editing your own user account and changes might result in yourself being locked out from the Administration Control Panel.]]></item>