From: Moritz Bunkus Date: Tue, 30 Oct 2012 12:43:07 +0000 (+0100) Subject: Hintergrundjob bearbeiten: Paketname aus Auswahlliste anstatt Eingabefeld X-Git-Tag: release-3.0.0beta1~68 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ef8a858d663d13aaadd7d29db694dc37ea7c70e2;p=kivitendo-erp.git Hintergrundjob bearbeiten: Paketname aus Auswahlliste anstatt Eingabefeld --- diff --git a/SL/Controller/BackgroundJob.pm b/SL/Controller/BackgroundJob.pm index 7729dafe1..797797782 100644 --- a/SL/Controller/BackgroundJob.pm +++ b/SL/Controller/BackgroundJob.pm @@ -4,6 +4,7 @@ use strict; use parent qw(SL::Controller::Base); +use SL::BackgroundJob::Base; use SL::Controller::Helper::GetModels; use SL::Controller::Helper::Paginated; use SL::Controller::Helper::Sorted; @@ -50,13 +51,18 @@ sub action_list { sub action_new { my ($self) = @_; - $self->background_job(SL::DB::BackgroundJob->new(cron_spec => '* * * * *')); - $self->render('background_job/form', title => $::locale->text('Create a new background job')); + $self->background_job(SL::DB::BackgroundJob->new(cron_spec => '* * * * *', package_name => 'Test')); + $self->render('background_job/form', + title => $::locale->text('Create a new background job'), + JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]); } sub action_edit { my ($self) = @_; - $self->render('background_job/form', title => $::locale->text('Edit background job')); + + $self->render('background_job/form', + title => $::locale->text('Edit background job'), + JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]); } sub action_create { diff --git a/templates/webpages/background_job/form.html b/templates/webpages/background_job/form.html index 90eecd099..5e02ea1ef 100644 --- a/templates/webpages/background_job/form.html +++ b/templates/webpages/background_job/form.html @@ -24,7 +24,7 @@ [%- LxERP.t8('Package name') %] - [% L.input_tag("background_job.package_name", SELF.background_job.package_name, 'size' => 40) %] + [% L.select_tag("background_job.package_name", JOB_CLASSES, 'default' => SELF.background_job.package_name) %]