diff options
author | mark <mark> | 2010-11-22 02:52:30 +0000 |
---|---|---|
committer | mark <mark> | 2010-11-22 02:52:30 +0000 |
commit | 82cdd3bf93ccc681baa762322e123b45eac104a7 (patch) | |
tree | 34d7c9e9df403adc40a3bd726963763c646239ed /httemplate/edit | |
parent | ade306224dbc1cb5ec8af4d1cc6b838315465a97 (diff) |
make reasonnum mandatory in event actions, RT#9684
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/process/part_event.html | 11 |
1 files changed, 11 insertions, 0 deletions
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', |