Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
b3da7e32
Commit
b3da7e32
authored
Jan 18, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip on doors new version
parent
45b4067f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
18 deletions
+28
-18
comex_page_reg_controllers.js
static/js/comex_page_reg_controllers.js
+13
-12
comex_user_shared_auth.js
static/js/comex_user_shared_auth.js
+15
-6
No files found.
static/js/comex_page_reg_controllers.js
View file @
b3da7e32
...
@@ -85,6 +85,7 @@ function registerDoorsAndSubmit(){
...
@@ -85,6 +85,7 @@ function registerDoorsAndSubmit(){
// REGISTERING ON THE DOORS -------------------------------------
// REGISTERING ON THE DOORS -------------------------------------
// /!\ async
// /!\ async
console
.
warn
(
"TODO wait for return of '[DOORS] Email confirmation'"
)
cmxClt
.
uauth
.
callDoors
(
cmxClt
.
uauth
.
callDoors
(
"register"
,
"register"
,
[
emailValue
,
passValue
,
wholenameValue
],
[
emailValue
,
passValue
,
wholenameValue
],
...
@@ -166,16 +167,16 @@ function validateAndMsg() {
...
@@ -166,16 +167,16 @@ function validateAndMsg() {
console
.
log
(
"reg controllers load OK"
)
console
.
log
(
"reg controllers load OK"
)
// £DEBUG autofill ----------->8------
// £DEBUG autofill ----------->8------
//
cmxClt.uform.fName.value = "Jean"
cmxClt
.
uform
.
fName
.
value
=
"Jean"
//
cmxClt.uform.lName.value = "Tartampion"
cmxClt
.
uform
.
lName
.
value
=
"Tartampion"
//
document.getElementById('initials').value="JPP"
document
.
getElementById
(
'initials'
).
value
=
"JPP"
//
document.getElementById('country').value = "France"
document
.
getElementById
(
'country'
).
value
=
"France"
//
document.getElementById('position').value = "atitle"
document
.
getElementById
(
'position'
).
value
=
"atitle"
//
document.getElementById('keywords').value = "Blabla"
document
.
getElementById
(
'keywords'
).
value
=
"Blabla"
// document.getElementById('org
').value = "CNRS"
document
.
getElementById
(
'team_lab
'
).
value
=
"CNRS"
//
//
cmxClt.uauth.email.value= cmxClt.makeRandomString(7)+"@om.fr"
cmxClt
.
uauth
.
email
.
value
=
cmxClt
.
makeRandomString
(
7
)
+
"@om.fr"
//
cmxClt.uauth.pass1.value="123456+789"
cmxClt
.
uauth
.
pass1
.
value
=
"123456+789"
//
cmxClt.uauth.pass2.value="123456+789"
cmxClt
.
uauth
.
pass2
.
value
=
"123456+789"
//
cmxClt.uauth.testMailFormatAndExistence(email.value, false)
cmxClt
.
uauth
.
testMailFormatAndExistence
(
email
.
value
,
false
)
// --------------------------->8------
// --------------------------->8------
static/js/comex_user_shared_auth.js
View file @
b3da7e32
...
@@ -22,6 +22,12 @@ cmxClt = (function(cC) {
...
@@ -22,6 +22,12 @@ cmxClt = (function(cC) {
// common vars to authenticating/registering in user area
// common vars to authenticating/registering in user area
cC
.
uauth
=
{}
cC
.
uauth
=
{}
// temporary parameter (TODO remove after doors deployment)
// -------------------
// true if we are using first minidoors prototype (commit fca0f79)
// otherwise assume normal doors (commit >= a0ce580)
cC
.
uauth
.
protoDoors
=
true
cC
.
uauth
.
emailIdSupposedToExist
=
null
cC
.
uauth
.
emailIdSupposedToExist
=
null
cC
.
uauth
.
uidInput
=
document
.
getElementById
(
'doors_uid'
)
cC
.
uauth
.
uidInput
=
document
.
getElementById
(
'doors_uid'
)
...
@@ -314,16 +320,19 @@ cmxClt = (function(cC) {
...
@@ -314,16 +320,19 @@ cmxClt = (function(cC) {
console
.
warn
(
'DEBUG callDoors() internal validation failed before ajax'
)
console
.
warn
(
'DEBUG callDoors() internal validation failed before ajax'
)
}
}
else
{
else
{
$
.
ajax
({
var
sendData
=
{
contentType
:
"application/json"
,
dataType
:
'json'
,
url
:
"http://"
+
cC
.
uauth
.
doorsConnectParam
+
"/api/"
+
apiAction
,
data
:
JSON
.
stringify
({
"login"
:
mailStr
,
"login"
:
mailStr
,
"password"
:
passStr
,
"password"
:
passStr
,
"name"
:
nameStr
"name"
:
nameStr
}),
}
$
.
ajax
({
contentType
:
cC
.
uauth
.
protoDoors
?
"application/json"
:
"application/x-www-form-urlencoded; charset=UTF-8"
,
dataType
:
'json'
,
url
:
"http://"
+
cC
.
uauth
.
doorsConnectParam
+
"/api/"
+
apiAction
,
data
:
cC
.
uauth
.
protoDoors
?
JSON
.
stringify
(
sendData
)
:
sendData
,
type
:
'POST'
,
type
:
'POST'
,
// traditional: !cC.uauth.protoDoors,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
typeof
data
!=
'undefined'
if
(
typeof
data
!=
'undefined'
&&
apiAction
==
'userExists'
)
{
&&
apiAction
==
'userExists'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment