Do the check also for SelfService (require RT 3.8.3 at least)
[manu/RT-Extension-MandatorySubject.git] / html / Callbacks / MandatorySubject / SelfService / Create.html / BeforeCreate
1 <%INIT>
2 my $ARGSRef = $ARGS{'ARGSRef'};
3 if ( (defined($$ARGSRef{'id'}) and $$ARGSRef{'id'} eq 'new') ) {
4     if ( (!$$ARGSRef{'Subject'}) || ($$ARGSRef{'Subject'} =~ /^[ \t]*$/) ) {
5         $$skip_create = 1;
6         push @{$results}, loc('Error: empty subject');
7     }
8 }
9 </%INIT>
10 <%ARGS>
11 $skip_create => undef
12 $results => undef
13 </%ARGS>