Prevent changing the field type of profile fields
authorMarcel Werk <burntime@woltlab.com>
Sun, 24 Feb 2019 15:27:31 +0000 (16:27 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sun, 24 Feb 2019 15:27:31 +0000 (16:27 +0100)
Closes #2853

wcfsetup/install/files/acp/templates/userOptionAdd.tpl
wcfsetup/install/files/lib/acp/form/UserOptionEditForm.class.php

index d86ee270341f6b1e174990b87983248cace30931..df8f6fcc1a749f03f9c998b4437b633da82bf3e8 100644 (file)
                        <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"{if $action === 'edit' && $userOption->optionName === 'aboutMe'} disabled{/if}>
+                                       <select name="optionType" id="optionType"{if $action === 'edit'} disabled{/if}>
                                                {foreach from=$availableOptionTypes item=availableOptionType}
                                                        <option value="{$availableOptionType}"{if $availableOptionType == $optionType} selected{/if}>{$availableOptionType}</option>
                                                {/foreach}
index 2ed4699092e849d73bf94ab70adc120890c54494..1c05d541b9c0d8a9cbe2ad91cf6a14c1f8476f01 100644 (file)
@@ -56,9 +56,7 @@ class UserOptionEditForm extends UserOptionAddForm {
        public function readFormParameters() {
                parent::readFormParameters();
                
-               if ($this->userOption->optionName === 'aboutMe') {
-                       $this->optionType = 'aboutMe';
-               }
+               $this->optionType = $this->userOption->optionType;
        }
        
        /**