% if ($CustomFields->Count) {
% while (my $CF = $CustomFields->Next()) {
% next unless $CF->CurrentUserHasRight('ModifyCustomField');
% if ($CustomFields->Count) {
% while (my $CF = $CustomFields->Next()) {
% next unless $CF->CurrentUserHasRight('ModifyCustomField');