diff --git a/src/routes/cloudron.js b/src/routes/cloudron.js
index 730950067..da4ed29cb 100644
--- a/src/routes/cloudron.js
+++ b/src/routes/cloudron.js
@@ -135,7 +135,7 @@ function feedback(req, res, next) {
req.body.type !== mailer.FEEDBACK_TYPE_TICKET &&
req.body.type !== mailer.FEEDBACK_TYPE_APP_MISSING &&
req.body.type !== mailer.FEEDBACK_TYPE_UPGRADE_REQUEST &&
- req.body.type !== mailer.FEEDBACK_TYPE_APP_ERROR) return next(new HttpError(400, 'type must be either "ticket", "feedback", "app_missing", "app_error" or "upgrade"'));
+ req.body.type !== mailer.FEEDBACK_TYPE_APP_ERROR) return next(new HttpError(400, 'type must be either "ticket", "feedback", "app_missing", "app_error" or "upgrade_request"'));
if (typeof req.body.subject !== 'string' || !req.body.subject) return next(new HttpError(400, 'subject must be string'));
if (typeof req.body.description !== 'string' || !req.body.description) return next(new HttpError(400, 'description must be string'));
diff --git a/webadmin/src/index.html b/webadmin/src/index.html
index 77da79579..df36c38d9 100644
--- a/webadmin/src/index.html
+++ b/webadmin/src/index.html
@@ -111,6 +111,25 @@
+
+
+
+
+
+
+
See available plans for upgrade at cloudron.io.
+
+
+
+
+
+
diff --git a/webadmin/src/js/main.js b/webadmin/src/js/main.js
index 633c7df1a..b38ffcecf 100644
--- a/webadmin/src/js/main.js
+++ b/webadmin/src/js/main.js
@@ -13,6 +13,10 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
password: ''
};
+ $scope.upgradeRequest = {
+ busy: false
+ };
+
$scope.isActive = function (url) {
if (!$route.current) return false;
return $route.current.$$route.originalPath.indexOf(url) === 0;
@@ -37,6 +41,23 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
window.location.href = '/error.html';
};
+ $scope.requestUpgrade = function () {
+ $scope.upgradeRequest.busy = true;
+
+ var subject = 'User requested upgrade for ' + $scope.config.fqdn;
+ var description = 'User ' + $scope.user.email + ' requested an upgrade for ' + $scope.config.fqdn + '. Get back to him!!';
+
+ Client.feedback('upgrade_request', subject, description, function (error) {
+ $scope.upgradeRequest.busy = false;
+
+ if (error) return Client.notify('Error', error.message, false, 'error');
+
+ Client.notify('Success', 'We will get back to you as soon as possible for the upgrade.', true, 'success');
+
+ $('#upgradeModal').modal('hide');
+ });
+ };
+
$scope.showUpdateModal = function (form) {
$scope.update.error.password = null;
$scope.update.password = '';
diff --git a/webadmin/src/views/appstore.html b/webadmin/src/views/appstore.html
index 72841ad2e..eb9d93679 100644
--- a/webadmin/src/views/appstore.html
+++ b/webadmin/src/views/appstore.html
@@ -104,11 +104,10 @@
This Cloudron is running low on resources.
Installing this app might decrease the performance of other apps. The Cloudron's resources can be extended with a plan upgrade or available resources may be freed up by uninstalling unused applications.
-
See available plans for upgrade at cloudron.io.