ENHANCEMENT #5024 Installer now checks that the user has entered a username and password correctly for the default admin, an additional button for re-checking requirements is now found at the bottom of the admin configuration section

ENHANCEMENT Error messages for database AND admin configuration are now in the same place at the top of the installer (from r99841)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105535 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 03:14:47 +00:00
parent b3409a2ea3
commit 4d2cc5dbe8

View File

@ -80,14 +80,26 @@
Please see below for details.<br>
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/doku.php?id=server-requirements">server requirements wiki page</a>.
</p>
<?php } else if(!$adminConfig['username'] || !$adminConfig['password']) { ?>
<p class="warning">
Please fill in a username and password for the admin account to install.
</p>
<?php } else if(!$dbReq->hasErrors()) { ?>
<?php } else if(!$dbReq->hasErrors() && !$adminReq->hasErrors()) { ?>
<p class="good">You're ready to install!</p>
<?php } ?>
<?php if($dbReq->hasErrors()) { ?>
<p class="error">
The database details don't appear to be correct. Please <a href="#database_credentials">enter the correct details</a> before installing.
</p>
<?php } else { ?>
<p class="good">
These database details look all good!
</p>
<?php } ?>
<?php if($adminReq->hasErrors()) { ?>
<p class="error">
Please <a href="#AdminAccount">enter a username and password</a> for the default administrator account before installing.
</p>
<?php } ?>
<h3>Template to install:</h3>
<ul id="Themes">
<li><input type="radio" name="template" value="blackcandy" id="BlackCandy" <?php if(!isset($_POST['template']) || $_POST['template'] == 'blackcandy') {?>checked="checked"<?php }?>><label for="BlackCandy">BlackCandy, default template ready to use.</label></li>
@ -122,16 +134,6 @@
<?php } ?>
<h4 class="sectionHeading">Database</h4>
<?php if($dbReq->hasErrors()) { ?>
<p class="error">
These database details don't appear to be correct. Please enter the correct details before installing.
</p>
<?php } else { ?>
<p class="good">
These database details look all good!
</p>
<?php } ?>
<div id="database_credentials" class="section">
<?php if($envFileExists) { ?>
<div id="use_environment_field" class="field">
@ -228,6 +230,9 @@
<input type="text" class="text" name="admin[surname]" id="admin_surname" value="<?php echo $adminConfig['surname']; ?>">
</span>
</div>
<div class="action">
<input type="submit" class="action" value="Re-check requirements">
</div>
</div>
<p id="adminAcc" class="helpText">