From ce04ecd7a76dfc9e02d015de2ce8dfb0ffadd142 Mon Sep 17 00:00:00 2001 From: Emmanuel Lacour Date: Sat, 21 Nov 2009 00:58:24 +0100 Subject: [PATCH] Add a callback to check subject in QuickCreate (need RT >= 3.8.7) --- html/Callbacks/MandatorySubject/index.html/Initial | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 html/Callbacks/MandatorySubject/index.html/Initial diff --git a/html/Callbacks/MandatorySubject/index.html/Initial b/html/Callbacks/MandatorySubject/index.html/Initial new file mode 100644 index 0000000..0bd50e2 --- /dev/null +++ b/html/Callbacks/MandatorySubject/index.html/Initial @@ -0,0 +1,13 @@ +<%INIT> +my $ARGSRef = $ARGS{'ARGSRef'}; +if ( $$ARGSRef{'QuickCreate'} ) { + if ( (!$$ARGSRef{'Subject'}) || ($$ARGSRef{'Subject'} =~ /^[ \t]*$/) ) { + $$skip_create = 1; + push @{$results}, loc('Error: empty subject'); + } +} + +<%ARGS> +$skip_create => undef +$results => undef + -- 2.11.0