diff --git a/src/index.html b/src/index.html
index dcd978909..3afd772a7 100644
--- a/src/index.html
+++ b/src/index.html
@@ -134,6 +134,7 @@
Profile
Backups
+ Branding
Domains & Certs
Email
Event Log
diff --git a/src/js/client.js b/src/js/client.js
index c67c6dbbb..67ff7b402 100644
--- a/src/js/client.js
+++ b/src/js/client.js
@@ -721,7 +721,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.setFooter = function (footer, callback) {
- post('/api/v1/settings/footer', { footer: footer }, null, function (error, data, status) {
+ post('/api/v1/branding/footer', { footer: footer }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -730,7 +730,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getFooter = function (callback) {
- get('/api/v1/settings/footer', null, function (error, data, status) {
+ get('/api/v1/branding/footer', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
diff --git a/src/js/index.js b/src/js/index.js
index a02863689..442451a07 100644
--- a/src/js/index.js
+++ b/src/js/index.js
@@ -129,6 +129,9 @@ app.config(['$routeProvider', function ($routeProvider) {
}).when('/backups', {
controller: 'BackupsController',
templateUrl: 'views/backups.html?<%= revision %>'
+ }).when('/branding', {
+ controller: 'BrandingController',
+ templateUrl: 'views/branding.html?<%= revision %>'
}).when('/graphs', {
controller: 'GraphsController',
templateUrl: 'views/graphs.html?<%= revision %>'
diff --git a/src/views/branding.html b/src/views/branding.html
new file mode 100644
index 000000000..cc49954c9
--- /dev/null
+++ b/src/views/branding.html
@@ -0,0 +1,34 @@
+
+
+
+
Branding
+
+
+
+
Footer
+
+
+
+
+
+ Customizing the footer is only available in the business plan.
+
+
+
+
+
+
+
+
diff --git a/src/views/branding.js b/src/views/branding.js
new file mode 100644
index 000000000..a3abf9c7d
--- /dev/null
+++ b/src/views/branding.js
@@ -0,0 +1,45 @@
+'use strict';
+
+/* global angular:false */
+/* global $:false */
+
+angular.module('Application').controller('BrandingController', ['$scope', '$location', 'Client', function ($scope, $location, Client) {
+ Client.onReady(function () { if (Client.getUserInfo().role !== 'owner') $location.path('/'); });
+
+ $scope.client = Client;
+ $scope.user = Client.getUserInfo();
+ $scope.config = Client.getConfig();
+
+ $scope.footer = {
+ busy: false,
+ content: '',
+
+ save: function () {
+ $scope.footer.busy = true;
+
+ Client.setFooter($scope.footer.content.trim(), function (error) {
+ if (error) return console.error('Failed to set footer.', error);
+
+ Client.refreshConfig(function () {
+ $scope.footer.busy = false;
+ });
+ });
+ },
+
+ refresh: function () {
+ $scope.footer.busy = true;
+ Client.getFooter(function (error, result) {
+ if (error) return console.error('Unable to fetch footer content.', error);
+
+ $scope.footer.content = result;
+ $scope.footer.busy = false;
+ });
+ }
+ };
+
+ Client.onReady(function () {
+ $scope.footer.refresh();
+ });
+
+ $('.modal-backdrop').remove();
+}]);
diff --git a/src/views/settings.html b/src/views/settings.html
index c8d08b3d2..30411fedb 100644
--- a/src/views/settings.html
+++ b/src/views/settings.html
@@ -384,33 +384,4 @@
-
-
-
Branding
-
-
-
-
-
- Customizing the footer is only available in the business plan.
-
-
-
-
-
-
-
diff --git a/src/views/settings.js b/src/views/settings.js
index 3ae2d3c38..0e4b4c954 100644
--- a/src/views/settings.js
+++ b/src/views/settings.js
@@ -21,39 +21,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
}
};
- $scope.branding = {
- footer: {
- busy: false,
- content: '',
-
- save: function () {
- $scope.branding.footer.busy = true;
-
- Client.setFooter($scope.branding.footer.content.trim(), function (error) {
- if (error) return console.error('Failed to set footer.', error);
-
- Client.refreshConfig(function () {
- $scope.branding.footer.busy = false;
- });
- });
- },
-
- refresh: function () {
- $scope.branding.footer.busy = true;
- Client.getFooter(function (error, result) {
- if (error) return console.error('Unable to fetch footer content.', error);
-
- $scope.branding.footer.content = result;
- $scope.branding.footer.busy = false;
- });
- }
- },
-
- refresh: function () {
- $scope.branding.footer.refresh();
- }
- }
-
$scope.update = {
error: {}, // this is for the dialog
busy: false,
@@ -489,7 +456,6 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
getTimeZone();
$scope.update.checkStatus();
- $scope.branding.refresh();
if ($scope.user.isAtLeastOwner) getSubscription();
});