Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ef8a858d

Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt

  • ID ef8a858d663d13aaadd7d29db694dc37ea7c70e2
  • Vorgänger f2b06135
  • Nachfolger 075be078

Hintergrundjob bearbeiten: Paketname aus Auswahlliste anstatt Eingabefeld

Unterschiede anzeigen:

SL/Controller/BackgroundJob.pm
4 4

  
5 5
use parent qw(SL::Controller::Base);
6 6

  
7
use SL::BackgroundJob::Base;
7 8
use SL::Controller::Helper::GetModels;
8 9
use SL::Controller::Helper::Paginated;
9 10
use SL::Controller::Helper::Sorted;
......
50 51
sub action_new {
51 52
  my ($self) = @_;
52 53

  
53
  $self->background_job(SL::DB::BackgroundJob->new(cron_spec => '* * * * *'));
54
  $self->render('background_job/form', title => $::locale->text('Create a new background job'));
54
  $self->background_job(SL::DB::BackgroundJob->new(cron_spec => '* * * * *',  package_name => 'Test'));
55
  $self->render('background_job/form',
56
                title       => $::locale->text('Create a new background job'),
57
                JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]);
55 58
}
56 59

  
57 60
sub action_edit {
58 61
  my ($self) = @_;
59
  $self->render('background_job/form', title => $::locale->text('Edit background job'));
62

  
63
  $self->render('background_job/form',
64
                title       => $::locale->text('Edit background job'),
65
                JOB_CLASSES => [ SL::BackgroundJob::Base->get_known_job_classes ]);
60 66
}
61 67

  
62 68
sub action_create {
templates/webpages/background_job/form.html
24 24

  
25 25
   <tr>
26 26
    <th align="right">[%- LxERP.t8('Package name') %]</th>
27
    <td>[% L.input_tag("background_job.package_name", SELF.background_job.package_name, 'size' => 40) %]</td>
27
    <td>[% L.select_tag("background_job.package_name", JOB_CLASSES, 'default' => SELF.background_job.package_name) %]</td>
28 28
   </tr>
29 29

  
30 30
   <tr>

Auch abrufbar als: Unified diff