1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

fix: restore current policy on dropdown selection

This commit is contained in:
Sylvain 2019-04-25 11:58:42 +02:00
parent 162a56250a
commit 8369e2e78e

View File

@ -261,6 +261,10 @@ Application.Controllers.controller('SettingsController', ['$scope', '$filter', '
* Change the revision of the displayed privacy policy, from drafts history
*/
$scope.handlePolicyRevisionChange = function () {
if ($scope.privacyPolicy.version === null) {
$scope.privacyPolicy.bodyTemp = settingsPromise.privacy_body;
return;
}
for (const draft of $scope.privacyDraftsHistory) {
if (draft.id == $scope.privacyPolicy.version) {
$scope.privacyPolicy.bodyTemp = draft.content;