[REF] minor cleanup of groupBy definition.
[civicrm-core.git] / install / template.html
index d9ace3f94def6627d4528d84efc7b370073b5e30..e95165536b2e43f38345a7bf038babac463aa261 100644 (file)
@@ -1,15 +1,19 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<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; ?>">
 <head>
-<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"?> />
+  <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";
+}
+?>
 </head>
-
 <body>
 
 <div id="All">
-  <div style="float: right"><strong>Version <?php echo "{$civicrm_version['version']} {$civicrm_version['cms']}" ?></strong><br/>
+  <div class="civicrm-logo"><strong><?php echo ts('Version %1', array(1 => "{$civicrm_version['version']} {$civicrm_version['cms']}")); ?></strong><br/>
     <span><img src=<?php echo $installURLPath . "block_small.png"?> /></span>
   </div>
 
 
 <form name="civicrm_form" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
 
-<?php if(isset($hasErrorOtherThanDatabase)) { ?>
+  <input type="hidden" name="civicrm_install_type" value="<?php echo $installType; ?>" />
+
+<?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()) { ?>
+  <?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 } else if(!$dbReq->hasErrors()) { ?>
+  <?php } elseif (!$dbReq->hasErrors()) { ?>
     <p class="good"><?php echo ts("You're ready to install!"); ?></p>
   <?php } ?>
 
@@ -51,7 +57,7 @@
        window.location = location;
      }
      else {
-       window.location += '?seedLanguage=' + language;
+       window.location += (location.indexOf('?') < 0 ? '?' : '&') + 'seedLanguage=' + language;
      }
   }
 </script>
 </span>
 </p>
 
-<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
 <input type="hidden" name="database" value="MySQLDatabase" />
 
+<h2><?php echo ts('Database Version and Connection Settings'); ?></h2>
 <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()) { ?>
+<?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 } ?>
 
-<p style="margin-left: 2em" id="mysql_credentials" >
-  <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 />
+<h4><?php echo ts('CiviCRM Database Settings'); ?></h4>
+<p style="margin-left: 2em" id="mysql_credentials">
+  <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>
+  <span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </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 />
+  <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>
+  <span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </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 } ?>
 
+<?php if ($installType == 'backdrop') { ?>
+<h4><?php echo ts('Backdrop Database Settings'); ?></h4>
+<p style="margin-left: 2em" id="backdrop_credentials" > <!--style="display: none"-->
+  <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>
+  <span class="testResults"> <?php echo ts('If your mysql server is running on other port than default 3306, provide server info as server:port (i.e. localhost:1234) ') ?> </span> </br>
+  <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 />
+  <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 />
+  <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 />
+</p>
+<?php } ?>
 
 <h4><?php echo ts('Other Settings'); ?></h4>
 
     <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>
 
-<p style="margin-left: 2em"><input type="submit" value="Re-check requirements" /></p>
+<p style="margin-left: 2em"><input type="submit" value="<?php echo ts('Re-check requirements', array('escape' => 'js')); ?>" /></p>
 
 <a name="dbDetails">
-<h4>CiviCRM Database Details</h4>
-<?php $dbReq->showTable("MySQL CiviCRM Configuration"); ?>
+
+<?php
+  echo '<h4>' . ts('CiviCRM Database Details') . '</h4>';
+  $dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'CiviCRM')));
+?>
 
 <?php if ($installType == 'drupal') {
-echo "<h4>Drupal Database Details</h4>";
-$dbReq->showTable("MySQL Drupal Configuration");
+echo "<h4>" . ts('Drupal Database Details') . "</h4>";
+$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Drupal')));
+}?>
+
+<?php if ($installType == 'backdrop') {
+echo "<h4>" . ts('Backdrop Database Details') . "</h4>";
+$dbReq->showTable(ts("MySQL %1 Configuration", array(1 => 'Backdrop')));
 }?>
 <br /><hr />
 
-<h2 id="requirements">Requirements</h2>
+<h2 id="requirements"><?php echo ts('Requirements'); ?></h2>
 <?php
 $req->showTable();
 ?>