Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
41991831
Commit
41991831
authored
Aug 14, 2018
by
Gerald Salin
Browse files
#60
and
#61
: update user information
parent
8f57f19e
Changes
3
Hide whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
41991831
...
...
@@ -644,8 +644,10 @@ class tx_nG6_eid {
$email
=
$user_infos
[
'email'
];
$first_name
=
$user_infos
[
'first_name'
];
$last_name
=
$user_infos
[
'last_name'
];
$username
=
$user_infos
[
'username'
];
$mail_title
=
"[NG6]Your user informations have been updated."
;
$mail_content
=
"Dear "
.
$first_name
.
" "
.
$last_name
.
",
\n\n
Some of your personnal informations have been updated :
\n\n
"
;
$mail_content
=
"Dear "
.
$first_name
.
" "
.
$last_name
.
"
(user name : "
.
$username
.
")
,
\n\n
Some of your personnal informations have been updated :
\n\n
"
;
if
(
$email
!=
''
){
foreach
(
$updated
as
$key
=>
$value
){
...
...
ui/nG6/lib/class.tx_nG6_db.php
View file @
41991831
...
...
@@ -2831,7 +2831,7 @@ static function get_project_runs($project_id, $orderby='', $limit='') {
'right_id'
=>
$res_row
[
'right_id'
],
'cruser_id'
=>
$res_row
[
'cruser_id'
],
'cruser_name'
=>
$cruser_infos
[
'username'
],
'updatable_password'
=>
$res_row
[
'
tx_nG6_
updatable_password'
]
'updatable_password'
=>
$res_row
[
'updatable_password'
]
);
}
...
...
ui/nG6/res/js/tx_nG6_pi1.js
View file @
41991831
...
...
@@ -387,16 +387,20 @@ $(function () {
last_name
=
$
.
trim
(
$
(
'
#tr_user_
'
+
user_id
+
'
td:eq(4)
'
).
text
()),
email
=
$
.
trim
(
$
(
'
#tr_user_
'
+
user_id
+
'
td:eq(6)
'
).
text
()),
update_pwd
=
$
(
"
#chk_updatablepwd_
"
+
user_id
).
val
();
console
.
log
(
"
user_login
"
+
user_login
);
console
.
log
(
"
first_name
"
+
first_name
);
console
.
log
(
"
last_name
"
+
last_name
);
console
.
log
(
"
user_id
"
+
user_id
);
console
.
log
(
"
update_pwd
"
+
update_pwd
);
// get title laboratory and organism from ajax query
$
.
ajax
({
url
:
"
index.php?eID=tx_nG6&type=get_user_group&id=
"
+
user_id
,
dataType
:
'
json
'
,
success
:
function
(
data
)
{
update_user_call_back
(
data
);
update_user_call_back
(
data
,
first_name
);
},
error
:
function
(){
update_user_call_back
({
'
title
'
:
'
Laboratory
'
,
'
organism
'
:
'
Organism
'
,
'
location
'
:
"
Location
"
});
update_user_call_back
({
'
title
'
:
'
Laboratory
'
,
'
organism
'
:
'
Organism
'
,
'
location
'
:
"
Location
"
,
'
first_name
'
:
first_name
});
}
});
...
...
@@ -404,7 +408,7 @@ $(function () {
var
title
=
user_group_json
.
title
,
organism
=
user_group_json
.
organism
,
location
=
user_group_json
.
location
;
console
.
log
(
"
update_user_call_back first_name
"
+
first_name
);
$
(
"
#modal-label-tmpl
"
).
html
(
"
Update user <small>
"
+
user_login
+
"
</small>
"
);
var
update_user_html
=
[
'
<div id="error_message" class="alert alert-danger">
'
,
...
...
@@ -415,19 +419,19 @@ $(function () {
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">First name</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="first_name_val" class="form-control" name="first_name_val"
placeholder
="
'
+
first_name
+
'
"/>
'
,
'
<input type="text" id="first_name_val" class="form-control" name="first_name_val"
value
="
'
+
first_name
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">Last name</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="last_name_val" class="form-control" name="last_name_val"
placeholder
="
'
+
last_name
+
'
"/>
'
,
'
<input type="text" id="last_name_val" class="form-control" name="last_name_val"
value
="
'
+
last_name
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">Email</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="email_val" class="form-control" name="email_val"
placeholder
="
'
+
email
+
'
"/>
'
,
'
<input type="text" id="email_val" class="form-control" name="email_val"
value
="
'
+
email
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="form-group" id="password-form">
'
,
...
...
@@ -444,19 +448,19 @@ $(function () {
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">Laboratory</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="title_val" class="form-control group_typeahead" name="title_val"
placeholder
="
'
+
title
+
'
"/>
'
,
'
<input type="text" id="title_val" class="form-control group_typeahead" name="title_val"
value
="
'
+
title
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">Organism</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="organism_val" class="form-control group_typeahead" name="organism_val"
placeholder
="
'
+
organism
+
'
"/>
'
,
'
<input type="text" id="organism_val" class="form-control group_typeahead" name="organism_val"
value
="
'
+
organism
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="form-group">
'
,
'
<label class="col-sm-offset-2 col-sm-2 control-label">Location</label>
'
,
'
<div class="col-sm-8">
'
,
'
<input type="text" id="location_val" class="form-control group_typeahead" name="location_val"
placeholder
="
'
+
location
+
'
"/>
'
,
'
<input type="text" id="location_val" class="form-control group_typeahead" name="location_val"
value
="
'
+
location
+
'
"/>
'
,
'
</div>
'
,
'
</div>
'
,
'
<div class="checkbox col-sm-offset-4">
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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