mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
added defaults of empty string into user profile, also changed account -> profile in message
This commit is contained in:
@@ -108,7 +108,7 @@ block content
|
|||||||
div(ng-show="percentComplete >= 100")
|
div(ng-show="percentComplete >= 100")
|
||||||
h4 100% complete, well done!
|
h4 100% complete, well done!
|
||||||
div(ng-hide="percentComplete >= 100")
|
div(ng-hide="percentComplete >= 100")
|
||||||
h4 Your account is
|
h4 Your profile is
|
||||||
strong {{percentComplete}}%
|
strong {{percentComplete}}%
|
||||||
| complete
|
| complete
|
||||||
|
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ define ["libs/algolia", "libs/angular", "libs/angular-autocomplete/angular-autoc
|
|||||||
|
|
||||||
$http.get("/user/personal_info").success (data)->
|
$http.get("/user/personal_info").success (data)->
|
||||||
$scope.userInfoForm =
|
$scope.userInfoForm =
|
||||||
first_name: data.first_name
|
first_name: data.first_name || ""
|
||||||
last_name: data.last_name
|
last_name: data.last_name || ""
|
||||||
role: data.role
|
role: data.role || ""
|
||||||
institution: data.institution
|
institution: data.institution || ""
|
||||||
_csrf : window.csrfToken
|
_csrf : window.csrfToken
|
||||||
|
|
||||||
if getPercentComplete() != 100
|
if getPercentComplete() != 100
|
||||||
@@ -41,7 +41,7 @@ define ["libs/algolia", "libs/angular", "libs/angular-autocomplete/angular-autoc
|
|||||||
$scope.percentComplete = getPercentComplete()
|
$scope.percentComplete = getPercentComplete()
|
||||||
|
|
||||||
getPercentComplete = ->
|
getPercentComplete = ->
|
||||||
results = _.filter $scope.userInfoForm, (value)-> value? and value?.length != 0
|
results = _.filter $scope.userInfoForm, (value)-> !value? or value?.length != 0
|
||||||
results.length * 20
|
results.length * 20
|
||||||
|
|
||||||
$scope.updateInstitutionsList = (inputVal)->
|
$scope.updateInstitutionsList = (inputVal)->
|
||||||
|
|||||||
Reference in New Issue
Block a user