From 5c619fec0cb5d8adbce182d91c7c6a22d6725bcf Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 25 Apr 2013 16:15:38 -0700 Subject: billing event "initialize" feature for 2.3, #22766 --- httemplate/edit/process/part_event.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'httemplate/edit/process') diff --git a/httemplate/edit/process/part_event.html b/httemplate/edit/process/part_event.html index 20066ba05..a8c434c1a 100644 --- a/httemplate/edit/process/part_event.html +++ b/httemplate/edit/process/part_event.html @@ -82,8 +82,21 @@ length($actionfields{'reasonnum'}) == 0 ) { return 'Reason required'; } + if ( $cgi->param('_initialize') ) { + $cgi->param('disabled', 'Y'); + } return ''; }, + 'noerror_callback' => sub { + my ($cgi, $new) = @_; + if ( $cgi->param('_initialize') ) { + my $job = new FS::queue { + 'job' => 'FS::part_event::process_initialize' + }; + my $error = $job->insert('eventpart' => $new->eventpart); + warn "error queueing job: $error\n" if $error; # can't do anything else + } + }, 'agent_virt' => 1, 'agent_null_right' => 'Edit global billing events', -- cgit v1.2.1