From: Emmanuel Lacour Date: Fri, 3 Jul 2009 09:51:58 +0000 (+0200) Subject: Do the check also for SelfService (require RT 3.8.3 at least) X-Git-Tag: 0.01~1 X-Git-Url: http://git.home-dn.net/?p=manu%2FRT-Extension-MandatoryRequestor.git;a=commitdiff_plain;h=83b76eac11ab9f3061ffb8e052ae5133fc1fe762 Do the check also for SelfService (require RT 3.8.3 at least) --- diff --git a/html/Callbacks/MandatoryRequestor/SelfService/Create.html/BeforeCreate b/html/Callbacks/MandatoryRequestor/SelfService/Create.html/BeforeCreate new file mode 100644 index 0000000..88bdf94 --- /dev/null +++ b/html/Callbacks/MandatoryRequestor/SelfService/Create.html/BeforeCreate @@ -0,0 +1,13 @@ +<%INIT> +my $ARGSRef = $ARGS{'ARGSRef'}; +if ( (defined($$ARGSRef{'id'}) and $$ARGSRef{'id'} eq 'new') ) { + if ( (!$$ARGSRef{'Requestors'}) || ($$ARGSRef{'Requestors'} =~ /^[ \t]*$/) ) { + $$skip_create = 1; + push @{$results}, loc('Error: empty requestor'); + } +} + +<%ARGS> +$skip_create => undef +$results => undef +