X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fpart_event.html;h=6a8ddd1ea1ba9ffb471ec9ef51cac5923b2d9cff;hb=41d0660124cf3965a4a2b4706d02e382ac4cbf01;hp=428025fd1f85bcf540d9141b7ee00f8978c0143e;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/edit/process/part_event.html b/httemplate/edit/process/part_event.html index 428025fd1..6a8ddd1ea 100644 --- a/httemplate/edit/process/part_event.html +++ b/httemplate/edit/process/part_event.html @@ -72,6 +72,17 @@ @{ $object->option_fields_listref }; }, + 'precheck_callback' => sub { + my $cgi = shift; + my $action = $cgi->param('action') or return; + my %actionfields = map { $_ =~ /^$action\.(.*)/; $1 => $cgi->param($_) } + grep { /^$action\./ } $cgi->param; + if ( exists($actionfields{'reasonnum'}) and + length($actionfields{'reasonnum'}) == 0 ) { + return 'Reason required'; + } + return ''; + }, 'agent_virt' => 1, 'agent_null_right' => 'Edit global billing events',