[Rt-commit] rt branch, development, updated. b5fcd7ce19227b496e7202d943c238c74e056a92
Thomas Sibley
trs at bestpractical.com
Thu Jul 8 17:43:09 EDT 2010
The branch, development has been updated
via b5fcd7ce19227b496e7202d943c238c74e056a92 (commit)
via 237cc6f0ccf20ec5b6adeebbd410601e4f9b6915 (commit)
from b794f8668c081fecc6bec3a04922c434c4e2b964 (commit)
Summary of changes:
lib/RT/Action/ConfigSystem.pm | 12 +++++++++++-
lib/RT/View/SetupWizard.pm | 23 ++++++++++++++++++++++-
2 files changed, 33 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 237cc6f0ccf20ec5b6adeebbd410601e4f9b6915
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 8 17:35:58 2010 -0400
Still an awful hack, but one that's more friendly now
This needs to be fixed more cleanly another way, a way that probably
involves killing the use of Data::Dumper.
diff --git a/lib/RT/Action/ConfigSystem.pm b/lib/RT/Action/ConfigSystem.pm
index e146959..53ff684 100644
--- a/lib/RT/Action/ConfigSystem.pm
+++ b/lib/RT/Action/ConfigSystem.pm
@@ -20,7 +20,11 @@ sub arguments {
$args->{ $config->name } = {
default_value => defer {
local $Data::Dumper::Terse = 1;
- Dumper $value,
+ my $dump = Dumper($value);
+ # De-quote simple strings
+ $dump =~ s/^\s*['"]//;
+ $dump =~ s/['"]\s*$//;
+ return $dump;
},
ref $value ? ( render_as => 'textarea' ) : (),
};
@@ -100,6 +104,12 @@ sub _canonicalize_arguments {
if ( $self->has_argument($arg) ) {
my $value = $self->argument_value( $arg );
next unless defined $value;
+
+ unless ( $value =~ /^\s*['"\{\[]/ ) {
+ # quotify again
+ $value = "'$value'";
+ }
+
my $eval = eval $value;
if ( $@ ) {
return $self->validation_error(
commit b5fcd7ce19227b496e7202d943c238c74e056a92
Author: Thomas Sibley <trs at bestpractical.com>
Date: Thu Jul 8 17:44:27 2010 -0400
Add a very basic "organization" step for rtname and TZ
diff --git a/lib/RT/View/SetupWizard.pm b/lib/RT/View/SetupWizard.pm
index 540e721..c41fdbf 100644
--- a/lib/RT/View/SetupWizard.pm
+++ b/lib/RT/View/SetupWizard.pm
@@ -109,7 +109,7 @@ template 'root' => setup_page {
label => 'Confirm Password',
);
- show 'buttons', prev => 'database', next => 'done';
+ show 'buttons', prev => 'database', next => 'organization';
};
# root password
@@ -118,6 +118,27 @@ template 'root' => setup_page {
# email
# turn off SetupMode in finish
+template 'organization' => setup_page {
+ h2 { _("Organization basics") };
+
+ p { _("Now tell RT just the very basics about your organization.") };
+
+ my $config = new_action( class => 'RT::Action::ConfigSystem' );
+ my $meta = $config->metadata;
+
+ render_param( $config => 'rtname' );
+ p {
+ outs_raw( $meta->{'rtname'}{'doc'} )
+ } if $meta->{'rtname'};
+
+ render_param( $config => 'time_zone' );
+ p {
+ outs_raw( $meta->{'time_zone'}{'doc'} )
+ } if $meta->{'time_zone'};
+
+ show 'buttons', prev => 'root', next => 'done';
+};
+
template 'basics' => sub {
p { _("You may change basic information about your RT install.") };
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list