[Rt-commit] r14679 - in rt/branches/3.999-DANGEROUS: share/html/Install

sunnavy at bestpractical.com sunnavy at bestpractical.com
Wed Jul 30 23:23:30 EDT 2008


Author: sunnavy
Date: Wed Jul 30 23:23:29 2008
New Revision: 14679

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/share/html/Install/Basics.html
   rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseDetails.html
   rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseType.html
   rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html
   rt/branches/3.999-DANGEROUS/share/html/Install/Global.html
   rt/branches/3.999-DANGEROUS/share/html/Install/Initialize.html
   rt/branches/3.999-DANGEROUS/share/html/Install/Sendmail.html
   rt/branches/3.999-DANGEROUS/share/html/Install/index.html

Log:
 r15139 at sunnavys-mb:  sunnavy | 2008-07-31 11:21:44 +0800
 refactor a bit


Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Basics.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Basics.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Basics.html	Wed Jul 30 23:23:29 2008
@@ -51,17 +51,10 @@
 <&|/l&>These configuration options cover some of the basics needed to get RT up and running.  We need to know the name of your RT installation and the domain name where RT will live.  You will also need to set a password for your defauly administrative user.</&>
 </p>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/Sendmail.html' ) %>
-% for my $field ( @fields ) {
-<% $action->form_field( $field ) %>
-% }
-<% Jifty->web->form->submit( label => _('Email Configuration')) %>
-<% Jifty->web->form->end %>
+<& Elements/Form, fields => [qw/rtname web_domain web_port password/],
+    next => '/Install/Sendmail.html',
+    next_label => _('Next: ') . _('Email Configuration'),
+    previous => '/Install/DatabaseDetails.html',
+    previous_label => _('Previous: ') . _('Check your database credentials' )
+    &>
 </&>
-
-
-<%init>
-my $action = Jifty->web->new_action( class => 'Install' );
-my @fields = qw/rtname web_domain web_port password/;
-</%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseDetails.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseDetails.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseDetails.html	Wed Jul 30 23:23:29 2008
@@ -65,17 +65,15 @@
 
 % }
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/Basics.html' ) %>
-% for my $field ( @fields ) {
-<% $action->form_field( $field ) %>
-% }
-<% Jifty->web->form->submit( label => 'Next' ) %>
-<% Jifty->web->form->end %>
+<& Elements/Form, fields => \@fields,
+    next => '/Install/Basics.html',
+    next_label => _('Next: ') . _('Customize Basics'),
+    previous => '/Install/DatabaseType.html',
+    previous_label => _('Previous: ') . _('Choose a database engine')
+    &>
 </&>
 
 <%init>
-my $action = Jifty->web->new_action( class => 'Install' );
 my @fields = 'database_name';
 my $db_type = $RT::Installer->{config}{database_type};
 

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseType.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseType.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/DatabaseType.html	Wed Jul 30 23:23:29 2008
@@ -62,13 +62,7 @@
 </p>
 </div>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/DatabaseDetails.html' ) %>
-<% $action->form_field( 'database_type' ) %>
-<% Jifty->web->form->submit( label => 'Next' ) %>
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => 'database_type',
+    next => '/Install/DatabaseDetails.html',
+    next_label => _('Next: ') . _('Check your database credentials') &>
 </&>
-<%init>
-my $action = Jifty->web->new_action( class => 'Install' );
-</%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Finish.html	Wed Jul 30 23:23:29 2008
@@ -65,14 +65,8 @@
 </p>
 </div>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/' ) %>
-<% $action->hidden( 'finish' ) %>
-<% Jifty->web->form->submit( label => _('Finish')) %>
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => 'finish',
+    next => '/',
+    next_label => _('Finish'),
+    &>
 </&>
-<%init>
-my $action = Jifty->web->new_action( class => 'Install' );
-my @fields = 'finish';
-</%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Global.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Global.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Global.html	Wed Jul 30 23:23:29 2008
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&| Elements/Wrapper, Title => _('Step %1 of %2: ', 5, 7 ) . _('Customize Email Addresses') &> 
+<&| Elements/Wrapper, title => _('Step %1 of %2: ', 5, 7 ) . _('Customize Global Defaults') &> 
 
 <p><&|/l&>Help us set up some useful defaults for RT.</&></p>
 
