template.html 7.81 KB
Newer Older
totten's avatar
totten committed
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="<?php echo $short_lang_code; ?>" lang="<?php echo $short_lang_code; ?>" dir="<?php echo $text_direction; ?>">
totten's avatar
totten committed
3
<head>
4 5 6 7 8 9 10 11
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <title><?php echo ts('CiviCRM Installer'); ?></title>
  <link rel="stylesheet" type="text/css" href=<?php echo $installURLPath . "template.css"?> />
<?php
if ($text_direction == 'rtl') {
  echo "  <link rel='stylesheet' type='text/css' href='{$installURLPath}template-rtl.css' />\n";
}
?>
totten's avatar
totten committed
12 13
</head>
<body>
14

totten's avatar
totten committed
15
<div id="All">
16
  <div class="civicrm-logo"><strong><?php echo ts('Version %1', array(1 => "{$civicrm_version['version']} {$civicrm_version['cms']}")); ?></strong><br/>
colemanw's avatar
colemanw committed
17
    <span><img src=<?php echo $installURLPath . "block_small.png"?> /></span>
18
  </div>
totten's avatar
totten committed
19

20 21
<h1><?php echo ts("CiviCRM Installer"); ?></h1>
<p><?php echo ts("Thanks for choosing CiviCRM! Please follow the instructions below to install CiviCRM."); ?></p>
gitsync's avatar
gitsync committed
22

23
<form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
gitsync's avatar
gitsync committed
24

25 26 27 28 29 30 31 32 33 34 35
<?php if (isset($hasErrorOtherThanDatabase)) { ?>
  <p class="error"><?php echo ts('We are not able to install the software. Please <a href="#requirements">see below</a> for details.'); ?></p>
<?php } else { ?>
  <?php if ($req->hasWarnings()) { ?>
    <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>
  <?php } elseif (!$dbReq->hasErrors()) { ?>
    <p class="good"><?php echo ts("You're ready to install!"); ?></p>
  <?php } ?>

  <p>
  <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')); ?>'" />
36

totten's avatar
totten committed
37 38 39
  <span id="saving_top" style="display: none">
  &nbsp;
    <img src=<?php echo $installURLPath . "network-save.gif"?> />
40
  <?php echo ts('(this will take a few minutes)'); ?>
totten's avatar
totten committed
41
  </span>
42
  </p>
totten's avatar
totten committed
43 44
<?php } ?>

45
<h4><?php echo ts('Language and Region Settings'); ?></h4>
totten's avatar
totten committed
46

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>
totten's avatar
totten committed
48

49 50 51
<script>
  function civicrmInstallerSetLanguage(language) {
     var location = window.location.toString();
totten's avatar
totten committed
52

53 54 55 56 57
     if (location.match(/seedLanguage=.._../)) {
       location = location.replace(/seedLanguage=.._../, 'seedLanguage=' + language);
       window.location = location;
     }
     else {
58
       window.location += (location.indexOf('?') < 0 ? '?' : '&') + 'seedLanguage=' + language;
59 60 61
     }
  }
</script>
totten's avatar
totten committed
62

63 64 65
<p style="margin-left: 2em" id="locale">
<label for="seedLanguage"><span><?php echo ts('Language of basic data:'); ?></span></label>
<select id="seedLanguage" name="seedLanguage" onchange="civicrmInstallerSetLanguage(this.value);">
gitsync's avatar
gitsync committed
66 67 68 69 70 71 72
  <?php
    foreach ($langs as $locale => $language) {
      $selected = ($locale == $seedLanguage) ? 'selected="selected"' : '';
      echo "<option value='$locale' $selected>$language</option>";
    }
  ?>
</select>
73 74 75
<noscript>
  <input type="submit" name="setlanguage" value="<?php echo ts('Change language', array('escape' => 'js')); ?>" />
</noscript>
gitsync's avatar
gitsync committed
76 77 78 79 80 81
<span class="testResults">
  <?php
    if (count($langs) < 2) {
      echo "(download the civicrm-{$civicrm_version['version']}-l10n.tar.gz file and unzip into CiviCRM’s directory to add languages here)";
    }
  ?>
82 83 84 85 86
</span>
</p>

<input type="hidden" name="database" value="MySQLDatabase" />

87
<h2><?php echo ts('Database Version and Connection Settings'); ?></h2>
88 89 90 91 92 93 94 95 96 97
<p>
<?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.'); ?>
</p>

<?php if ($dbReq->hasErrors()) { ?>
  <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>
<?php } else { ?>
  <p class="good"><?php echo ts("Database version and connection settings have been verified and look correct!"); ?></p>
<?php } ?>

98 99
<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
<p style="margin-left: 2em" id="mysql_credentials">
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
  <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 />
  <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 />
  <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 />
  <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 />
</p>

<?php if ($installType == 'drupal') { ?>
<h4><?php echo ts('Drupal Database Settings'); ?></h4>
<p style="margin-left: 2em" id="drupal_credentials" > <!--style="display: none"-->
  <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 />
  <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 />
  <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 />
  <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 />
</p>
<?php } ?>


<h4><?php echo ts('Other Settings'); ?></h4>

<p>
totten's avatar
totten committed
120 121 122 123
    <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 />
    <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 />
</p>

124
<p style="margin-left: 2em"><input type="submit" value="<?php echo ts('Re-check requirements', array('escape' => 'js')); ?>" /></p>
totten's avatar
totten committed
125 126

<a name="dbDetails">
127 128 129 130 131

<?php
  echo '<h4>' . ts('CiviCRM Database Details') . '</h4>';
  $dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'CiviCRM')));
?>
totten's avatar
totten committed
132 133

<?php if ($installType == 'drupal') {
134 135
echo "<h4>" . ts('Drupal Database Details') . "</h4>";
$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Drupal')));
totten's avatar
totten committed
136 137 138
}?>
<br /><hr />

139
<h2 id="requirements"><?php echo ts('Requirements'); ?></h2>
totten's avatar
totten committed
140 141 142 143 144 145 146 147
<?php
$req->showTable();
?>

</form>
</div>
</body>
</html>