[Rt-commit] rt branch, development, updated. c0dee1923332ac8e3e66691f7eb335c8d9c809c9
Thomas Sibley
trs at bestpractical.com
Fri Jul 9 15:26:53 EDT 2010
The branch, development has been updated
via c0dee1923332ac8e3e66691f7eb335c8d9c809c9 (commit)
from b5fcd7ce19227b496e7202d943c238c74e056a92 (commit)
Summary of changes:
lib/RT/View/SetupWizard.pm | 53 +++++++++++--------------------------------
1 files changed, 14 insertions(+), 39 deletions(-)
- Log -----------------------------------------------------------------
commit c0dee1923332ac8e3e66691f7eb335c8d9c809c9
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 9 15:27:53 2010 -0400
Use the new button/step helpers from the plugin
diff --git a/lib/RT/View/SetupWizard.pm b/lib/RT/View/SetupWizard.pm
index c41fdbf..ab6ec16 100644
--- a/lib/RT/View/SetupWizard.pm
+++ b/lib/RT/View/SetupWizard.pm
@@ -62,6 +62,16 @@ sub setup_page (&) {
};
}
+sub steps {
+ return qw(
+ index.html
+ database
+ root
+ organization
+ done
+ );
+}
+
template 'index.html' => setup_page {
h2 { _("Welcome to RT!") };
@@ -69,11 +79,7 @@ template 'index.html' => setup_page {
_("Let's get your RT install setup and ready to go. We'll step you through a few steps to configure the basics.");
};
- hyperlink(
- url => 'database',
- label => 'Start',
- as_button => 1
- );
+ show 'buttons', for => 'index.html';
p {
outs_raw _("This setup wizard was activated by the presence of <tt>SetupMode: 1</tt> in one of your configuration files. If you are seeing this erroneously, you may restore normal operation by adjusting the <tt>etc/site_config.yml</tt> file to have <tt>SetupMode: 0</tt> set under <tt>framework</tt>.");
@@ -89,7 +95,7 @@ template 'database' => setup_page {
_("RT may ask you, after saving the database settings, to login again as root with the default password.");
};
- show 'buttons', prev => 'index.html', next => 'root';
+ show 'buttons', for => 'database';
};
template 'root' => setup_page {
@@ -109,7 +115,7 @@ template 'root' => setup_page {
label => 'Confirm Password',
);
- show 'buttons', prev => 'database', next => 'organization';
+ show 'buttons', for => 'root';
};
# root password
@@ -136,7 +142,7 @@ template 'organization' => setup_page {
outs_raw( $meta->{'time_zone'}{'doc'} )
} if $meta->{'time_zone'};
- show 'buttons', prev => 'root', next => 'done';
+ show 'buttons', for => 'organization';
};
template 'basics' => sub {
@@ -162,36 +168,5 @@ template 'done' => setup_page {
h2 { _("Setup complete!") };
};
-private template 'buttons' => sub {
- my $self = shift;
- my %args = @_;
-
- hyperlink(
- url => $args{'prev'},
- label => 'Previous step',
- as_button => 1,
- );
-
- if ( $args{'restart'} ) {
- Jifty->log->debug("Restarting the server before next setup wizard step");
- my $restart = new_action(
- class => 'Jifty::Plugin::Config::Action::Restart',
- moniker => 'restart-jifty',
- order => 90
- );
- render_param(
- $restart => 'url',
- default_value => $self->fragment_for($args{'next'})
- );
- form_submit( label => 'Next step' );
- }
- else {
- form_submit(
- url => $self->fragment_for($args{'next'}),
- label => 'Next step',
- );
- }
-};
-
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list