@@ -54,18 +54,21 @@
 <p><&|/l&>By default, RT will use the timezone of your system.  This lets you set a global default for the display of dates and times in RT.  Your users can choose a different Timezone in their preferences.</&></p>
 
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => 
-        $RT::Installer->{database_action} eq 'none' ?
-        '/Install/Finish.html' : '/Install/Initialize.html' ) %>
-% for my $field ( @fields ) {
-<% $action->form_field( $field ) %>
-% }
-<% Jifty->web->form->submit( label => _('Initialize Database')) %>
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => [qw/comment_address correspond_address timezone/],
+    next => $next,
+    next_label => _('Next: ') . _($next_label),
+    previous => '/Install/Sendmail.html',
+    previous_label => _('Previous: ') . _('Email Configuration')
+    &>
 </&>
 <%init>
-my @fields = qw/comment_address correspond_address timezone/;
-my $action = Jifty->web->new_action( class => 'Install' );
+my ($next, $next_label );
+if( $RT::Installer->{database_action} eq 'none'  ) {
+    $next = '/Install/Finish.html';
+    $next_label = 'Finish'; #loc
+}
+else {
+    $next = '/Install/Initialize.html';
+    $next_label = 'Initialize Database'; #loc
+}
 </%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Initialize.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Initialize.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Initialize.html	Wed Jul 30 23:23:29 2008
@@ -51,13 +51,10 @@
 <&|/l&>Click "Initialize Database" to create RT's database and insert initial metadata. This may take a few moments</&>
 </div>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/Finish.html' ) %>
-<% $action->hidden('init') %>
-<% Jifty->web->form->submit( label => _('Initialize Database')) %>
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => 'initdb',
+    next => '/Install/Finish.html',
+    next_label => _('Next: ') . _('Finish'),
+    previous => '/Install/Global.html',
+    previous_label => _('Previous: ') . _('Customize Global Defaults')
+    &>
 </&>
-<%init>
-my $action = Jifty->web->new_action( class => 'Install' );
-</%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/Sendmail.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/Sendmail.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/Sendmail.html	Wed Jul 30 23:23:29 2008
@@ -45,23 +45,16 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<&|Elements/Wrapper, Title => _('Step %1 of %2: ', 4, 7 ) . _('Email Configuration') &> 
+<&|Elements/Wrapper, title => _('Step %1 of %2: ', 4, 7 ) . _('Email Configuration') &> 
 
 <p>
 <&|/l&>RT can communicate with your users about new tickets or new correspondence on tickets. Tell us where to find sendmail (or a sendmail compatible binary such as the one provided by postifx).  RT also needs to know who to notify when someone sends invalid email.  This must not be an address that feeds back into RT.</&>
 </p>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/Global.html' ) %>
-% for my $field ( @fields ) {
-<% $action->form_field( $field ) %>
-% }
-<% Jifty->web->form->submit( label => _('Customize Global Defaults') ) %>
-
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => [qw/sendmail_path owner_email/],
+    next => '/Install/Global.html',
+    next_label => _('Next: ') . _('Customize Global Defaults'),
+    previous => '/Install/Basics.html',
+    previous_label => _('Previous: ') . _('Customize Basics')
+    &>
 </&>
-<%init>
-my $action = Jifty->web->new_action( class => 'Install' );
-my @fields = qw/sendmail_path owner_email/;
-</%init>

Modified: rt/branches/3.999-DANGEROUS/share/html/Install/index.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/share/html/Install/index.html	(original)
+++ rt/branches/3.999-DANGEROUS/share/html/Install/index.html	Wed Jul 30 23:23:29 2008
@@ -70,12 +70,9 @@
 <&|/l&>If you already have a working RT server and database, you should take this opportunity to make sure that your database server is running and that the RT server can connect to it. Once you've done that, stop and start the RT server.</p></&>
 </div>
 
-<% Jifty->web->form->start %>
-<% Jifty->web->form->next_page( url => '/Install/DatabaseType.html' ) %>
-<% $action->hidden('start') %>
-<% Jifty->web->form->submit(label => _("Let's go") ) %>
-<% Jifty->web->form->end %>
-
+<& Elements/Form, fields => 'start', 
+    next => '/Install/DatabaseType.html',
+    next_label => _("Let's go") &>
 % }
 </&>
 <%init>
@@ -88,7 +85,6 @@
     push @errors, _("Config file %1 is locked", $file);
 }
 
-my $action = Jifty->web->new_action( class => 'Install' );
 </%init>
 
 <%args>


More information about the Rt-commit mailing list