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
8b0ce079
Commit
8b0ce079
authored
Feb 08, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
super short registration form variant
parent
2473ecfe
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
270 additions
and
16 deletions
+270
-16
main.py
services/main.py
+1
-1
comex_page_reg_controllers.js
static/js/comex_page_reg_controllers.js
+13
-15
registration_super_short_form.html
templates/registration_super_short_form.html
+256
-0
No files found.
services/main.py
View file @
8b0ce079
...
@@ -522,7 +522,7 @@ def register():
...
@@ -522,7 +522,7 @@ def register():
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
return
render_template
(
return
render_template
(
"registration_short_form.html"
"registration_s
uper_s
hort_form.html"
)
)
elif
request
.
method
==
'POST'
:
elif
request
.
method
==
'POST'
:
# ex: request.form = ImmutableMultiDict([('initials', 'R.L.'), ('email', 'romain.loth@iscpif.fr'), ('last_name', 'Loth'), ('country', 'France'), ('first_name', 'Romain'), ('my-captchaHash', '-773776109'), ('my-captcha', 'TSZVIN')])
# ex: request.form = ImmutableMultiDict([('initials', 'R.L.'), ('email', 'romain.loth@iscpif.fr'), ('last_name', 'Loth'), ('country', 'France'), ('first_name', 'Romain'), ('my-captchaHash', '-773776109'), ('my-captcha', 'TSZVIN')])
...
...
static/js/comex_page_reg_controllers.js
View file @
8b0ce079
...
@@ -24,8 +24,7 @@ var regfo = cmxClt.uauth.AuthForm(
...
@@ -24,8 +24,7 @@ var regfo = cmxClt.uauth.AuthForm(
{
{
'type'
:
"register"
,
'type'
:
"register"
,
'validateCaptcha'
:
true
,
'validateCaptcha'
:
true
,
'multiTextinputs'
:
[{
'id'
:
'keywords'
},
'multiTextinputs'
:
[{
'id'
:
'keywords'
}]
{
'id'
:
'hashtags'
,
'color'
:
"#23A"
}]
}
}
)
)
...
@@ -41,7 +40,9 @@ var validateWithMessage = false
...
@@ -41,7 +40,9 @@ var validateWithMessage = false
var
shortRegVersion
=
true
var
shortRegVersion
=
true
var
ignoredFields
=
[]
var
ignoredFields
=
[]
if
(
shortRegVersion
)
{
if
(
shortRegVersion
)
{
ignoredFields
=
[
'gender'
,
'home_url'
,
'org'
,
'org_type'
]
ignoredFields
=
[
'gender'
,
'home_url'
,
'org'
,
'hon_title'
,
'position'
,
'org_type'
,
'hashtags'
]
}
}
// done when anything in the form changes
// done when anything in the form changes
...
@@ -58,12 +59,9 @@ function testAsYouGo() {
...
@@ -58,12 +59,9 @@ function testAsYouGo() {
// on submit then clicks "back" and ends up with
// on submit then clicks "back" and ends up with
// hashtags in brackets like "['#a','#b']"
// hashtags in brackets like "['#a','#b']"
}
}
cmxClt
.
uform
.
checkJobDateStatus
()
if
(
regfo
.
passStatus
if
(
regfo
.
passStatus
&&
regfo
.
emailStatus
&&
regfo
.
emailStatus
&&
regfo
.
captchaStatus
&&
regfo
.
captchaStatus
)
{
&&
cmxClt
.
uform
.
jobLookingDateStatus
)
{
regfo
.
elSubmitBtn
.
disabled
=
false
regfo
.
elSubmitBtn
.
disabled
=
false
}
}
else
{
else
{
...
@@ -75,10 +73,6 @@ function testAsYouGo() {
...
@@ -75,10 +73,6 @@ function testAsYouGo() {
var
teamCityDivStyle
=
document
.
getElementById
(
'team_city_div'
).
style
var
teamCityDivStyle
=
document
.
getElementById
(
'team_city_div'
).
style
if
(
document
.
getElementById
(
'other_org_div'
))
{
var
otherInstDivStyle
=
document
.
getElementById
(
'other_org_div'
).
style
}
function
registerDoorsAndSubmit
(){
function
registerDoorsAndSubmit
(){
regfo
.
elMainMessage
.
innerHTML
=
"Registering with ISCPIF Doors..."
regfo
.
elMainMessage
.
innerHTML
=
"Registering with ISCPIF Doors..."
...
@@ -128,15 +122,17 @@ function validateAndMsg() {
...
@@ -128,15 +122,17 @@ function validateAndMsg() {
regfo
.
elMainMessage
.
innerHTML
=
"Validating the form..."
regfo
.
elMainMessage
.
innerHTML
=
"Validating the form..."
// runs field-by-field validation and highlights mandatory missing fields
// runs field-by-field validation and highlights mandatory missing fields
var
diagnostic
=
cmxClt
.
uform
.
testFillField
(
regfo
)
var
diagnostic
=
cmxClt
.
uform
.
testFillField
(
// +++++++++++++
regfo
,
{
'ignore'
:
ignoredFields
}
)
// RESULTS
// RESULTS
var
valid
=
diagnostic
[
0
]
var
valid
=
diagnostic
[
0
]
var
missingFields
=
diagnostic
[
1
]
var
missingFields
=
diagnostic
[
1
]
if
(
valid
)
{
if
(
valid
)
{
regfo
.
elMainMessage
.
innerHTML
=
"Form is valid... Will
register and submit
..."
regfo
.
elMainMessage
.
innerHTML
=
"Form is valid... Will
submit and register
..."
regfo
.
elMainMessage
.
style
.
opacity
=
1
regfo
.
elMainMessage
.
style
.
opacity
=
1
regfo
.
elMainMessage
.
style
.
display
=
'block'
regfo
.
elMainMessage
.
style
.
display
=
'block'
...
@@ -159,8 +155,10 @@ function addUidThenSubmit(doorsResp) {
...
@@ -159,8 +155,10 @@ function addUidThenSubmit(doorsResp) {
var
doorsUid
=
doorsResp
[
0
]
var
doorsUid
=
doorsResp
[
0
]
var
doorsMsg
=
doorsResp
[
1
]
var
doorsMsg
=
doorsResp
[
1
]
console
.
warn
(
"TODO FIX doorsUid will be available only later now"
)
if
(
doorsUid
==
null
)
{
if
(
doorsUid
==
null
)
{
regfo
.
elMainMessage
.
innerHTML
=
"Problem with doors registration...
TODO debug
"
regfo
.
elMainMessage
.
innerHTML
=
"Problem with doors registration..."
regfo
.
elMainMessage
.
mainMessage
.
style
.
color
=
cmxClt
.
colorRed
regfo
.
elMainMessage
.
mainMessage
.
style
.
color
=
cmxClt
.
colorRed
regfo
.
elSubmitBtn
.
disabled
=
false
regfo
.
elSubmitBtn
.
disabled
=
false
}
}
...
...
templates/registration_super_short_form.html
0 → 100644
View file @
8b0ce079
This diff is collapsed.
Click to expand it.
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