]> git.uio.no Git - usit-rt.git/blob - share/html/Install/index.html
Upgrade to 4.2.8
[usit-rt.git] / share / html / Install / index.html
1 %# BEGIN BPS TAGGED BLOCK {{{
2 %#
3 %# COPYRIGHT:
4 %#
5 %# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
6 %#                                          <sales@bestpractical.com>
7 %#
8 %# (Except where explicitly superseded by other copyright notices)
9 %#
10 %#
11 %# LICENSE:
12 %#
13 %# This work is made available to you under the terms of Version 2 of
14 %# the GNU General Public License. A copy of that license should have
15 %# been provided with this software, but in any event can be snarfed
16 %# from www.gnu.org.
17 %#
18 %# This work is distributed in the hope that it will be useful, but
19 %# WITHOUT ANY WARRANTY; without even the implied warranty of
20 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 %# General Public License for more details.
22 %#
23 %# You should have received a copy of the GNU General Public License
24 %# along with this program; if not, write to the Free Software
25 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 %# 02110-1301 or visit their web page on the internet at
27 %# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
28 %#
29 %#
30 %# CONTRIBUTION SUBMISSION POLICY:
31 %#
32 %# (The following paragraph is not intended to limit the rights granted
33 %# to you to modify and distribute this software under the terms of
34 %# the GNU General Public License and is only of importance to you if
35 %# you choose to contribute your changes and enhancements to the
36 %# community by submitting them to Best Practical Solutions, LLC.)
37 %#
38 %# By intentionally submitting any modifications, corrections or
39 %# derivatives to this work, or any other work intended for use with
40 %# Request Tracker, to Best Practical Solutions, LLC, you confirm that
41 %# you are the copyright holder for those contributions and you grant
42 %# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
43 %# royalty-free, perpetual, license to use, copy, create derivative
44 %# works based on those contributions, and sublicense and distribute
45 %# those contributions and any derivatives thereof.
46 %#
47 %# END BPS TAGGED BLOCK }}}
48 <&| Elements/Wrapper, Title => loc('Welcome to RT!') &>
49
50 <& Elements/Errors, Errors => \@errors &>
51
52 % return if $locked;
53
54 <form method="post">
55
56 <h1><% loc('Language') %></h1>
57
58 <div class="select-lang">
59 <&|/l&>Select another language</&>:
60 <& /Elements/SelectLang,
61     Name => 'Lang',
62     Default => $lang_handle? $lang_handle->language_tag : undef,
63 &>
64 <input type="submit" class="button" name="ChangeLang" value="<% loc('Change') %>" />
65 </div>
66
67 <h1><% loc('What is RT?') %></h1>
68
69 <div class="intro">
70 <p>
71 <&|/l&>RT is an enterprise-grade issue tracking system designed to let you intelligently and efficiently manage tasks, issues, requests, defects or anything else that looks like an "action item."</&>
72 </p>
73 <p>
74 <&|/l&>RT is used by Fortune 100 companies, one-person businesses, government agencies, educational institutions, hospitals, nonprofits, NGOs, libraries, open source projects and all sorts of other organizations on all seven continents. (Yes, even Antarctica.)</&>
75 </p>
76 <h2><% loc('Getting started') %></h2>
77 <p>
78 <b>
79 <&|/l, loc("Let's go!") &>You're seeing this screen because you started up an RT server without a working database. Most likely, this is the first time you're running RT.  If you click "[_1]" below, RT will guide you through setting up your RT server and database.</&>
80 </b>
81 </p>
82 <p>
83 <&|/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.</&>
84 </p>
85 </div>
86
87 <& /Elements/Submit, Label => loc( "Let's go!"), Name => 'Run' &>
88 </form>
89
90 </&>
91 <%init>
92 my @errors;
93 my $locked;
94
95 my $file = RT::Installer->ConfigFile;
96
97 if ( ! -e $file ) {
98     # write a blank RT_SiteConfig.pm
99     open( my $fh, '>', $file ) or die $!;
100     close $fh;
101 }
102 elsif ( ! -w $file ) {
103     $locked = 1;
104 }
105
106 if ( $locked ) {
107     push @errors, loc("Config file [_1] is locked", $file);
108 }
109 elsif ( $Run ) {
110     $RT::Installer->{InstallConfig} ||= {};
111     for my $field  (
112             qw/DatabaseType DatabaseName DatabaseHost DatabasePort
113             DatabaseUser DatabaseRequireSSL rtname
114             Organization CommentAddress CorrespondAddress
115             SendmailPath WebDomain WebPort/
116     ) {
117         $RT::Installer->{InstallConfig}{$field} ||= RT->Config->Get($field);
118     }
119
120     for my $field ( qw/OwnerEmail Password DatabasePassword DatabaseAdminPassword/ ) {
121         # stuff we don't want to keep null
122         $RT::Installer->{InstallConfig}{$field} = '';
123     }
124
125     RT::Interface::Web::Redirect(RT->Config->Get('WebURL') . 'Install/DatabaseType.html');
126 } elsif ( $ChangeLang && $Lang ) {
127     # hackish, but works
128     $session{'CurrentUser'} = RT::CurrentUser->new;
129     $session{'CurrentUser'}->LanguageHandle( $Lang );
130 }
131 my $lang_handle = do { local $@;
132     eval {
133         ($session{'CurrentUser'} || RT::CurrentUser->new(RT->SystemUser->Id))
134             ->LanguageHandle
135     }
136 };
137 </%init>
138
139 <%args>
140 $Run => 0
141 $ChangeLang => undef
142 $Lang => undef
143 </%args>