1 |
<%args> |
<%args> |
2 |
$transport |
$id => 0 |
3 |
</%args> |
</%args> |
4 |
|
<%init> |
5 |
|
my $t = Transports::Model::Transport->new(); |
6 |
|
$t->load_by_cols( id => $id ); |
7 |
|
Jifty->web->redirect( '/transports/new' ) unless ( $t->id ); |
8 |
|
my $transport = Jifty->web->new_action( class => 'UpdateTransport', record => $t ); |
9 |
|
</%init> |
10 |
|
|
11 |
<&|/_elements/wrapper, title => 'Edit transport' &> |
<h2>Transport request</h2> |
|
|
|
|
% if (not Jifty->web->current_user->id) { |
|
|
<% Jifty->web->redirect( '/login/edit' ) %> |
|
|
% } else { |
|
12 |
|
|
13 |
<% Jifty->web->form->start %> |
<% Jifty->web->form->start %> |
14 |
<% Jifty->web->form->next_page( url => '/transports' ) %> |
<div class="cl"> |
15 |
<% $transport->form_field('class') %> |
<% $transport->form_field('class') %> |
16 |
<% $transport->form_field('source') %> |
<% $transport->form_field('source') %> |
17 |
<% $transport->form_field('destination') %> |
<% $transport->form_field('destination') %> |
19 |
<% $transport->form_field('client_dependent') %> |
<% $transport->form_field('client_dependent') %> |
20 |
<% $transport->form_field('created_by') %> |
<% $transport->form_field('created_by') %> |
21 |
<% $transport->form_field('description') %> |
<% $transport->form_field('description') %> |
22 |
|
<div> |
23 |
|
|
24 |
|
% if ($t->return_code->name) { |
25 |
|
<div class="boxed-gray cl"> |
26 |
|
<h3>Import info</h3> |
27 |
|
<% $transport->form_field('return_code') %> |
28 |
|
<% $transport->form_field('comment') %> |
29 |
|
</div> |
30 |
|
% } |
31 |
|
|
32 |
<% Jifty->web->form->submit(label => 'Update transport' ) %> |
<% Jifty->web->form->submit(label => 'Update transport' ) %> |
33 |
<% Jifty->web->form->end %> |
<% Jifty->web->form->end %> |
34 |
|
|
|
% } |
|
|
</&> |
|