Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (44 sloc) 1.757 kb
<div class='admin-install'>
<h1><%= t("Configure MongoDB") %></h1>
<div id="mongo-status" style="display: none;">
</div>
<div>
<%- form %>
</div>
<div class="admin-install-links">
<a href="?installStep=welcome"><%= "<< " + t("First Step: Welcome") %></a> | <a id='form-submit' href=""><%= t("Third Step: Configure Default User") + " >>" %></a>
</div>
<script>
$(document).ready(function() {
// Ajax request to /admin/install/mongo/test
function checkMongo() {
$('#mongo-status').show();
$('#mongo-status').html("<span class='install-progress'>Connecting to MongoDB, please wait ... </span>");
var dbUri = $(".database-uri").val();
var postData = {"dbUri":dbUri};
$.ajax({
type: "POST",
url: "/admin/installTest/mongo",
dataType:"json",
data:postData,
success: function(res){
if(res.status === "OK") {
$('#mongo-status').html("<ul class='info'><li>MongoDB connection successfull ... </li></ul>");
setTimeout(function() {
$('#install-mongo-form').submit();
},1000);
} else {
$('#mongo-status').html("<ul class='error'><li>MongoDB connection failed, please check the details and try again ...</li></ul>");
}
}
});
// $('#install-mongo-form').submit();
// $('#mongo-status').html()
}
$('#form-submit').click(function(event) {
event.preventDefault();
checkMongo();
});
});
</script>
</div>
Jump to Line
Something went wrong with that request. Please try again.