Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Cesium-grp
Cesium
Commits
c63120f3
Commit
c63120f3
authored
Jan 11, 2022
by
matograine
Browse files
Options
Downloads
Patches
Plain Diff
COMMENTS on how to reformat certification functions.
parent
b372b681
No related branches found
No related tags found
1 merge request
!638
Certification : add questions before validation
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
www/js/controllers/wot-controllers.js
+6
-2
6 additions, 2 deletions
www/js/controllers/wot-controllers.js
with
6 additions
and
2 deletions
www/js/controllers/wot-controllers.js
+
6
−
2
View file @
c63120f3
...
...
@@ -757,6 +757,8 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
return
;
}
/* MATOGRAINE FROM HERE WE CAN GROUP IN ONE CERTIFY FUNCTION */
// Check identity not expired
if
(
$scope
.
formData
.
requirements
.
expired
)
{
UIUtils
.
alert
.
error
(
'
ERROR.IDENTITY_EXPIRED
'
);
...
...
@@ -764,7 +766,7 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
}
// Check not already certified
var
previousCert
=
_
.
find
(
$scope
.
formData
.
received_cert
,
function
(
cert
)
{
var
previousCert
=
_
.
find
(
$scope
.
formData
.
received_cert
,
function
(
cert
)
{
// MATOGRAINE "cert" here is an element from received certs list.
return
cert
.
pubkey
===
wallet
.
data
.
pubkey
&&
cert
.
valid
&&
cert
.
expiresIn
>
csSettings
.
data
.
timeWarningExpire
;
});
if
(
previousCert
)
{
...
...
@@ -893,11 +895,13 @@ function WotIdentityAbstractController($scope, $rootScope, $state, $translate, $
.
then
(
function
(
identity
)
{
if
(
!
identity
)
return
;
// cancelled
UIUtils
.
loading
.
hide
();
if
(
!
identity
||
!
identity
.
hasSelf
)
{
if
(
!
identity
||
!
identity
.
hasSelf
)
{
// MATOGRAINE (!identity) is no need to be tested here, it is tested above.
UIUtils
.
alert
.
error
(
'
ERROR.IDENTITY_TO_CERTIFY_HAS_NO_SELF
'
);
return
;
}
/* MATOGRAINE FROM HERE WE CAN GROUP IN ONE CERTIFY FUNCTION */
// Check identity not expired
if
(
identity
.
requirements
.
expired
)
{
UIUtils
.
alert
.
error
(
'
ERROR.IDENTITY_EXPIRED
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment