Add footer branding configuration

This commit is contained in:
Johannes Zellner
2020-02-14 15:34:44 +01:00
parent 0a126a15ba
commit 4283046e76
3 changed files with 60 additions and 6 deletions
+34
View File
@@ -21,6 +21,39 @@ 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, 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,
@@ -483,6 +516,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
getTimeZone();
$scope.update.checkStatus();
$scope.branding.refresh();
getSubscription();
});