Index: /trunk/admin/themes/default/template/install.tpl
===================================================================
--- /trunk/admin/themes/default/template/install.tpl	(revision 5570)
+++ /trunk/admin/themes/default/template/install.tpl	(revision 5571)
@@ -92,4 +92,14 @@
   color: #ff3363;
 }
+
+.config_creation_failed {
+  text-align:left;
+  border:3px solid #F20D00;
+  color:#999;
+  margin:20px;
+  padding:0px 20px 5px 20px;
+  background-image:url(admin/themes/default/icon/errors.png);
+  background-repeat:no-repeat;
+}
 </style>
 {/literal}
@@ -104,4 +114,24 @@
 
 <h2>Piwigo {$RELEASE} - {'Installation'|@translate}</h2>
+
+{if isset($config_creation_failed)}
+<div class="config_creation_failed">
+  <p style="margin-left:30px;">
+    <strong>{'Creation of config file local/config/database.inc.php failed.'|@translate}</strong>
+  </p>
+  <ul>
+    <li>
+      <p>{'You can download the config file and upload it to local/config directory of your installation.'|@translate}</p>
+      <p style="text-align:center">
+          <input type="button" value="{'Download the config file'|@translate}" onClick="window.open('{$config_url}');">
+      </p>
+    </li>
+    <li>
+      <p>{'An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)'|@translate}</p>
+      <textarea rows="15" cols="70">{$config_file_content}</textarea>
+    </li>
+  </ul>
+</div>
+{/if}
 
 {if isset($errors)}
Index: /trunk/install.php
===================================================================
--- /trunk/install.php	(revision 5570)
+++ /trunk/install.php	(revision 5571)
@@ -336,15 +336,11 @@
       @fclose($fh);
 
-      $error_copy = l10n('Creation of config file local/config/database.inc.php failed.');
-      $error_copy .= sprintf('<br><a href="install.php?dl=%s">%s</a> %s',
-                             $tmp_filename,
-                             l10n('You can download the config file'),
-                             l10n('and upload it to local/config directory of your installation.')
+      $template->assign(
+        array(
+          'config_creation_failed' => true,
+          'config_url' => 'install.php?dl='.$tmp_filename,
+          'config_file_content' => $file_content,
+          )
         );
-
-      $error_copy .= '<br><br>';
-      $error_copy .= l10n('An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)');
-      $error_copy .= '<br><br>';
-      $error_copy .= '<textarea rows="15" cols="70">' . $file_content . '</textarea>';
     }
     @fputs($fp, $file_content, strlen($file_content));
@@ -444,8 +440,8 @@
     $html_content = htmlentities( $file_content, ENT_QUOTES );
     $html_content = nl2br( $html_content );
-    $error_copy = l10n('Copy the text in pink between hyphens and paste it into the file "local/config/database.inc.php"(Warning : database.inc.php must only contain what is in pink, no line return or space character)');
-    $error_copy .= '<br>--------------------------------------------------------------------<br>';
-    $error_copy .= '<span class="sql_content">' . $html_content . '</span>';
-    $error_copy .= '<br>--------------------------------------------------------------------<br>';
+    
+    $error_copy = l10n('An alternate solution is to copy the text in the box above and paste it into the file "local/config/database.inc.php" (Warning : database.inc.php must only contain what is in the textarea, no line return or space character)');
+    $error_copy .= '<br><br>';
+    $error_copy .= '<textarea rows="15" cols="70">'.$html_content.'</textarea>';
   } 
   else 
@@ -463,5 +459,6 @@
       'T_CONTENT_ENCODING' => 'utf-8',
       'migration' => true
-	  ));
+      )
+    );
 }
 else
