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
28d675b3
Commit
28d675b3
authored
Feb 24, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more compact 2-column layout for claim_profile login creation
parent
81b5be0e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
139 additions
and
643 deletions
+139
-643
comex.css
static/css/comex.css
+10
-0
comex_user.css
static/css/comex_user.css
+10
-0
comex_page_claim_profile_controllers.js
static/js/comex_page_claim_profile_controllers.js
+2
-109
comex_user_shared_auth.js
static/js/comex_user_shared_auth.js
+19
-5
claim_profile.html
templates/claim_profile.html
+98
-529
No files found.
static/css/comex.css
View file @
28d675b3
...
...
@@ -112,6 +112,16 @@ div.my-box {
}
/* sub containers */
.nopadding
{
padding
:
0
;
}
.nomargin
{
margin
:
0
;
}
/* self-made modals */
.modal.self-made
{
top
:
25%
;
...
...
static/css/comex_user.css
View file @
28d675b3
...
...
@@ -171,6 +171,16 @@ input.readonly {
padding-right
:
2.1em
;
}
.legend-alone
{
font-family
:
Cambria
,
serif
;
color
:
#554
;
font-style
:
italic
;
text-align
:
center
;
font-size
:
120%
;
padding-bottom
:
1em
;
font-weight
:
500
;
}
/* for code blocks or urls */
.code
{
font-family
:
"Fira Mono"
,
"Droid Sans Mono"
,
monospace
;
...
...
static/js/comex_page_claim_profile_controllers.js
View file @
28d675b3
...
...
@@ -21,114 +21,6 @@
* 2/ The "re-create your account" form is a doors-auth of register type
*/
// 2 exposed vars for inline js controls
var
otherInstDiv
=
document
.
getElementById
(
'other_org_div'
)
// TODO make relative to org_type and move inline snippet to extended form obj
var
otherOrgTypeInput
=
document
.
getElementById
(
'other_org_type'
)
// reselecting current_user's info choices
function
setupSavedItems
(
uinfo
)
{
// (date and menu values are set up here
// but normal text vals are set up via html,
// pic is set below from a separate function,
// and multi text inputs are set up via form init... fixable to harmonize)
for
(
var
i
in
cmxClt
.
COLS
)
{
var
colType
=
cmxClt
.
COLS
[
i
][
3
]
if
(
colType
==
'd'
||
colType
==
'm'
)
{
var
colName
=
cmxClt
.
COLS
[
i
][
0
]
var
chosenV
=
uinfo
[
colName
]
var
tgtElt
=
document
.
getElementById
(
colName
)
if
(
tgtElt
&&
(
chosenV
!=
null
))
{
// d <=> convert to YY/MM/DD from iso string YYYY-MM-DD
if
(
colType
==
'd'
)
{
// console.log('setting date', colName, 'with', chosenV)
tgtElt
.
value
=
chosenV
.
replace
(
/-/g
,
'/'
)
tgtElt
.
dispatchEvent
(
new
CustomEvent
(
'change'
))
}
// m <=> select saved menus
if
(
colType
==
'm'
)
{
// console.log('setting menu', colName, 'with', chosenV)
var
myOption
=
tgtElt
.
querySelector
(
`option[value="
${
chosenV
}
"]`
)
// normal case
if
(
myOption
)
{
tgtElt
.
selectedIndex
=
myOption
.
index
tgtElt
.
dispatchEvent
(
new
CustomEvent
(
'change'
))
}
// this case is really just for org_type right now
else
if
(
tgtElt
.
querySelector
(
`option[value="other"]`
))
{
tgtElt
.
selectedIndex
=
tgtElt
.
querySelector
(
`option[value="other"]`
).
index
tgtElt
.
dispatchEvent
(
new
CustomEvent
(
'change'
))
var
relatedFreeTxt
=
document
.
getElementById
(
'other_'
+
colName
)
if
(
relatedFreeTxt
)
{
relatedFreeTxt
.
value
=
chosenV
relatedFreeTxt
.
dispatchEvent
(
new
CustomEvent
(
'change'
))
}
}
// fallback case
else
{
var
optionOthers
=
console
.
warn
(
`setupSavedItems: couldn't find option:
${
chosenV
}
for select element:
${
colName
}
`
)
}
}
}
else
{
// console.warn("setupSavedItems: couldn't find element: "+colName)
}
}
}
}
// also pre-setup for images
var
picShow
=
document
.
getElementById
(
'show_pic'
)
if
(
uinfo
.
pic_url
||
uinfo
.
pic_fname
)
{
if
(
uinfo
.
pic_url
)
{
cmxClt
.
uform
.
showPic
(
uinfo
.
pic_url
)
}
if
(
uinfo
.
pic_fname
)
{
cmxClt
.
uform
.
showPic
(
'/data/shared_user_img/'
+
uinfo
.
pic_fname
)
}
}
// the contents are conditioned on what return_user had in his info
var
presentMtis
=
[]
if
(
uinfo
.
keywords
.
length
)
{
presentMtis
.
push
(
{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
,
'readonly'
:
true
}
)
}
if
(
uinfo
.
hashtags
.
length
)
{
presentMtis
.
push
(
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'readonly'
:
true
,
'color'
:
"#23A"
}
)
}
// initialize readonly form controllers
var
consultReturnDataUForm
=
cmxClt
.
uform
.
Form
(
// id
"comex_claim_profile_form"
,
// onkeyup function
null
,
// other params
{
'multiTextinputs'
:
presentMtis
}
)
setupSavedItems
(
uinfo
)
// open middlename if there is one
if
(
uinfo
.
middle_name
!=
null
&&
uinfo
.
middle_name
!=
""
&&
uinfo
.
middle_name
!=
"None"
)
{
cmxClt
.
uform
.
displayMidName
()
}
// the "re-create this account" form
...
...
@@ -140,7 +32,8 @@ var returnForm = cmxClt.uauth.AuthForm(
{
'type'
:
"doorsRegister"
,
// if email validation, captcha perhaps too much?
'validateCaptcha'
:
false
'validateCaptcha'
:
false
,
'validateEmail'
:
false
}
)
...
...
static/js/comex_user_shared_auth.js
View file @
28d675b3
...
...
@@ -66,7 +66,19 @@ cmxClt = (function(cC) {
// -> type
auForm
.
type
=
afParams
.
type
||
"login"
auForm
.
validateCaptcha
=
afParams
.
validateCaptcha
||
false
if
(
afParams
.
validateEmail
!=
undefined
)
{
auForm
.
validateEmail
=
afParams
.
validateEmail
}
else
{
auForm
.
validateEmail
=
true
}
if
(
afParams
.
validateCaptcha
!=
undefined
)
{
auForm
.
validateCaptcha
=
afParams
.
validateCaptcha
}
else
{
auForm
.
validateCaptcha
=
false
}
// -> interaction elements (params, else default)
var
emailId
,
duuidId
,
passId
,
pass2Id
,
captchaId
,
capcheckId
...
...
@@ -94,11 +106,13 @@ cmxClt = (function(cC) {
// 1) for email
// side-effects: email icon + message
auForm
.
elEmail
.
onkeyup
=
function
(
event
)
{
// console.debug('..elMail '+auForm.id+' event:'+event.type)
cC
.
uauth
.
testMailFormatAndExistence
(
auForm
)
if
(
auForm
.
validateEmail
)
{
auForm
.
elEmail
.
onkeyup
=
function
(
event
)
{
// console.debug('..elMail '+auForm.id+' event:'+event.type)
cC
.
uauth
.
testMailFormatAndExistence
(
auForm
)
}
auForm
.
elEmail
.
onchange
=
auForm
.
elEmail
.
onkeyup
}
auForm
.
elEmail
.
onchange
=
auForm
.
elEmail
.
onkeyup
// 2) for password
// login <=> just test password's length
...
...
templates/claim_profile.html
View file @
28d675b3
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