Feature #16339
closedAnnoying workin User > Setup
0%
Description
User > Setup has one quite annoying feature.
If administrator has been put some override options,
those options are still visible for the user.
Endeed they are dimmed, but IMO that is not enough.
If the user doesn't take account that labels are dimmed,
user might be quite annoyed and confused when
she/he founds that changes has no effect.
It would be reasonable to hide the features,
which has been overridden
In addition it would be nice to hide unwanted
option without actually override them. Except
personal data and language info such features would be
set into their default values.
Let’s add
setup.override.disableUserSetup.
That would be a comma separated list of hide able fields in
personal user setup
into
function main(…
$overrideProperties = t3lib_BEfunc::getModTSconfig($this->pageinfo['uid'],'setup.override');
$overrideProperties=$overrideProperties['properties'];
// get the data from disableUserSetup and make it an array
$typesForDisableSetupOptions = t3lib_div::trimExplode(',',strtolower($overrideProperties['disableUserSetup']),1);
$disableUserSetup = array_flip($typesForDisableSetupOptions);
…
if need to save some existing value hidden field, which gets the existing value
// Languages:
if(!isset($disableUserSetup['lang'])){
…
}
else
$this->content .= '<input name="data[lang]" value="'.$BE_USER->uc['lang'].'" type="hidden" />';
if needed to save the default value hidden field for the default value
if(!isset($overrideProperties['helpText']) && !isset($disableUserSetup['helptext'])){
$code61 = $this->setLabel('helpText');
$code62 = '<input type="checkbox" name="data[helpText]"'.($BE_USER->uc['helpText']?' checked="checked"':'').' />';
}
else if(isset($disableUserSetup['helptext']))
$this->content .= '<input name="data[helpText]" value="1" type="hidden" />';
Override values don’t need hidden field because override values will be handled later.
If the value can be empty no hidden input field because non existing parameter means automatic empty or false.
BTW. Skinning could have some personal setups – I made those for skin_grey_2 and tm_contentaccess.
.
(issue imported from #M3824)