support: remove commented out sections

This commit is contained in:
Girish Ramakrishnan
2024-07-12 14:25:11 +02:00
parent 07396c9824
commit 10bd2e930f
2 changed files with 1 additions and 142 deletions

View File

@@ -18,77 +18,6 @@
</div>
</div>
<!-- <div class="text-left">
<h3>{{ 'support.ticket.title' | tr }}</h3>
</div>
<div class="card">
<div class="grid-item-top">
<div class="row" ng-hide="ready">
<h2 class="text-center"><i class="fa fa-circle-notch fa-spin"></i></h2>
</div>
<div class="row" ng-show="ready">
<div class="col-lg-12">
<div ng-show="subscription && !subscription.emailVerified" style="margin-bottom: 30px;">
<p class="text-bold">
{{ 'support.ticket.emailNotVerified' | tr:{ email: subscription.email } }}
<br/>
<center>
<a ng-href="{{ config.consoleServerOrigin }}" target="_blank" class="btn btn-success">{{ 'support.ticket.emailVerifyAction' | tr }}</a>
</center>
</p>
</div>
<p>Use this form to open support tickets. You can also write directly to <a href="mailto:support@cloudron.io">support@cloudron.io.</p>
<ul>
<li><a href="https://docs.cloudron.io/apps/?support_view" target="_blank">Knowledge Base & App Docs</a></li>
<li><a href="https://docs.cloudron.io/custom-apps/tutorial/?support_view" target="_blank">Custom App Packaging & API</li>
<li><a href="https://forum.cloudron.io/" target="_blank">Forum</a></li>
</ul>
<form name="feedbackForm" ng-submit="submitFeedback()">
<div class="form-group">
<label>{{ 'support.ticket.type' | tr }}</label>
<select class="form-control" name="type" style="width: 50%;" ng-model="feedback.type" required ng-disabled="!subscription.emailVerified">
<option value="app_error">{{ 'support.ticket.typeApp' | tr }}</option>
<option value="ticket">{{ 'support.ticket.typeBug' | tr }}</option>
<option value="billing">{{ 'support.ticket.typeBilling' | tr }}</option>
<option value="email_error">{{ 'support.ticket.typeEmail' | tr }}</option>
</select>
</div>
<div class="form-group" ng-show="feedback.type === 'app_error'">
<label>{{ 'support.ticket.selectApp' | tr }}</label>
<select class="form-control" name="type" style="width: 50%;" ng-model="feedback.appId" ng-required="feedback.type === 'app_error'" ng-disabled="!subscription.emailVerified">
<option ng-repeat="app in apps" value="{{ app.id }}">{{ app.fqdn }}</option>
</select>
</div>
<div class="form-group" ng-class="{ 'has-error': (feedbackForm.subject.$dirty && feedbackForm.subject.$invalid) }">
<label>{{ 'support.ticket.topic' | tr }}</label>
<input type="text" class="form-control" name="subject" ng-model="feedback.subject" ng-maxlength="512" ng-minlength="1" required ng-disabled="!subscription.emailVerified">
</div>
<div class="form-group" ng-class="{ 'has-error': (feedbackForm.description.$dirty && feedbackForm.description.$invalid) }">
<label>{{ 'support.ticket.report' | tr }}</label>
<textarea class="form-control" name="description" rows="3" placeholder="{{ 'support.ticket.reportPlaceholder' | tr }}" ng-model="feedback.description" ng-minlength="1" required ng-disabled="!subscription.emailVerified"></textarea>
</div>
<div class="form-group" ng-class="{ 'has-error': feedbackForm.email.$invalid }">
<label>{{ 'support.ticket.email' | tr }}</label> <small>{{ 'support.ticket.emailInfo' | tr:{ email: subscription.email } }}</small>
<input type="email" class="form-control" name="email" placeholder="{{ 'support.ticket.emailPlaceholder' | tr }}" ng-model="feedback.altEmail" ng-required="feedback.type === 'email_error'" ng-disabled="!subscription.emailVerified">
</div>
<div class="form-group">
<label class="control-label">
<input type="checkbox" ng-model="feedback.enableSshSupport" ng-disabled="!subscription.emailVerified"> {{ 'support.ticket.sshCheckbox' | tr }}
</label>
</div>
<button type="submit" class="btn btn-primary pull-right" ng-disabled="!subscription.emailVerified || feedbackForm.$invalid || feedback.busy"><i class="fa fa-circle-notch fa-spin" ng-show="feedback.busy"></i> {{ 'support.ticket.submitAction' | tr }}</button>
<span ng-show="feedback.error" class="text-danger text-bold">{{feedback.error}}</span>
<span ng-show="feedback.result" class="text-success text-bold">{{feedback.result.message}}</span>
</form>
</div>
</div>
</div>
</div> -->
<div class="text-left section-header">
<h3>{{ 'support.remoteSupport.title' | tr }}</h3>
</div>

View File

@@ -9,69 +9,9 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
$scope.ready = false;
$scope.config = Client.getConfig();
$scope.user = Client.getUserInfo();
// $scope.apps = Client.getInstalledApps();
// $scope.appsById = {};
// $scope.feedback = {
// error: null,
// result: null,
// busy: false,
// enableSshSupport: false,
// subject: '',
// type: 'app_error',
// description: '',
// appId: '',
// altEmail: ''
// };
$scope.toggleSshSupportError = '';
$scope.sshSupportEnabled = false;
// $scope.subscription = null;
// function resetFeedback() {
// $scope.feedback.enableSshSupport = false;
// $scope.feedback.subject = '';
// $scope.feedback.description = '';
// $scope.feedback.type = 'app_error';
// $scope.feedback.appId = '';
// $scope.feedback.altEmail = '';
// $scope.feedbackForm.$setUntouched();
// $scope.feedbackForm.$setPristine();
// }
// $scope.submitFeedback = function () {
// $scope.feedback.busy = true;
// $scope.feedback.result = null;
// $scope.feedback.error = null;
// 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 {
// $scope.feedback.result = result;
// resetFeedback();
// }
// $scope.feedback.busy = false;
// // refresh state
// Client.getRemoteSupport(function (error, enabled) {
// if (error) return console.error(error);
// $scope.sshSupportEnabled = enabled;
// });
// });
// };
$scope.toggleSshSupport = function () {
$scope.toggleSshSupportError = '';
@@ -93,17 +33,7 @@ angular.module('Application').controller('SupportController', ['$scope', '$locat
$scope.sshSupportEnabled = enabled;
// Client.getSubscription(function (error, result) {
// if (error && error.statusCode === 402) return $scope.ready = true; // not yet registered
// if (error && error.statusCode === 412) return $scope.ready = true; // invalid appstore token
// if (error) return console.error(error);
// $scope.subscription = result;
// Client.getInstalledApps().forEach(function (app) { $scope.appsById[app.id] = app; });
$scope.ready = true;
// });
$scope.ready = true;
});
});