mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Move to template PHP syntax for installer
This commit is contained in:
parent
53b98284fe
commit
3e17dd3201
@ -7,8 +7,8 @@
|
||||
<title>SilverStripe CMS / Framework Installation</title>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<script type="application/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
|
||||
<script type="application/javascript" src="<?php echo FRAMEWORK_NAME; ?>/src/Dev/Install/client/js/install.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo FRAMEWORK_NAME; ?>/src/Dev/Install/client/styles/install.css">
|
||||
<script type="application/javascript" src="<?=FRAMEWORK_NAME; ?>/src/Dev/Install/client/js/install.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?=FRAMEWORK_NAME; ?>/src/Dev/Install/client/styles/install.css">
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
@ -29,42 +29,42 @@
|
||||
<div id="Layout">
|
||||
<div class="typography">
|
||||
<form action="install.php" method="post">
|
||||
<?php if(isset($hasErrorOtherThanDatabase)) { ?>
|
||||
<?php if(isset($hasErrorOtherThanDatabase)): ?>
|
||||
<p class="message error">
|
||||
You aren't currently able to install the software. Please <a href="#requirements">see below</a> for details.<br>
|
||||
If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/framework/en/installation/server-requirements" target="_blank">server requirements</a>.
|
||||
</p>
|
||||
<?php if (isset($phpIniLocation)) { ?>
|
||||
<p>Your php.ini file is located at <?php echo $phpIniLocation; ?></p>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<?php if($alreadyInstalled) { ?>
|
||||
<?php if (isset($phpIniLocation)): ?>
|
||||
<p>Your php.ini file is located at <?=$phpIniLocation; ?></p>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if($alreadyInstalled): ?>
|
||||
<div class="message warning">
|
||||
<p><strong>Note:</strong> SilverStripe is already installed here.<br>
|
||||
If you wish to reinstall SilverStripe, please delete the <strong>mysite/_config.php</strong> file first.</p>
|
||||
</div>
|
||||
<?php } else if($req->hasWarnings()) { ?>
|
||||
<?php else if($req->hasWarnings()): ?>
|
||||
<div class="message warning">
|
||||
<p>There are some issues that we recommend you look at before installing, however, you are still able to install the software.
|
||||
<br>Please see below for details. If you are having problems meeting the requirements, see the <a href="http://doc.silverstripe.org/framework/en/installation/server-requirements" target="_blank">server requirements</a>.</p>
|
||||
</div>
|
||||
<?php } else if(!$dbReq->hasErrors() && !$adminReq->hasErrors()) { ?>
|
||||
<?php else if(!$dbReq->hasErrors() && !$adminReq->hasErrors()): ?>
|
||||
<div class="message goodInstall"><p>You're ready to install! Please confirm the configuration options below. <a href="#install">Install SilverStripe</a></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($dbReq->hasErrors()) { ?>
|
||||
<?php if($dbReq->hasErrors()): ?>
|
||||
<div class="message error">
|
||||
<p>The database details don't appear to be correct. Please <a href="#database_credentials">review and correct</a> before installing.</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($adminReq->hasErrors()) { ?>
|
||||
<?php if($adminReq->hasErrors()): ?>
|
||||
<div class="message error">
|
||||
<p>Please <a href="#AdminAccount">enter an email address and password</a> for the default administrator account before installing.</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3 class="sectionHeading" id="requirements">Requirements <small>Step 1 of 5</small></h3>
|
||||
<?php $req->showTable(); ?>
|
||||
@ -200,14 +200,14 @@
|
||||
<div class="field">
|
||||
<label for="admin_username">Email:</label>
|
||||
<span class="middleColumn">
|
||||
<input type="text" class="text configured-by-env" name="admin[username]" id="admin_username" value="<?php echo htmlspecialchars($adminConfig['username'], ENT_QUOTES, 'UTF-8'); ?>" <?php if($usingEnv && getenv('SS_DEFAULT_ADMIN_USERNAME')) echo 'disabled="disabled"' ?>>
|
||||
<input type="text" class="text configured-by-env" name="admin[username]" id="admin_username" value="<?=htmlspecialchars($adminConfig['username'], ENT_QUOTES, 'UTF-8'); ?>" <?php if($usingEnv && getenv('SS_DEFAULT_ADMIN_USERNAME')) echo 'disabled="disabled"' ?>>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="admin_password">Password:</label>
|
||||
<span class="middleColumn">
|
||||
<input type="password" class="text configured-by-env" name="admin[password]" id="admin_password" value="<?php echo htmlspecialchars($adminConfig['password'], ENT_QUOTES, 'UTF-8'); ?>" <?php if($usingEnv && getenv('SS_DEFAULT_ADMIN_PASSWORD')) echo 'disabled="disabled"' ?>>
|
||||
<input type="password" class="text configured-by-env" name="admin[password]" id="admin_password" value="<?=htmlspecialchars($adminConfig['password'], ENT_QUOTES, 'UTF-8'); ?>" <?php if($usingEnv && getenv('SS_DEFAULT_ADMIN_PASSWORD')) echo 'disabled="disabled"' ?>>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -246,17 +246,18 @@
|
||||
<h3 class="sectionHeading">Theme selection <small>Step 4 of 5</small></h3>
|
||||
<p class="helpText">You can change the theme or <a href="http://addons.silverstripe.org/add-ons?type=theme">download</a> another from the SilverStripe website after installation.</p>
|
||||
<ul id="Themes">
|
||||
<li><input type="radio" name="template" value="simple" id="Simple" <?php if(!isset($_POST['template']) || $_POST['template'] == 'simple') {?>checked="checked"<?php }?>><label for="Simple"><a href="https://github.com/silverstripe-themes/silverstripe-simple">Simple</a> - our default theme ready to use, or begin the <a href="http://www.silverstripe.org/learn/lessons" target="_blank">lessons</a>.</label></li>
|
||||
<li><input type="radio" name="template" value="tutorial" id="EmptyTemplate" <?php if(isset($_POST['template']) && $_POST['template'] == 'tutorial') {?>checked="checked"<?php }?>><label for="EmptyTemplate">Empty template</label></li>
|
||||
<li><input type="radio" name="template" value="simple" id="Simple"
|
||||
<?php if(!isset($_POST['template']) || $_POST['template'] == 'simple'): ?>checked="checked"<?php endif; ?>><label for="Simple"><a href="https://github.com/silverstripe-themes/silverstripe-simple">Simple</a> - our default theme ready to use, or begin the <a href="http://www.silverstripe.org/learn/lessons" target="_blank">lessons</a>.</label></li>
|
||||
<li><input type="radio" name="template" value="tutorial" id="EmptyTemplate" <?php if(isset($_POST['template']) && $_POST['template'] == 'tutorial'): ?>checked="checked"<?php endif; ?>><label for="EmptyTemplate">Empty template</label></li>
|
||||
</ul>
|
||||
<h3 class="sectionHeading" id="install">Confirm Install <small>Step 5 of 5</small></h3>
|
||||
|
||||
<?php if(isset($hasErrorOtherThanDatabase)) { ?>
|
||||
<?php if(isset($hasErrorOtherThanDatabase)): ?>
|
||||
<p class="error">
|
||||
You aren't currently able to install the software. Please <a href="#requirements">see above</a> 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 page</a>.
|
||||
</p>
|
||||
<?php } else { ?>
|
||||
<?php else: ?>
|
||||
<p id="stats-container">
|
||||
<input type="checkbox" id="stats" name="stats" checked="checked">
|
||||
<label for="stats">Send information about my webserver to silverstripe.org<br />
|
||||
@ -264,19 +265,19 @@
|
||||
</label><p>
|
||||
|
||||
<p>
|
||||
<?php if($alreadyInstalled) { ?>
|
||||
<?php if($alreadyInstalled): ?>
|
||||
<input id="install_button" type="submit" disabled="disabled" class="action" name="go" value="Install SilverStripe">
|
||||
<?php } else { ?>
|
||||
<?php else: ?>
|
||||
<input id="install_button" type="submit" class="action" name="go" value="Install SilverStripe">
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<span id="saving_top" style="display: none">
|
||||
|
||||
<img src="<?php echo FRAMEWORK_NAME; ?>/images/network-save.gif" alt="Saving">
|
||||
<img src="<?=FRAMEWORK_NAME; ?>/images/network-save.gif" alt="Saving">
|
||||
(this will take a minute or so)
|
||||
</span>
|
||||
</p>
|
||||
<?php } ?>
|
||||
<?php endif ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -285,7 +286,7 @@
|
||||
|
||||
<div id="Footer">
|
||||
<div class="footerTop"><!-- --></div>
|
||||
<p><a href="http://silverstripe.org">SilverStripe Open Source CMS / Framework</a> | Copyright © <?php echo date('Y'); ?> SilverStripe Limited</p>
|
||||
<p><a href="http://silverstripe.org">SilverStripe Open Source CMS / Framework</a> | Copyright © <?=date('Y'); ?> SilverStripe Limited</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user