diff --git a/src/js/client.js b/src/js/client.js index 564114333..649785281 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -1594,13 +1594,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; - Client.prototype.createTicket = function (type, subject, description, appId /* optional */, altEmail /* optional */, callback) { + Client.prototype.createTicket = function (ticket, callback) { + // just to be eplicit here var data = { - type: type, - subject: subject, - description: description, - appId: appId || undefined, - altEmail: altEmail || undefined + enableSshSupport: !!ticket.enableSshSupport, + type: ticket.type, + subject: ticket.subject, + description: ticket.description, + appId: ticket.appId || undefined, + altEmail: ticket.altEmail || undefined }; post('/api/v1/support/ticket', data, null, function (error, data, status) { diff --git a/src/views/support.html b/src/views/support.html index 2121cc583..c7e6fcf20 100644 --- a/src/views/support.html +++ b/src/views/support.html @@ -44,6 +44,11 @@ (Subscription email is {{ subscription.email }}) +
+ +
{{feedback.error}} {{feedback.result.message}} diff --git a/src/views/support.js b/src/views/support.js index ab40b3836..cb02f3de2 100644 --- a/src/views/support.js +++ b/src/views/support.js @@ -15,6 +15,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat error: null, result: null, busy: false, + enableSshSupport: false, subject: '', type: 'app_error', description: '', @@ -26,6 +27,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat $scope.subscription = null; function resetFeedback() { + $scope.feedback.enableSshSupport = false; $scope.feedback.subject = ''; $scope.feedback.description = ''; $scope.feedback.type = 'app_error'; @@ -41,7 +43,16 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat $scope.feedback.result = null; $scope.feedback.error = null; - Client.createTicket($scope.feedback.type, $scope.feedback.subject, $scope.feedback.description, $scope.feedback.appId, $scope.feedback.altEmail, function (error, result) { + var data = { + enableSshSupport: $scope.feedback.enableSshSupport, + subject: $scope.feedback.subject, + description: $scope.feedback.description, + type: $scope.feedback.type, + appId: $scope.feedback.appId, + altEmail: $scope.feedback.altEmail + }; + + Client.createTicket(data, function (error, result) { if (error) { $scope.feedback.error = error.message; } else {