2015-08-17 12:42:02 +08:00
|
|
|
<h2>Install Flarum</h2>
|
|
|
|
|
2015-08-31 12:55:16 +08:00
|
|
|
<p>Set up your forum by filling out your details below. If you have any trouble, get help on the <a href="http://flarum.org/docs/installation" target="_blank">Flarum website</a>.</p>
|
2015-08-17 12:42:02 +08:00
|
|
|
|
2015-09-01 04:37:04 +08:00
|
|
|
<form method="post">
|
2015-08-17 12:42:02 +08:00
|
|
|
<div id="error" style="display:none"></div>
|
|
|
|
|
|
|
|
<div class="FormGroup">
|
|
|
|
<div class="FormField">
|
|
|
|
<label>Forum Title</label>
|
|
|
|
<input name="forumTitle">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormGroup">
|
|
|
|
<div class="FormField">
|
|
|
|
<label>MySQL Host</label>
|
|
|
|
<input name="mysqlHost" value="localhost">
|
|
|
|
</div>
|
|
|
|
|
2015-09-04 18:00:39 +08:00
|
|
|
<div class="FormField">
|
|
|
|
<label>MySQL Database</label>
|
|
|
|
<input name="mysqlDatabase">
|
|
|
|
</div>
|
|
|
|
|
2015-08-17 12:42:02 +08:00
|
|
|
<div class="FormField">
|
|
|
|
<label>MySQL Username</label>
|
|
|
|
<input name="mysqlUsername">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormField">
|
|
|
|
<label>MySQL Password</label>
|
|
|
|
<input type="password" name="mysqlPassword">
|
|
|
|
</div>
|
2015-09-04 20:15:52 +08:00
|
|
|
|
2016-06-20 18:15:25 +08:00
|
|
|
<div class="FormField">
|
|
|
|
<label>MySQL Port</label>
|
|
|
|
<input type="number" name="mysqlPort">
|
|
|
|
</div>
|
|
|
|
|
2015-08-31 15:10:27 +08:00
|
|
|
<div class="FormField">
|
|
|
|
<label>Table Prefix</label>
|
2015-09-04 18:14:48 +08:00
|
|
|
<input type="text" name="tablePrefix">
|
2015-08-31 15:10:27 +08:00
|
|
|
</div>
|
2015-08-17 12:42:02 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormGroup">
|
|
|
|
<div class="FormField">
|
|
|
|
<label>Admin Username</label>
|
|
|
|
<input name="adminUsername">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormField">
|
|
|
|
<label>Admin Email</label>
|
|
|
|
<input name="adminEmail">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormField">
|
|
|
|
<label>Admin Password</label>
|
|
|
|
<input type="password" name="adminPassword">
|
2015-09-04 20:15:52 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormField">
|
|
|
|
<label>Confirm Password</label>
|
2015-09-04 18:00:03 +08:00
|
|
|
<input type="password" name="adminPasswordConfirmation">
|
2015-08-17 12:42:02 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="FormButtons">
|
|
|
|
<button type="submit">Install Flarum</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
$('form :input:first').select();
|
|
|
|
|
|
|
|
$('form').on('submit', function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
var $button = $(this).find('button')
|
|
|
|
.text('Please Wait...')
|
|
|
|
.prop('disabled', true);
|
|
|
|
|
|
|
|
$.post('', $(this).serialize())
|
|
|
|
.done(function() {
|
|
|
|
window.location.reload();
|
|
|
|
})
|
|
|
|
.fail(function(data) {
|
2015-10-19 12:39:54 +08:00
|
|
|
$('#error').show().text('Something went wrong:\n\n' + data.responseText);
|
2015-08-17 12:42:02 +08:00
|
|
|
|
|
|
|
$button.prop('disabled', false).text('Install Flarum');
|
|
|
|
});
|
2015-09-01 04:35:12 +08:00
|
|
|
|
|
|
|
return false;
|
2015-08-17 12:42:02 +08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|