diff --git a/www/i18n/locale-fr-FR.json b/www/i18n/locale-fr-FR.json index c7dd052d..2ac60f0e 100644 --- a/www/i18n/locale-fr-FR.json +++ b/www/i18n/locale-fr-FR.json @@ -841,7 +841,8 @@ "SAVE_BEFORE_LEAVE_TITLE": "Modifications non enregistrées", "LOGOUT": "Êtes-vous sûr de vouloir vous déconnecter ?", "USE_FALLBACK_NODE": "Nœud {{old}} injoignable ou adresse invalide.

Voulez-vous temporairement utiliser le nœud {{new}} ?", - "ISSUE_524_SEND_LOG": "La transaction a été rejetée, à cause d'une anomalie connue (ticket #524) mais non reproduite.

Pour aider les développeurs à corriger cette erreur, acceptez-vous la transmission de vos logs par message ?
(aucune donnée confidentielle n'est envoyée)." + "ISSUE_524_SEND_LOG": "La transaction a été rejetée, à cause d'une anomalie connue (ticket #524) mais non reproduite.

Pour aider les développeurs à corriger cette erreur, acceptez-vous la transmission de vos logs par message ?
(aucune donnée confidentielle n'est envoyée).", + "SHORT_LICENSE_REMINDER": "

Rappel des paramètres de certification.

- Chaque membre peut avoir émis 100 certifications valides au maximum.

- Les certifications sont enregistrées à un intervalle de 5 jours.

- Une nouvelle identité membre doit réunir au minimum 5 certifications en moins de deux mois.

- Un membre doit renouveler son adhésion chaque année.

- Les certifications sont valides durant deux ans.

" }, "MODE": { "DEMO": { diff --git a/www/js/controllers/wot-controllers.js b/www/js/controllers/wot-controllers.js index 69495697..a1e1b781 100644 --- a/www/js/controllers/wot-controllers.js +++ b/www/js/controllers/wot-controllers.js @@ -788,25 +788,33 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $ // Certification checklist before confirmation let answers_are_right = $q.defer(); answers_are_right.promise.then(function(){ - UIUtils.loading.show(); - wallet.certify($scope.formData.uid, - $scope.formData.pubkey, - $scope.formData.blockUid || ($scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.timestamp), - $scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.sig, - $scope.formData.isMember, - $scope.formData.wasMember) - .then(function(cert) { - UIUtils.loading.hide(); - if (cert) { - $scope.prepareNewCert(wallet, cert); - $scope.alreadyCertified = true; - UIUtils.toast.show('INFO.CERTIFICATION_DONE'); - $scope.formData.received_cert_pending.unshift(cert); - $scope.formData.requirements.pendingCertificationCount++; - $scope.doMotion(); - } - }) - .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED')); + UIUtils.alert.confirm('CONFIRM.SHORT_LICENSE_REMINDER', 'CONFIRM.POPUP_TITLE', { + cssClass: 'positive', + okText: 'COMMON.BTN_OK', + okType: 'button-positive' + }) + .then(function(confirm){ + if (! confirm) {return} + UIUtils.loading.show(); + wallet.certify($scope.formData.uid, + $scope.formData.pubkey, + $scope.formData.blockUid || ($scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.timestamp), + $scope.formData.requirements && $scope.formData.requirements.meta && $scope.formData.requirements.meta.sig, + $scope.formData.isMember, + $scope.formData.wasMember) + .then(function(cert) { + UIUtils.loading.hide(); + if (cert) { + $scope.prepareNewCert(wallet, cert); + $scope.alreadyCertified = true; + UIUtils.toast.show('INFO.CERTIFICATION_DONE'); + $scope.formData.received_cert_pending.unshift(cert); + $scope.formData.requirements.pendingCertificationCount++; + $scope.doMotion(); + } + }) + .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED')); + }) }) .catch( UIUtils.onError('ACCOUNT.CERTIFICATION_MODAL.CHECKLIST_CONDITIONS_NOT_MET') @@ -898,29 +906,37 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $ // Certification checklist before confirmation let answers_are_right = $q.defer(); answers_are_right.promise.then(function(){ - UIUtils.loading.show(); - // Send certification - wallet.certify(identity.uid, - identity.pubkey, - identity.blockUid || (identity.requirements && identity.requirements.meta && identity.requirements.meta.timestamp), - identity.requirements && identity.requirements.meta && identity.requirements.meta.sig, - identity.isMember, - identity.wasMember) - .then(function (cert) { - UIUtils.loading.hide(); - if (!cert) return; - return csWot.extendAll([cert], 'pubkey') - .then(function () { - UIUtils.toast.show('INFO.CERTIFICATION_DONE'); - $scope.formData.given_cert_pending.unshift(cert); - $scope.doMotion(); - }); - }) + UIUtils.alert.confirm('CONFIRM.SHORT_LICENSE_REMINDER', 'CONFIRM.POPUP_TITLE', { + cssClass: 'positive', + okText: 'COMMON.BTN_OK', + okType: 'button-positive' + }) + .then(function(confirm){ + if (! confirm) {return} + UIUtils.loading.show(); + // Send certification + wallet.certify(identity.uid, + identity.pubkey, + identity.blockUid || (identity.requirements && identity.requirements.meta && identity.requirements.meta.timestamp), + identity.requirements && identity.requirements.meta && identity.requirements.meta.sig, + identity.isMember, + identity.wasMember) + .then(function (cert) { + UIUtils.loading.hide(); + if (!cert) return; + return csWot.extendAll([cert], 'pubkey') + .then(function () { + UIUtils.toast.show('INFO.CERTIFICATION_DONE'); + $scope.formData.given_cert_pending.unshift(cert); + $scope.doMotion(); + }); + }) .catch(UIUtils.onError('ERROR.SEND_CERTIFICATION_FAILED')); }) - .catch( - UIUtils.onError('ACCOUNT.CERTIFICATION_MODAL.CHECKLIST_CONDITIONS_NOT_MET') - ); + }) + .catch( + UIUtils.onError('ACCOUNT.CERTIFICATION_MODAL.CHECKLIST_CONDITIONS_NOT_MET') + ); // Display cert checklist modal return Modals.showCertificationCheckList({