[dw-free] indicate which support categories are private cats
[commit: http://hg.dwscoalition.org/dw-free/rev/9fe20412065b]
http://bugs.dwscoalition.org/show_bug.cgi?id=3816
Star categories which aren't publicly readable.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3816
Star categories which aren't publicly readable.
Patch by
Files modified:
- bin/upgrading/en.dat
- cgi-bin/LJ/Widget/SubmitRequest.pm
--------------------------------------------------------------------------------
diff -r f27702439cd9 -r 9fe20412065b bin/upgrading/en.dat
--- a/bin/upgrading/en.dat Sat Dec 24 01:20:52 2011 +0800
+++ b/bin/upgrading/en.dat Sat Dec 24 01:50:55 2011 +0800
@@ -5115,6 +5115,8 @@
widget.support.submit.login.note=If you're a [[sitename]] user, <a [[loginlink]]>please log in</a> before submitting your request.
+widget.support.submit.nonpublic=* Only visible to staff and those trusted volunteers with appropriate privileges
+
widget.support.submit.notshow=(not shown to the public)
widget.support.submit.question=Question or Problem
diff -r f27702439cd9 -r 9fe20412065b cgi-bin/LJ/Widget/SubmitRequest.pm
--- a/cgi-bin/LJ/Widget/SubmitRequest.pm Sat Dec 24 01:20:52 2011 +0800
+++ b/cgi-bin/LJ/Widget/SubmitRequest.pm Sat Dec 24 01:50:55 2011 +0800
@@ -75,14 +75,25 @@
$ret .= "<div style='margin-left: 30px'><p>";
my @choices;
+ my $has_nonpublic = 0;
+
foreach (sort { $a->{sortorder} <=> $b->{sortorder} } values %$cats) {
next unless $_->{is_selectable};
- push @choices, $_->{spcatid}, $_->{catname};
+
+ my $catname = $_->{catname};
+ unless ( $_->{public_read} ) {
+ $catname .= "*";
+ $has_nonpublic = 1;
+ }
+
+ push @choices, $_->{spcatid}, $catname;
}
$ret .= $class->html_select(name => 'spcatid', list => \@choices, selected => $post->{spcatid});
$ret .= LJ::Hooks::run_hook("support_request_cat_extra_text") || '';
- $ret .= "</p></div>";
+ $ret .= "</p>";
+ $ret .= "<p class='note'>" . $class->ml( 'widget.support.submit.nonpublic' ) . "</p>" if $has_nonpublic;
+ $ret .= "</div>";
}
if (LJ::is_enabled("support_request_language")) {
--------------------------------------------------------------------------------
