fix generated data
[civicrm-core.git] / install / template.html
CommitLineData
6a488035
TO
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3<head>
4<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
62fbebae 5<title><?php echo ts('CiviCRM Installer'); ?></title>
6a488035
TO
6<link rel="stylesheet" type="text/css" href=<?php echo $installURLPath . "template.css"?> />
7</head>
8
9<body>
62fbebae 10
6a488035 11<div id="All">
62fbebae 12 <div style="float: right"><strong>Version <?php echo "{$civicrm_version['version']} {$civicrm_version['cms']}" ?></strong><br/>
10920791 13 <span><img src=<?php echo $installURLPath . "block_small.png"?> /></span>
62fbebae
ML
14 </div>
15
16<h1><?php echo ts("CiviCRM Installer"); ?></h1>
17<p><?php echo ts("Thanks for choosing CiviCRM! Please follow the instructions below to install CiviCRM."); ?></p>
18
6a488035 19<form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
62fbebae 20
6a488035 21<?php if(isset($hasErrorOtherThanDatabase)) { ?>
62fbebae 22 <p class="error"><?php echo ts('We are not able to install the software. Please <a href="#requirements">see below</a> for details.'); ?></p>
6a488035 23<?php } else { ?>
62fbebae
ML
24 <?php if($req->hasWarnings()) { ?>
25 <p class="warning"><?php echo ts('There are some issues that we recommend you look at before installing, however, you are still able to install the software. Please see below for details.'); ?></p>
26 <?php } else if(!$dbReq->hasErrors()) { ?>
27 <p class="good"><?php echo ts("You're ready to install!"); ?></p>
28 <?php } ?>
6a488035 29
62fbebae
ML
30 <p>
31 <input id="install_button" type="submit" name="go" value="<?php echo ts('Check Requirements and Install CiviCRM', array('escape' => 'js')); ?>" onclick="document.getElementById('saving_top').style.display = ''; this.value = '<?php echo ts('Installing CiviCRM...', array('escape' => 'js')); ?>'" />
03e04002 32
6a488035
TO
33 <span id="saving_top" style="display: none">
34 &nbsp;
35 <img src=<?php echo $installURLPath . "network-save.gif"?> />
62fbebae 36 <?php echo ts('(this will take a few minutes)'); ?>
6a488035 37 </span>
62fbebae 38 </p>
6a488035
TO
39<?php } ?>
40
62fbebae
ML
41<h4><?php echo ts('Language and Region Settings'); ?></h4>
42
43<p><?php echo ts('CiviCRM has been translated to many languages, thanks to its community of translators. By selecting another language, the installer may be available in that language. The initial configuration of the basic data will also be set to that language (ex: individual prefixes, suffixes, activity types, etc.). <a href="%1">Learn more about using CiviCRM in other languages.</a>', array(1 => 'http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=88408149')); ?></p>
6a488035 44
62fbebae
ML
45<script>
46 function civicrmInstallerSetLanguage(language) {
47 var location = window.location.toString();
48
49 if (location.match(/seedLanguage=.._../)) {
50 location = location.replace(/seedLanguage=.._../, 'seedLanguage=' + language);
51 window.location = location;
52 }
53 else {
54 window.location += '?seedLanguage=' + language;
55 }
56 }
57</script>
58
59<p style="margin-left: 2em" id="locale">
60<label for="seedLanguage"><span><?php echo ts('Language of basic data:'); ?></span></label>
61<select id="seedLanguage" name="seedLanguage" onchange="civicrmInstallerSetLanguage(this.value);">
62 <?php
63 foreach ($langs as $locale => $language) {
64 $selected = ($locale == $seedLanguage) ? 'selected="selected"' : '';
65 echo "<option value='$locale' $selected>$language</option>";
66 }
67 ?>
68</select>
69<noscript>
70 <input type="submit" name="setlanguage" value="<?php echo ts('Change language', array('escape' => 'js')); ?>" />
71</noscript>
72<span class="testResults">
73 <?php
74 if (count($langs) < 2) {
75 echo "(download the civicrm-{$civicrm_version['version']}-l10n.tar.gz file and unzip into CiviCRM’s directory to add languages here)";
76 }
77 ?>
78</span>
79</p>
80
81<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
6a488035
TO
82<input type="hidden" name="database" value="MySQLDatabase" />
83
6a488035 84<p>
62fbebae 85<?php echo ts('CiviCRM stores its content in a MySQL database. Please provide the username and password to connect to the server here. If this account has permission to create databases, then we will create the database for you; otherwise, you must give the name of a database that already exists.'); ?>
6a488035
TO
86</p>
87
88<?php if($dbReq->hasErrors()) { ?>
62fbebae 89 <p class="error"><?php echo ts("Your database settings don't appear to be correct. Please check the <a href='%1'>Database Details</a> below for specific errors.", array(1 => '#dbDetails')); ?></p>
6a488035 90<?php } else { ?>
62fbebae 91 <p class="good"><?php echo ts("Database version and connection settings have been verified and look correct!"); ?></p>
6a488035
TO
92<?php } ?>
93
62fbebae
ML
94<p style="margin-left: 2em" id="mysql_credentials" >
95 <label for="mysql_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="mysql_server" type="text" name="mysql[server]" value="<?php echo $databaseConfig['server'] ?>" /></label> <br />
96 <label for="mysql_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="mysql_username" type="text" name="mysql[username]" value="<?php echo $databaseConfig['username'] ?>" /></label> <br />
97 <label for="mysql_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="mysql_password" type="password" name="mysql[password]" value="<?php echo $databaseConfig['password'] ?>" /></label> <br />
98 <label for="mysql_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="mysql_database" type="text" name="mysql[database]" value="<?php echo $databaseConfig['database'] ?>" /></label> <br />
6a488035
TO
99</p>
100
101<?php if ($installType == 'drupal') { ?>
62fbebae 102<h4><?php echo ts('Drupal Database Settings'); ?></h4>
6a488035 103<p style="margin-left: 2em" id="drupal_credentials" > <!--style="display: none"-->
62fbebae
ML
104 <label for="drupal_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="drupal_server" type="text" name="drupal[server]" value="<?php echo $drupalConfig['server'] ?>" /></label> <br />
105 <label for="drupal_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="drupal_username" type="text" name="drupal[username]" value="<?php echo $drupalConfig['username'] ?>" /></label> <br />
106 <label for="drupal_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="drupal_password" type="password" name="drupal[password]" value="<?php echo $drupalConfig['password'] ?>" /></label> <br />
107 <label for="drupal_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="drupal_database" type="text" name="drupal[database]" value="<?php echo $drupalConfig['database'] ?>" /></label> <br />
6a488035
TO
108</p>
109<?php } ?>
110
111
62fbebae
ML
112<h4><?php echo ts('Other Settings'); ?></h4>
113
114<p>
6a488035
TO
115 <label for="loadGenerated"><span>Load sample data:</span><input id="loadGenerated" type="checkbox" name="loadGenerated" value=1 <?php if ( $loadGenerated == 1 ) { echo "checked='checked'"; } ?> /></label> <br />
116 <span class="testResults">Check this box to pre-populate CiviCRM with sample English contact records, online contribution pages, profile forms, etc. These examples can help you learn about CiviCRM features.</span><br />
117</p>
118
119<p style="margin-left: 2em"><input type="submit" value="Re-check requirements" /></p>
120
121<a name="dbDetails">
122<h4>CiviCRM Database Details</h4>
123<?php $dbReq->showTable("MySQL CiviCRM Configuration"); ?>
124
125<?php if ($installType == 'drupal') {
126echo "<h4>Drupal Database Details</h4>";
127$dbReq->showTable("MySQL Drupal Configuration");
128}?>
129<br /><hr />
130
131<h2 id="requirements">Requirements</h2>
132<?php
133$req->showTable();
134?>
135
136</form>
137</div>
138</body>
139</html>