CRM-19606 : provide help text for providing mysql port info
[civicrm-core.git] / install / template.html
CommitLineData
6a488035 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3a55aa6b 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $short_lang_code; ?>" lang="<?php echo $short_lang_code; ?>" dir="<?php echo $text_direction; ?>">
6a488035 3<head>
3a55aa6b
ML
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
5 <title><?php echo ts('CiviCRM Installer'); ?></title>
6 <link rel="stylesheet" type="text/css" href=<?php echo $installURLPath . "template.css"?> />
7<?php
8if ($text_direction == 'rtl') {
9 echo " <link rel='stylesheet' type='text/css' href='{$installURLPath}template-rtl.css' />\n";
10}
11?>
6a488035 12</head>
6a488035 13<body>
97b8e6b2 14
6a488035 15<div id="All">
3a55aa6b 16 <div class="civicrm-logo"><strong><?php echo ts('Version %1', array(1 => "{$civicrm_version['version']} {$civicrm_version['cms']}")); ?></strong><br/>
10920791 17 <span><img src=<?php echo $installURLPath . "block_small.png"?> /></span>
97b8e6b2 18 </div>
6a488035 19
97b8e6b2 20<h1><?php echo ts("CiviCRM Installer"); ?></h1>
21<p><?php echo ts("Thanks for choosing CiviCRM! Please follow the instructions below to install CiviCRM."); ?></p>
4046d167 22
97b8e6b2 23<form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
4046d167 24
97b8e6b2 25<?php if (isset($hasErrorOtherThanDatabase)) { ?>
26 <p class="error"><?php echo ts('We are not able to install the software. Please <a href="#requirements">see below</a> for details.'); ?></p>
27<?php } else { ?>
28 <?php if ($req->hasWarnings()) { ?>
29 <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>
30 <?php } elseif (!$dbReq->hasErrors()) { ?>
31 <p class="good"><?php echo ts("You're ready to install!"); ?></p>
32 <?php } ?>
33
34 <p>
35 <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 36
6a488035
TO
37 <span id="saving_top" style="display: none">
38 &nbsp;
39 <img src=<?php echo $installURLPath . "network-save.gif"?> />
97b8e6b2 40 <?php echo ts('(this will take a few minutes)'); ?>
6a488035 41 </span>
97b8e6b2 42 </p>
6a488035
TO
43<?php } ?>
44
97b8e6b2 45<h4><?php echo ts('Language and Region Settings'); ?></h4>
6a488035 46
97b8e6b2 47<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 48
97b8e6b2 49<script>
50 function civicrmInstallerSetLanguage(language) {
51 var location = window.location.toString();
6a488035 52
97b8e6b2 53 if (location.match(/seedLanguage=.._../)) {
54 location = location.replace(/seedLanguage=.._../, 'seedLanguage=' + language);
55 window.location = location;
56 }
57 else {
e181e386 58 window.location += (location.indexOf('?') < 0 ? '?' : '&') + 'seedLanguage=' + language;
97b8e6b2 59 }
60 }
61</script>
6a488035 62
97b8e6b2 63<p style="margin-left: 2em" id="locale">
64<label for="seedLanguage"><span><?php echo ts('Language of basic data:'); ?></span></label>
65<select id="seedLanguage" name="seedLanguage" onchange="civicrmInstallerSetLanguage(this.value);">
4046d167
C
66 <?php
67 foreach ($langs as $locale => $language) {
68 $selected = ($locale == $seedLanguage) ? 'selected="selected"' : '';
69 echo "<option value='$locale' $selected>$language</option>";
70 }
71 ?>
72</select>
97b8e6b2 73<noscript>
74 <input type="submit" name="setlanguage" value="<?php echo ts('Change language', array('escape' => 'js')); ?>" />
75</noscript>
4046d167
C
76<span class="testResults">
77 <?php
78 if (count($langs) < 2) {
79 echo "(download the civicrm-{$civicrm_version['version']}-l10n.tar.gz file and unzip into CiviCRM’s directory to add languages here)";
80 }
81 ?>
97b8e6b2 82</span>
83</p>
84
97b8e6b2 85<input type="hidden" name="database" value="MySQLDatabase" />
86
2f8082cd 87<h2><?php echo ts('Database Version and Connection Settings'); ?></h2>
97b8e6b2 88<p>
89<?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.'); ?>
90</p>
91
92<?php if ($dbReq->hasErrors()) { ?>
93 <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>
94<?php } else { ?>
95 <p class="good"><?php echo ts("Database version and connection settings have been verified and look correct!"); ?></p>
96<?php } ?>
97
2f8082cd
ML
98<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
99<p style="margin-left: 2em" id="mysql_credentials">
88a3034b 100 <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 />
155706ab 101 <span><?php echo ts('If your mysql server is running on other port then default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
88a3034b
AJ
102 <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 />
103 <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 />
104 <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 />
97b8e6b2 105</p>
106
107<?php if ($installType == 'drupal') { ?>
108<h4><?php echo ts('Drupal Database Settings'); ?></h4>
109<p style="margin-left: 2em" id="drupal_credentials" > <!--style="display: none"-->
88a3034b 110 <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 />
155706ab 111 <span><?php echo ts('If your mysql server is running on other port then default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
88a3034b
AJ
112 <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 />
113 <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 />
114 <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 />
97b8e6b2 115</p>
116<?php } ?>
117
5757adf3
HD
118<?php if ($installType == 'backdrop') { ?>
119<h4><?php echo ts('Backdrop Database Settings'); ?></h4>
120<p style="margin-left: 2em" id="backdrop_credentials" > <!--style="display: none"-->
121 <label for="backdrop_server"> <span><?php echo ts('MySQL server:'); ?></span> <input id="backdrop_server" type="text" name="backdrop[server]" value="<?php echo $backdropConfig['server'] ?>" /></label> <br />
155706ab 122 <span><?php echo ts('If your mysql server is running on other port then default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
5757adf3
HD
123 <label for="backdrop_username"> <span><?php echo ts('MySQL username:'); ?></span> <input id="backdrop_username" type="text" name="backdrop[username]" value="<?php echo $backdropConfig['username'] ?>" /></label> <br />
124 <label for="backdrop_password"> <span><?php echo ts('MySQL password:'); ?></span> <input id="backdrop_password" type="password" name="backdrop[password]" value="<?php echo $backdropConfig['password'] ?>" /></label> <br />
125 <label for="backdrop_database"><span><?php echo ts('MySQL database:'); ?></span> <input id="backdrop_database" type="text" name="backdrop[database]" value="<?php echo $backdropConfig['database'] ?>" /></label> <br />
126</p>
127<?php } ?>
97b8e6b2 128
129<h4><?php echo ts('Other Settings'); ?></h4>
130
131<p>
6a488035
TO
132 <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 />
133 <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 />
134</p>
135
2f8082cd 136<p style="margin-left: 2em"><input type="submit" value="<?php echo ts('Re-check requirements', array('escape' => 'js')); ?>" /></p>
6a488035
TO
137
138<a name="dbDetails">
2f8082cd
ML
139
140<?php
141 echo '<h4>' . ts('CiviCRM Database Details') . '</h4>';
142 $dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'CiviCRM')));
143?>
6a488035
TO
144
145<?php if ($installType == 'drupal') {
2f8082cd
ML
146echo "<h4>" . ts('Drupal Database Details') . "</h4>";
147$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Drupal')));
6a488035 148}?>
5757adf3
HD
149
150<?php if ($installType == 'backdrop') {
151echo "<h4>" . ts('Backdrop Database Details') . "</h4>";
152$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Backdrop')));
153}?>
6a488035
TO
154<br /><hr />
155
2f8082cd 156<h2 id="requirements"><?php echo ts('Requirements'); ?></h2>
6a488035
TO
157<?php
158$req->showTable();
159?>
160
161</form>
162</div>
163</body>
164</html>