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
37f23aac
Commit
37f23aac
authored
Feb 04, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comeback form POST action client-side
parent
9bb6306f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
12 deletions
+39
-12
comex_page_claim_profile_controllers.js
static/js/comex_page_claim_profile_controllers.js
+38
-11
claim_profile.html
templates/claim_profile.html
+1
-1
No files found.
static/js/comex_page_claim_profile_controllers.js
View file @
37f23aac
...
@@ -9,12 +9,16 @@
...
@@ -9,12 +9,16 @@
* @author romain.loth@iscpif.fr
* @author romain.loth@iscpif.fr
*
*
* @requires comex_user_shared
* @requires comex_user_shared
* @requires comex_user_shared_auth
*
*
* NB The uinfo variable should be set to template's user.json_info value.
* NB The uinfo variable should be set to template's user.json_info value.
*
*
* THIS IS A SIMPLE COPY OF comex_page_profile_controllers
* 2 forms here:
* with the old input re-fills
* 1/ The consultation of legacy profile is simply a copy of
* but without the new input validations
* comex_page_profile_controllers with the old input re-fills
* iff present but without the new input validations
*
* 2/ The "re-create your account" form is a doors-auth of register type
*/
*/
// first menu setup from DB values
// first menu setup from DB values
...
@@ -48,17 +52,17 @@ function selectSavedMenus(uinfo) {
...
@@ -48,17 +52,17 @@ function selectSavedMenus(uinfo) {
var
presentMtis
=
[]
var
presentMtis
=
[]
if
(
uinfo
.
keywords
.
length
)
{
if
(
uinfo
.
keywords
.
length
)
{
presentMtis
.
push
(
presentMtis
.
push
(
{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
}
{
'id'
:
'keywords'
,
'prevals'
:
uinfo
.
keywords
,
'readonly'
:
true
}
)
)
}
}
if
(
uinfo
.
hashtags
.
length
)
{
if
(
uinfo
.
hashtags
.
length
)
{
presentMtis
.
push
(
presentMtis
.
push
(
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'color'
:
"#23A"
}
{
'id'
:
'hashtags'
,
'prevals'
:
uinfo
.
hashtags
,
'
readonly'
:
true
,
'
color'
:
"#23A"
}
)
)
}
}
// initialize form controllers
// initialize
readonly
form controllers
var
the
UForm
=
cmxClt
.
uform
.
Form
(
var
consultReturnData
UForm
=
cmxClt
.
uform
.
Form
(
// id
// id
"comex_claim_profile_form"
,
"comex_claim_profile_form"
,
// onkeyup function
// onkeyup function
...
@@ -69,17 +73,40 @@ var theUForm = cmxClt.uform.Form(
...
@@ -69,17 +73,40 @@ var theUForm = cmxClt.uform.Form(
selectSavedMenus
(
uinfo
)
selectSavedMenus
(
uinfo
)
// memory
var
formValid
=
false
// 2 exposed vars for inline js controls
// 2 exposed vars for inline js controls
var
teamCityDivStyle
=
document
.
getElementById
(
'team_city_div'
).
style
var
teamCityDivStyle
=
document
.
getElementById
(
'team_city_div'
).
style
var
otherInstDivStyle
=
document
.
getElementById
(
'other_org_div'
).
style
var
otherInstDivStyle
=
document
.
getElementById
(
'other_org_div'
).
style
// open middlename if there is one
// open middlename if there is one
if
(
uinfo
.
middle_name
!=
""
&&
uinfo
.
middle_name
!=
"None"
)
{
if
(
uinfo
.
middle_name
!=
null
&&
uinfo
.
middle_name
!=
""
&&
uinfo
.
middle_name
!=
"None"
)
{
cmxClt
.
uform
.
displayMidName
()
cmxClt
.
uform
.
displayMidName
()
}
}
// the "re-create this account" form
// initialize "createlogin form" controllers
var
returnForm
=
cmxClt
.
uauth
.
AuthForm
(
'comex_createlogin_form'
,
miniregValidate
,
{
'type'
:
"register"
,
// if email validation, captcha perhaps too much?
'validateCaptcha'
:
false
}
)
// the email is readonly
function
miniregValidate
(
self
)
{
self
.
elSubmitBtn
.
disabled
=
!
self
.
passStatus
}
// trigger auth changes (email always autocompleted for return_user)
returnForm
.
elEmail
.
dispatchEvent
(
new
CustomEvent
(
'change'
))
console
.
log
(
"profile controllers load OK"
)
console
.
log
(
"profile controllers load OK"
)
templates/claim_profile.html
View file @
37f23aac
...
@@ -561,7 +561,7 @@
...
@@ -561,7 +561,7 @@
<!-- == S U B M I T == -->
<!-- == S U B M I T == -->
<button
class=
"btn btn-lg btn-success"
style=
"float:right"
<button
class=
"btn btn-lg btn-success"
style=
"float:right"
id=
"form_submit"
type=
button
disabled
id=
"form_submit"
type=
button
disabled
onclick=
"
if (validateAndMsg(event)) {registerDoorsAndSubmit()}
"
>
onclick=
"
returnForm.elForm.submit()
"
>
Submit your account renewal
Submit your account renewal
</button>
</button>
...
...
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