Fixes user option management-related issues in pure WCF installation
authorMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 08:16:49 +0000 (10:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 7 May 2013 08:16:49 +0000 (10:16 +0200)
Closes #1244
Closes #1245

wcfsetup/install/files/acp/templates/userOptionAdd.tpl
wcfsetup/install/files/acp/templates/userOptionSetDefaults.tpl
wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 7d90472ae424c95275e27599967a3111f2f2d48a..6cab6f72b5efd6655eb7a9f1b39d0e4ff92bc305 100644 (file)
        </nav>
 </div>
 
-<form method="post" action="{if $action == 'add'}{link controller='UserOptionAdd'}{/link}{else}{link controller='UserOptionEdit' id=$optionID}{/link}{/if}">
-       <div class="container containerPadding marginTop">
-               <fieldset>
-                       <legend>{lang}wcf.global.form.data{/lang}</legend>
-                       
-                       <dl{if $errorField == 'optionName'} class="formError"{/if}>
-                               <dt><label for="optionName">{lang}wcf.global.name{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="optionName" name="optionName" value="{$optionName}" required="required" autofocus="autofocus" class="long" />
-                                       {if $errorField == 'optionName'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.name.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                               </dd>
-                       </dl>
-                       {include file='multipleLanguageInputJavascript' elementIdentifier='optionName' forceSelection=true}
-                       
-                       <dl{if $errorField == 'optionDescription'} class="formError"{/if}>
-                               <dt><label for="optionDescription">{lang}wcf.acp.user.option.description{/lang}</label></dt>
-                               <dd>
-                                       <textarea name="optionDescription" id="optionDescription" cols="40" rows="10">{$optionDescription}</textarea>
-                                       {if $errorField == 'optionDescription'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.description.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                               </dd>
-                       </dl>
-                       {include file='multipleLanguageInputJavascript' elementIdentifier='optionDescription' forceSelection=true}
-                       
-                       <dl{if $errorField == 'categoryName'} class="formError"{/if}>
-                               <dt><label for="categoryName">{lang}wcf.acp.user.option.categoryName{/lang}</label></dt>
-                               <dd>
-                                       <select name="categoryName" id="categoryName">
-                                               {foreach from=$availableCategories item=availableCategory}
-                                                       <option value="{$availableCategory->categoryName}"{if $availableCategory->categoryName == $categoryName} selected="selected"{/if}>{lang}wcf.user.option.category.{$availableCategory->categoryName}{/lang}</option>
-                                               {/foreach}
-                                       </select>
+{if !$availableCategories|empty}
+       <form method="post" action="{if $action == 'add'}{link controller='UserOptionAdd'}{/link}{else}{link controller='UserOptionEdit' id=$optionID}{/link}{/if}">
+               <div class="container containerPadding marginTop">
+                       <fieldset>
+                               <legend>{lang}wcf.global.form.data{/lang}</legend>
+                               
+                               <dl{if $errorField == 'optionName'} class="formError"{/if}>
+                                       <dt><label for="optionName">{lang}wcf.global.name{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" id="optionName" name="optionName" value="{$optionName}" required="required" autofocus="autofocus" class="long" />
+                                               {if $errorField == 'optionName'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.name.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               {include file='multipleLanguageInputJavascript' elementIdentifier='optionName' forceSelection=true}
+                               
+                               <dl{if $errorField == 'optionDescription'} class="formError"{/if}>
+                                       <dt><label for="optionDescription">{lang}wcf.acp.user.option.description{/lang}</label></dt>
+                                       <dd>
+                                               <textarea name="optionDescription" id="optionDescription" cols="40" rows="10">{$optionDescription}</textarea>
+                                               {if $errorField == 'optionDescription'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.description.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               {include file='multipleLanguageInputJavascript' elementIdentifier='optionDescription' forceSelection=true}
+                               
+                               <dl{if $errorField == 'categoryName'} class="formError"{/if}>
+                                       <dt><label for="categoryName">{lang}wcf.acp.user.option.categoryName{/lang}</label></dt>
+                                       <dd>
+                                               <select name="categoryName" id="categoryName">
+                                                       {foreach from=$availableCategories item=availableCategory}
+                                                               <option value="{$availableCategory->categoryName}"{if $availableCategory->categoryName == $categoryName} selected="selected"{/if}>{lang}wcf.user.option.category.{$availableCategory->categoryName}{/lang}</option>
+                                                       {/foreach}
+                                               </select>
+                                               
+                                               {if $errorField == 'categoryName'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.categoryName.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dt><label for="showOrder">{lang}wcf.acp.user.option.showOrder{/lang}</label></dt>
+                                       <dd>
+                                               <input type="number" id="showOrder" name="showOrder" value="{@$showOrder}" class="short" />
+                                       </dd>
+                               </dl>
+                               
+                               {event name='dataFields'}
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.user.option.typeData{/lang}</legend>
+                               
+                               <dl{if $errorField == 'optionType'} class="formError"{/if}>
+                                       <dt><label for="optionType">{lang}wcf.acp.user.option.optionType{/lang}</label></dt>
+                                       <dd>
+                                               <select name="optionType" id="optionType">
+                                                       {foreach from=$availableOptionTypes item=availableOptionType}
+                                                               <option value="{$availableOptionType}"{if $availableOptionType == $optionType} selected="selected"{/if}>{$availableOptionType}</option>
+                                                       {/foreach}
+                                               </select>
+                                               {if $errorField == 'optionType'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.optionType.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.user.option.optionType{/lang}</small>
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dt><label for="defaultValue">{lang}wcf.acp.user.option.defaultValue{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" id="defaultValue" name="defaultValue" value="{$defaultValue}" class="long" />
+                                               <small>{lang}wcf.acp.user.option.defaultValue.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               
+                               <dl{if $errorField == 'selectOptions'} class="formError"{/if}>
+                                       <dt><label for="selectOptions">{lang}wcf.acp.user.option.selectOptions{/lang}</label></dt>
+                                       <dd>
+                                               <textarea name="selectOptions" id="selectOptions" cols="40" rows="10">{$selectOptions}</textarea>
+                                               {if $errorField == 'selectOptions'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.selectOptions.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.user.option.selectOptions.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               
+                               <dl{if $errorField == 'outputClass'} class="formError"{/if}>
+                                       <dt><label for="outputClass">{lang}wcf.acp.user.option.outputClass{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" id="outputClass" name="outputClass" value="{$outputClass}" class="long" />
+                                               {if $errorField == 'outputClass'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.outputClass.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.user.option.outputClass.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               
+                               {event name='typeDataFields'}
+                       </fieldset>
+                       
+                       <fieldset>
+                               <legend>{lang}wcf.acp.user.option.access{/lang}</legend>
+                               
+                               <dl>
+                                       <dt><label for="editable">{lang}wcf.acp.user.option.editable{/lang}</label></dt>
+                                       <dd>
+                                               <select name="editable" id="editable">
+                                                       <option value="1"{if $editable == 1} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.1{/lang}</option>
+                                                       <option value="2"{if $editable == 2} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.2{/lang}</option>
+                                                       <option value="3"{if $editable == 3} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.3{/lang}</option>
+                                               </select>
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dt><label for="visible">{lang}wcf.acp.user.option.visible{/lang}</label></dt>
+                                       <dd>
+                                               <select name="visible" id="visible">
+                                                       <option value="1"{if $visible == 1} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.1{/lang}</option>
+                                                       <option value="2"{if $visible == 2} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.2{/lang}</option>
+                                                       <option value="3"{if $visible == 3} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.3{/lang}</option>
+                                                       <option value="7"{if $visible == 7} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.7{/lang}</option>
+                                                       <option value="15"{if $visible == 15} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.15{/lang}</option>
+                                               </select>
+                                       </dd>
+                               </dl>
+                               
+                               <dl{if $errorField == 'validationPattern'} class="formError"{/if}>
+                                       <dt><label for="validationPattern">{lang}wcf.acp.user.option.validationPattern{/lang}</label></dt>
+                                       <dd>
+                                               <input type="text" id="validationPattern" name="validationPattern" value="{$validationPattern}" class="long" />
+                                               {if $errorField == 'validationPattern'}
+                                                       <small class="innerError">
+                                                               {if $errorType == 'empty'}
+                                                                       {lang}wcf.global.form.error.empty{/lang}
+                                                               {else}
+                                                                       {lang}wcf.acp.user.option.validationPattern.error.{@$errorType}{/lang}
+                                                               {/if}
+                                                       </small>
+                                               {/if}
+                                               <small>{lang}wcf.acp.user.option.validationPattern.description{/lang}</small>
+                                       </dd>
+                               </dl>
+                               
+                               <dl>
+                                       <dd>
+                                               <label><input type="checkbox" name="required" id="required" value="1" {if $required == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.required{/lang}</label>
+                                               <label><input type="checkbox" name="askDuringRegistration" id="askDuringRegistration" value="1" {if $askDuringRegistration == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.askDuringRegistration{/lang}</label>
+                                               <label><input type="checkbox" name="searchable" id="searchable" value="1" {if $searchable == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.searchable{/lang}</label>
+                                       </dd>
+                               </dl>
                                        
-                                       {if $errorField == 'categoryName'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.categoryName.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                               </dd>
-                       </dl>
-                       
-                       <dl>
-                               <dt><label for="showOrder">{lang}wcf.acp.user.option.showOrder{/lang}</label></dt>
-                               <dd>
-                                       <input type="number" id="showOrder" name="showOrder" value="{@$showOrder}" class="short" />
-                               </dd>
-                       </dl>
-                       
-                       {event name='dataFields'}
-               </fieldset>
-               
-               <fieldset>
-                       <legend>{lang}wcf.acp.user.option.typeData{/lang}</legend>
-                       
-                       <dl{if $errorField == 'optionType'} class="formError"{/if}>
-                               <dt><label for="optionType">{lang}wcf.acp.user.option.optionType{/lang}</label></dt>
-                               <dd>
-                                       <select name="optionType" id="optionType">
-                                               {foreach from=$availableOptionTypes item=availableOptionType}
-                                                       <option value="{$availableOptionType}"{if $availableOptionType == $optionType} selected="selected"{/if}>{$availableOptionType}</option>
-                                               {/foreach}
-                                       </select>
-                                       {if $errorField == 'optionType'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.optionType.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.user.option.optionType{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       <dl>
-                               <dt><label for="defaultValue">{lang}wcf.acp.user.option.defaultValue{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="defaultValue" name="defaultValue" value="{$defaultValue}" class="long" />
-                                       <small>{lang}wcf.acp.user.option.defaultValue.description{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       <dl{if $errorField == 'selectOptions'} class="formError"{/if}>
-                               <dt><label for="selectOptions">{lang}wcf.acp.user.option.selectOptions{/lang}</label></dt>
-                               <dd>
-                                       <textarea name="selectOptions" id="selectOptions" cols="40" rows="10">{$selectOptions}</textarea>
-                                       {if $errorField == 'selectOptions'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.selectOptions.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.user.option.selectOptions.description{/lang}</small>
-                               </dd>
-                       </dl>
+                               {event name='accessFields'}
+                       </fieldset>
                        
-                       <dl{if $errorField == 'outputClass'} class="formError"{/if}>
-                               <dt><label for="outputClass">{lang}wcf.acp.user.option.outputClass{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="outputClass" name="outputClass" value="{$outputClass}" class="long" />
-                                       {if $errorField == 'outputClass'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.outputClass.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.user.option.outputClass.description{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       {event name='typeDataFields'}
-               </fieldset>
+                       {event name='fieldsets'}
+               </div>
                
-               <fieldset>
-                       <legend>{lang}wcf.acp.user.option.access{/lang}</legend>
-                       
-                       <dl>
-                               <dt><label for="editable">{lang}wcf.acp.user.option.editable{/lang}</label></dt>
-                               <dd>
-                                       <select name="editable" id="editable">
-                                               <option value="1"{if $editable == 1} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.1{/lang}</option>
-                                               <option value="2"{if $editable == 2} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.2{/lang}</option>
-                                               <option value="3"{if $editable == 3} selected="selected"{/if}>{lang}wcf.acp.user.option.editable.3{/lang}</option>
-                                       </select>
-                               </dd>
-                       </dl>
-                       
-                       <dl>
-                               <dt><label for="visible">{lang}wcf.acp.user.option.visible{/lang}</label></dt>
-                               <dd>
-                                       <select name="visible" id="visible">
-                                               <option value="1"{if $visible == 1} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.1{/lang}</option>
-                                               <option value="2"{if $visible == 2} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.2{/lang}</option>
-                                               <option value="3"{if $visible == 3} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.3{/lang}</option>
-                                               <option value="7"{if $visible == 7} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.7{/lang}</option>
-                                               <option value="15"{if $visible == 15} selected="selected"{/if}>{lang}wcf.acp.user.option.visible.15{/lang}</option>
-                                       </select>
-                               </dd>
-                       </dl>
-                       
-                       <dl{if $errorField == 'validationPattern'} class="formError"{/if}>
-                               <dt><label for="validationPattern">{lang}wcf.acp.user.option.validationPattern{/lang}</label></dt>
-                               <dd>
-                                       <input type="text" id="validationPattern" name="validationPattern" value="{$validationPattern}" class="long" />
-                                       {if $errorField == 'validationPattern'}
-                                               <small class="innerError">
-                                                       {if $errorType == 'empty'}
-                                                               {lang}wcf.global.form.error.empty{/lang}
-                                                       {else}
-                                                               {lang}wcf.acp.user.option.validationPattern.error.{@$errorType}{/lang}
-                                                       {/if}
-                                               </small>
-                                       {/if}
-                                       <small>{lang}wcf.acp.user.option.validationPattern.description{/lang}</small>
-                               </dd>
-                       </dl>
-                       
-                       <dl>
-                               <dd>
-                                       <label><input type="checkbox" name="required" id="required" value="1" {if $required == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.required{/lang}</label>
-                                       <label><input type="checkbox" name="askDuringRegistration" id="askDuringRegistration" value="1" {if $askDuringRegistration == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.askDuringRegistration{/lang}</label>
-                                       <label><input type="checkbox" name="searchable" id="searchable" value="1" {if $searchable == 1}checked="checked" {/if}/> {lang}wcf.acp.user.option.searchable{/lang}</label>
-                               </dd>
-                       </dl>
-                       
-                       {event name='accessFields'}
-               </fieldset>
-               
-               {event name='fieldsets'}
-       </div>
-       
-       <div class="formSubmit">
-               <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
-       </div>
-</form>
-
+               <div class="formSubmit">
+                       <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
+               </div>
+       </form>
+{else}
+       <p class="info">{lang}wcf.acp.user.option.add.noCategories{/lang}</p>
+{/if}
 
 {include file='footer'}
index 8233776fafd4b3adaaeaaa6185697ed8fa83642c..7efd4d7043b2839248a8eb2f97d00dab3ccfa84c 100644 (file)
@@ -12,8 +12,8 @@
        <p class="success">{lang}wcf.global.success.edit{/lang}</p>
 {/if}
 
-{hascontent}
-       <div class="contentNavigation">
+<div class="contentNavigation">
+       {hascontent}
                <nav>
                        <ul>
                                {content}
                                {/content}
                        </ul>
                </nav>
-       </div>
-{/hascontent}
+       {/hascontent}
+</div>
 
-<form method="post" action="{link controller='UserOptionSetDefaults'}{/link}">
-       <div class="container containerPadding marginTop">
-               <fieldset>
-                       <dl>
-                               <dd>
-                                       <label><input type="checkbox" name="applyChangesToExistingUsers" value="1" {if $applyChangesToExistingUsers}checked="checked" {/if}/> {lang}wcf.acp.user.option.setDefaults.applyChangesToExistingUsers{/lang}</label>
-                                       <small>{lang}wcf.acp.user.option.setDefaults.applyChangesToExistingUsers.description{/lang}</small>     
-                               </dd>
-                       </dl>
-               </fieldset>
-               
-               {foreach from=$optionTree[0][categories] item=optionCategory}
+{if !$optionTree|empty}
+       <form method="post" action="{link controller='UserOptionSetDefaults'}{/link}">
+               <div class="container containerPadding marginTop">
                        <fieldset>
-                               <legend>{lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang}</legend>
-                               
-                               {include file='optionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'}
-                               
-                               {if $optionCategory[categories]|count}
-                                       {foreach from=$optionCategory[categories] item=optionCategory2}
-                                               {include file='optionFieldList' options=$optionCategory2[options] langPrefix='wcf.user.option.'}
-                                       {/foreach}
-                               {/if}
+                               <dl>
+                                       <dd>
+                                               <label><input type="checkbox" name="applyChangesToExistingUsers" value="1" {if $applyChangesToExistingUsers}checked="checked" {/if}/> {lang}wcf.acp.user.option.setDefaults.applyChangesToExistingUsers{/lang}</label>
+                                               <small>{lang}wcf.acp.user.option.setDefaults.applyChangesToExistingUsers.description{/lang}</small>     
+                                       </dd>
+                               </dl>
                        </fieldset>
-               {/foreach}
+                       
+                       {foreach from=$optionTree[0][categories] item=optionCategory}
+                               <fieldset>
+                                       <legend>{lang}wcf.user.option.category.{@$optionCategory[object]->categoryName}{/lang}</legend>
+                                       
+                                       {include file='optionFieldList' options=$optionCategory[options] langPrefix='wcf.user.option.'}
+                                       
+                                       {if $optionCategory[categories]|count}
+                                               {foreach from=$optionCategory[categories] item=optionCategory2}
+                                                       {include file='optionFieldList' options=$optionCategory2[options] langPrefix='wcf.user.option.'}
+                                               {/foreach}
+                                       {/if}
+                               </fieldset>
+                       {/foreach}
+                       
+                       {event name='fieldsets'}
+               </div>
                
-               {event name='fieldsets'}
-       </div>
-       
-       <div class="formSubmit">
-               <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
-       </div>
-</form>
+               <div class="formSubmit">
+                       <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
+               </div>
+       </form>
+{else}
+       <p class="info">{lang}wcf.acp.user.option.noItems{/lang}</p>
+{/if}
 
 {include file='footer'}
index aef6617a2e87207d4ffb00147dbedd6c0bcf053f..f672733e871d830b5f50d0ab68fdc55322e955af 100644 (file)
@@ -43,7 +43,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
         */
        public function readParameters() {
                parent::readParameters();
-       
+               
                $this->optionHandler = new UserOptionHandler(false, '', 'settings');
                $this->optionHandler->init();
        }
@@ -64,7 +64,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
         */
        public function validate() {
                parent::validate();
-       
+               
                $this->optionHandler->validate();
        }
        
@@ -73,7 +73,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
         */
        public function save() {
                parent::save();
-       
+               
                // get new values
                $saveOptions = $this->optionHandler->save();
                
@@ -115,7 +115,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
                // reset cache
                UserOptionCacheBuilder::getInstance()->reset();
                $this->saved();
-       
+               
                WCF::getTPL()->assign('success', true);
        }
        
@@ -124,7 +124,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
         */
        public function readData() {
                parent::readData();
-       
+               
                if (empty($_POST)) {
                        $this->optionHandler->readData();
                }
@@ -135,7 +135,7 @@ class UserOptionSetDefaultsForm extends AbstractForm {
         */
        public function assignVariables() {
                parent::assignVariables();
-       
+               
                WCF::getTPL()->assign(array(
                        'optionTree' => $this->optionHandler->getOptionTree(),
                        'applyChangesToExistingUsers' => $this->applyChangesToExistingUsers
index d53a73973a2123045f2a5525c68527ae75dda61a..cf70903fa9f453cfb6bdcf9b46cce162f075b5e5 100644 (file)
                <item name="wcf.user.option.error.validationFailed"><![CDATA[Sie haben einen ungültigen Inhalt eingegeben.]]></item>
                <item name="wcf.user.error.isBanned"><![CDATA[Ihr Benutzeraccount wurde gesperrt{if $__wcf->user->banReason}: {@$__wcf->user->banReason|htmlspecialchars|nl2br}{else}.{/if}]]></item>
        </category>
+       
+       <category name="wcf.user.option"></category>
 </language>
index 8dbf6569655b17b8c11946101f0149d456705a46..4a698e47bf4a770a2b5958e31ccf770946c6ead0 100644 (file)
                <item name="wcf.user.option.error.validationFailed"><![CDATA[Entered text is invalid.]]></item>
                <item name="wcf.user.error.isBanned"><![CDATA[Your user account has been banned{if $__wcf->user->banReason}: {@$__wcf->user->banReason|htmlspecialchars|nl2br}{else}.{/if}]]></item>
        </category>
+       
+       <category name="wcf.user.option"></category>
 </language>