From 555c3b5d6a86c02c4327b32eca30f119de120a37 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Mon, 15 Oct 2018 10:04:45 +0200 Subject: [PATCH] [fix] Better message if not member or not was member --- www/i18n/locale-en-GB.json | 1 + www/i18n/locale-en.json | 1 + www/i18n/locale-fr-FR.json | 1 + www/js/controllers/wallet-controllers.js | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www/i18n/locale-en-GB.json b/www/i18n/locale-en-GB.json index 67fefa66..aa553025 100644 --- a/www/i18n/locale-en-GB.json +++ b/www/i18n/locale-en-GB.json @@ -727,6 +727,7 @@ "LOAD_NEWCOMERS_FAILED": "Unable to load new members.", "LOAD_PENDING_FAILED": "Unable to load pending registrations.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.", + "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member (or old member)</b> in order to perform this action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.", "GET_BLOCK_FAILED": "Error while getting block", "INVALID_BLOCK_HASH": "Block not found (incorrect hash)", diff --git a/www/i18n/locale-en.json b/www/i18n/locale-en.json index b5c2347a..63f29844 100644 --- a/www/i18n/locale-en.json +++ b/www/i18n/locale-en.json @@ -727,6 +727,7 @@ "LOAD_NEWCOMERS_FAILED": "Unable to load new members.", "LOAD_PENDING_FAILED": "Unable to load pending registrations.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member</b> in order to perform this action.", + "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "You must <b>be a member (or old member)</b> in order to perform this action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "You must have <b>published your identity</b> in order to perform this action.", "GET_BLOCK_FAILED": "Error while getting block", "INVALID_BLOCK_HASH": "Block not found (incorrect hash)", diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index 0534293b..e5a8917a 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -727,6 +727,7 @@ "LOAD_NEWCOMERS_FAILED": "Échec du chargement des nouveaux membres.", "LOAD_PENDING_FAILED": "Échec du chargement des inscriptions en attente.", "ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vous devez <b>être membre</b> pour pouvoir effectuer cette action.", + "ONLY_MEMBER_OR_WAS_MEMBER_CAN_EXECUTE_THIS_ACTION": "Vous devez <b>être membre (ou ancien membre)</b> pour pouvoir effectuer cette action.", "ONLY_SELF_CAN_EXECUTE_THIS_ACTION": "Vous devez avoir <b>publié votre identité</b> pour pouvoir effectuer cette action.", "GET_BLOCK_FAILED": "Échec de la récupération du bloc", "INVALID_BLOCK_HASH": "Bloc non trouvé (hash différent)", diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index b93aa02d..0a5c30f8 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -337,7 +337,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state, */ $scope.renewMembership = function(confirm) { - if (!$scope.formData.isMember && !$scope.formData.requirements.wasMember) { + if (!wallet.isMember() && !$scope.formData.requirements.wasMember) { return UIUtils.alert.error("ERROR.ONLY_MEMBER_CAN_EXECUTE_THIS_ACTION"); } if (!confirm && !$scope.formData.requirements.needRenew) { -- GitLab