/[transports]/trunk/web/templates/transports/create/new
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/web/templates/transports/create/new

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 84 by dpavlin, Tue Jun 13 15:28:25 2006 UTC revision 85 by dpavlin, Thu Jun 15 22:08:07 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $landscape_id  $landscape_id => 0
3    $transport
4  </%args>  </%args>
 <%init>  
5    
6  my $transport = Jifty->web->new_action(  <h2>Enter new transport request</h2>
         class => 'CreateTransport',  
         monkier => 'create',  
 );  
   
 my $l = Transports::Model::Landscape->new();  
 $l->load_by_cols( id => $landscape_id );  
   
 $m->out("Can't find landscape with id $landscape_id") if (! $l->id);  
   
 my $s = Transports::Model::SourceCollection->new();  
 $s->limit(  
         column => 'landscape',  
         value => $landscape_id,  
 );  
 $transport->arguments->{'source'}->{'valid_values'}->[0]->{'collection'} = $s;  
   
 my $d = Transports::Model::DestinationCollection->new();  
 $d->limit(  
         column => 'landscape',  
         value => $landscape_id,  
 );  
 $transport->arguments->{'destination'}->{'valid_values'}->[0]->{'collection'} = $d;  
 </%init>  
   
 <h2>Enter new transport request in <% $l->name %></h2>  
7    
8  <% Jifty->web->form->start %>  <% Jifty->web->form->start %>
9  <% Jifty->web->form->next_page( url => '/transports' ) %>  
10  <% $transport->form_field('class', render_as => 'radio') %>  <% $transport->form_value('landscape', default_value => $landscape_id ) %>
11    '
12    <% $transport->form_field('class', render_as => 'radio', default_value => 'Default' ) %>
13  <% $transport->form_field('source') %>  <% $transport->form_field('source') %>
14  <% $transport->form_field('destination') %>  <% $transport->form_field('destination') %>
15  <% $transport->form_field('request_nr') %>  <% $transport->form_field('request_nr') %>
16  <% $transport->form_field('client_dependent') %>  <% $transport->form_field('client_dependent') %>
17  <% $transport->form_field('description') %>  <% $transport->form_field('description') %>
18    
19  <% Jifty->web->form->submit(label => 'Add transport' ) %>  <% Jifty->web->form->submit( label => 'Add transport' ) %>
20    
21  <% Jifty->web->form->end %>  <% Jifty->web->form->end %>

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.26