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

Annotation of /trunk/share/web/templates/fragments/save_query

Parent Directory Parent Directory | Revision Log Revision Log


Revision 102 - (hide annotations)
Fri Feb 16 23:40:21 2007 UTC (17 years, 2 months ago) by dpavlin
File size: 928 byte(s)
added concept of "parent" query if you started by editing existing one
1 dpavlin 78 <%args>
2     $sql_query
3 dpavlin 84 $on_database
4 dpavlin 102 $parent => undef
5 dpavlin 78 </%args>
6     <%init>
7    
8     my $q = Jifty->web->new_action(
9     class => 'CreateQuery',
10     moniker => 'query',
11     arguments => {
12     sql_query => $sql_query,
13 dpavlin 84 on_database => $on_database,
14 dpavlin 102 parent => $parent,
15 dpavlin 78 },
16     );
17    
18 dpavlin 102 warn "-- save query on $on_database, parent $parent\n$sql_query\n";
19    
20 dpavlin 78 </%init>
21    
22     <% Jifty->web->form->start %>
23     <% $q->form_value('sql_query' ) %>
24     <% $q->hidden('sql_query', $sql_query ) %>
25     <% $q->form_value('on_database' ) %>
26 dpavlin 84 <% $q->hidden('on_database', $on_database ) %>
27 dpavlin 78 <% $q->form_field('name') %>
28     <% $q->form_field('note') %>
29 dpavlin 102 <% $q->form_field('parent') %>
30 dpavlin 78
31     <div class="submit_button">
32 dpavlin 84 <% Jifty->web->return(
33     label => "Save this query",
34     submit => $q,
35     url => '/',
36     ) %>
37     <% Jifty->web->return(
38 dpavlin 78 label => 'Cancel',
39     onclick => {
40 dpavlin 84 region => 'query',
41     replace_with => '/fragments/enter_query',
42 dpavlin 78 refresh_self => 1,
43     },
44     as_button => 1,
45     ) %>
46     </div>
47    
48     <% Jifty->web->form->end %>
49    

  ViewVC Help
Powered by ViewVC 1.1.26