Allow Cachet to be setup not from the server's root

The `asset()` helper was missing at some places so it was not possible
to install it in an other place than the server's root (/).

The paths have been fixed and now use the `asset()` helper. Also,
The steps process takes care of the current path.

See: #3618
This commit is contained in:
Anthony Bocci
2019-06-08 15:00:27 +02:00
parent c30b3659fe
commit c5217637e6
7 changed files with 45 additions and 44 deletions

View File

@@ -251,7 +251,8 @@ $(function () {
// Only validate going forward. If current group is invalid, do not go further
if (next > current) {
var url = '/setup/step' + current;
var currentUrl = window.location.href.replace(/step\d/, '');
var url = currentUrl + '/step' + current;
$.post(url, $form.serializeObject())
.done(function(response) {
goToStep(current, next);