Lines 34-39
use C4::Tags qw(
Link Here
|
34 |
is_approved |
34 |
is_approved |
35 |
whitelist |
35 |
whitelist |
36 |
); |
36 |
); |
|
|
37 |
use JSON; |
37 |
|
38 |
|
38 |
my $script_name = "/cgi-bin/koha/tags/review.pl"; |
39 |
my $script_name = "/cgi-bin/koha/tags/review.pl"; |
39 |
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. |
40 |
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. |
Lines 63-70
if ( is_ajax() ) {
Link Here
|
63 |
my $check = is_approved($tag); |
64 |
my $check = is_approved($tag); |
64 |
$js_reply = |
65 |
$js_reply = |
65 |
( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) |
66 |
( $check >= 1 ? 'success' : $check <= -1 ? 'failure' : 'indeterminate' ) |
66 |
. "_test('" |
67 |
. "_test(" |
67 |
. uri_escape_utf8($tag) . "');\n"; |
68 |
. JSON::encode_json($tag) . ");\n"; |
68 |
} elsif ( $op eq 'cud-approve' ) { |
69 |
} elsif ( $op eq 'cud-approve' ) { |
69 |
$js_reply = |
70 |
$js_reply = |
70 |
( whitelist( $operator, $tag ) ? 'success' : 'failure' ) . "_approve('" . uri_escape_utf8($tag) . "');\n"; |
71 |
( whitelist( $operator, $tag ) ? 'success' : 'failure' ) . "_approve('" . uri_escape_utf8($tag) . "');\n"; |
71 |
- |
|
|