View | Details | Raw Unified | Return to bug 38969
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-3 / +3 lines)
Lines 59-68 var failure_test = function (tag) { Link Here
59
    $("#verdict").html(__("%s is prohibited!").format(decodeURIComponent(tag)));
59
    $("#verdict").html(__("%s is prohibited!").format(decodeURIComponent(tag)));
60
};
60
};
61
var indeterminate_test = function (tag) {
61
var indeterminate_test = function (tag) {
62
    const span = document.createElement("span");
63
    span.textContent = tag;
62
    $("#verdict").html(
64
    $("#verdict").html(
63
        __("%s is neither permitted nor prohibited!").format(
65
        __("%s is neither permitted nor prohibited!").format(span.innerHTML)
64
            decodeURIComponent(tag)
65
        )
66
    );
66
    );
67
};
67
};
68
68
(-)a/tags/review.pl (-3 / +3 lines)
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
- 

Return to bug 38969