projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ade3062
)
make reasonnum mandatory in event actions, RT#9684
author
mark
<mark>
Mon, 22 Nov 2010 02:52:30 +0000
(
02:52
+0000)
committer
mark
<mark>
Mon, 22 Nov 2010 02:52:30 +0000
(
02:52
+0000)
httemplate/edit/process/part_event.html
patch
|
blob
|
history
diff --git
a/httemplate/edit/process/part_event.html
b/httemplate/edit/process/part_event.html
index
428025f
..
6a8ddd1
100644
(file)
--- a/
httemplate/edit/process/part_event.html
+++ b/
httemplate/edit/process/part_event.html
@@
-72,6
+72,17
@@
@{ $object->option_fields_listref };
},
@{ $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',
'agent_virt' => 1,
'agent_null_right' => 'Edit global billing events',