Hello.
I use this code in footer-extras.php to hide fields in detail view for normal users (and shows only to admin) :
<?
$memberInfo = getMemberInfo();
if($memberInfo['group'] !='Admins'){
?>
<script type='text/javascript'>
document.observe("dom:loaded", function() {
$j('label[for="Drop_down_status"]').parent().hide();
});
</script>
<?
}
?>
Some fields like text, checkboxes are hidden BUT i see that not all fields hides. For example, Drop-down list it is not hidding.
What i miss from the code? i really need to hide some drop-down lists for normal users.
Thank you
Detail view only for Admins users
Re: Detail view only for Admins users
Hi,
you may try
$j('#Drop_down_status').parents('.form-group').hide();
instead of
$j('label[for="Drop_down_status"]').parent().hide();
The lable changes for Drop-downs
you may try
$j('#Drop_down_status').parents('.form-group').hide();
instead of
$j('label[for="Drop_down_status"]').parent().hide();
The lable changes for Drop-downs
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Detail view only for Admins users
Worked like a charm :X
Thank you verry much!
Thank you verry much!
Re: Detail view only for Admins users
Hello.
One more question please.
For document upload?
Thank you verry much.
One more question please.
For document upload?
Thank you verry much.
Re: Detail view only for Admins users
Hi,
try
$j('#file').parents('.form-group').hide()
Where #file is the selector for your upload.
try
$j('#file').parents('.form-group').hide()
Where #file is the selector for your upload.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Detail view only for Admins users
Worked. Thank you!!!