From 53ea5a72067a9b0ebcd3417692c3884d6f91f74a Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 1 Sep 2011 05:13:09 +0000 Subject: svc_acct events for usage limits, #13202 --- 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 6a8ddd1ea..d4d4526e0 100644 --- a/httemplate/edit/process/part_event.html +++ b/httemplate/edit/process/part_event.html @@ -81,8 +81,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