[% USE HTML %][% USE L %][% USE LxERP %]
-<body>
<h1>[% FORM.title %]</h1>
<tr>
<th align="right">[%- LxERP.t8('Execution type') %]</th>
- <td>[% L.select_tag("background_job.type", L.options_for_select([ [ 'once', LxERP.t8('one-time execution') ], [ 'interval', LxERP.t8('repeated execution') ] ],
- 'default' => SELF.background_job.type)) %]</td>
+ <td>
+ [% L.select_tag('background_job.type', [
+ [ 'once', LxERP.t8('one-time execution') ],
+ [ 'interval', LxERP.t8('repeated execution') ]
+ ],
+ 'default' = SELF.background_job.type) %]
+ </td>
</tr>
<tr>
<th align="right">[%- LxERP.t8('Package name') %]</th>
- <td>[% L.input_tag("background_job.package_name", SELF.background_job.package_name, 'size' => 40) %]</td>
+ <td>[% L.select_tag("background_job.package_name", JOB_CLASSES, 'default' => SELF.background_job.package_name) %]</td>
</tr>
<tr>
[% L.submit_tag("action_save_and_execute", LxERP.t8("Save and execute")) %]
[%- END %]
<a href="[% SELF.url_for(action => 'list') %]">[%- LxERP.t8('Abort') %]</a>
+ [%- IF SELF.background_job.id %]
+ <a href="[% SELF.url_for(controller='BackgroundJobHistory', action='list', 'filter.package_name:substr::ilike'=SELF.background_job.package_name) %]">[%- LxERP.t8('Show history') %]</a>
+ [%- END %]
</p>
</form>
-</body>
-</html>