1 |
<%args> |
<%args> |
2 |
$sth => undef |
$sth => undef |
3 |
|
|
4 |
$sql_query |
$sql_query => undef |
5 |
$name |
$name => undef |
6 |
$database |
$database => undef |
7 |
|
|
8 |
</%args> |
</%args> |
9 |
<%init> |
<%init> |
24 |
default_value => $sql_query, |
default_value => $sql_query, |
25 |
) %> |
) %> |
26 |
<% $action->form_field('database', |
<% $action->form_field('database', |
27 |
default_value => $database->id, |
default_value => $database, |
28 |
) %> |
) %> |
29 |
<div class="submit_button"> |
<div class="submit_button"> |
30 |
<% $action->button( label => 'Try it!' ) %> |
<% $action->button( label => 'Try it!' ) %> |
31 |
</div> |
|
32 |
|
|
33 |
% if ( defined($sth) ) { |
% if ( defined($sth) ) { |
34 |
|
|
35 |
<%perl> |
<% Jifty->web->link( |
36 |
my $save = Jifty->web->new_action( |
label => 'Save', |
37 |
class => 'CreateQuery', |
onclick => { |
38 |
arguments => { |
region => 'save_query', |
39 |
sql_query => $action->form_field('sql_query'), |
prepend => '/save', |
40 |
on_database => $action->form_field('database'), |
args => { |
41 |
} |
sql_query => $action->argument_value('sql_query'), |
42 |
); |
database => $action->argument_value('database'), |
43 |
|
}, |
44 |
|
refresh_self => 1, |
45 |
|
toggle => 1, |
46 |
|
}, |
47 |
|
# as_button => 1, |
48 |
|
) %> |
49 |
|
|
50 |
</%perl> |
</div> |
51 |
|
<% Jifty->web->form->end() %> |
52 |
|
|
53 |
|
<% Jifty->web->region( |
54 |
|
name => 'save_query', |
55 |
|
) %> |
56 |
|
|
|
<% $save->form_field('name') %> |
|
|
<div class="submit_button"> |
|
|
<% $save->button( label => 'Save' ) %> |
|
57 |
</div> |
</div> |
58 |
|
|
59 |
<table cellpadding="3" cellspacing="0" border="1"> |
<table cellpadding="3" cellspacing="0" border="1"> |
74 |
|
|
75 |
</table> |
</table> |
76 |
|
|
77 |
|
% } else { |
78 |
|
|
79 |
|
</div><!-- submit_button --> |
80 |
|
<% Jifty->web->form->end() %> |
81 |
|
|
82 |
% } |
% } |
83 |
|
|
84 |
<% Jifty->web->return( label => "Go back" ) %> |
<% Jifty->web->return( label => "Go back" ) %> |
85 |
|
|
|
<% Jifty->web->form->end() %> |
|
86 |
</&> |
</&> |
87 |
|
|