Skip to content
GitLab
Menu
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
5c9e2015
Commit
5c9e2015
authored
Jun 27, 2018
by
Celine Noirot
Browse files
add resend mail
#1
parent
facbcf96
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
5c9e2015
...
...
@@ -838,13 +838,11 @@ class tx_nG6_eid {
print
json_encode
(
tx_nG6_db
::
select_storage_evolution
(
$values
,
$by
,
$role
,
$get_analyzes
,
$octet
,
$cumulate
));
}
elseif
(
$type
==
'purge_managment_mail'
)
{
//TODO check if user is still logged
if
(
$user_id
==
""
){
print
json_encode
(
"Error: reconnect"
);
}
else
{
$all_projects
=
trim
(
t3lib_div
::
_GP
(
'project'
));
print
json_encode
(
tx_nG6_pi6
::
send_purge_demand_mail
(
$user_id
,
$all_projects
));
}
$all_projects
=
trim
(
t3lib_div
::
_GP
(
'project'
));
print
json_encode
(
tx_nG6_pi6
::
send_purge_demand_mail
(
$all_projects
));
}
elseif
(
$type
==
'purge_managment_resend_mail'
)
{
$purge_ids
=
trim
(
t3lib_div
::
_GP
(
'purge_demand'
));
print
json_encode
(
tx_nG6_pi6
::
resend_purge_demand_mail
(
$purge_ids
));
}
elseif
(
$type
==
'refresh_purge_demand'
)
{
$purge_delay
=
trim
(
t3lib_div
::
_GP
(
'purge_delay'
));
print
json_encode
(
tx_nG6_db
::
get_purge_demand_list
(
$purge_delay
));
...
...
@@ -856,24 +854,13 @@ class tx_nG6_eid {
$create_users
=
trim
(
t3lib_div
::
_GP
(
'create_users'
));
//Change date format
print
json_encode
(
tx_nG6_db
::
filter_list_retention_data_info
(
$filter_size
,
$max_retention_date
,
$create_users
,
$without_laboratories_id
,
$with_laboratories_id
));
}
elseif
(
$type
==
'purge_managment_resend_mail'
)
{
$purge_ids
=
trim
(
t3lib_div
::
_GP
(
'purge_demand'
));
$data_folder
=
trim
(
t3lib_div
::
_GP
(
'user_id'
));
print
json_encode
(
tx_nG6_pi6
::
resend_purge_demand_mail
(
$user_id
,
$purge_demand
));
}
elseif
(
$type
==
'delete_purge_data'
)
{
//TODO recuperer user password et faire comme pour pi1
if
(
$user_id
==
""
){
print
json_encode
(
"Error: reconnect"
);
}
else
{
//Delete data link to the list of purge demand
//Delete data link to the list of purge demand
$purge_ids
=
trim
(
t3lib_div
::
_GP
(
'purge_demand'
));
$data_folder
=
trim
(
t3lib_div
::
_GP
(
'data_folder'
));
$user_login
=
trim
(
t3lib_div
::
_GP
(
'user_login'
));
$user_pwd
=
trim
(
t3lib_div
::
_GP
(
'user_pwd'
));
//EXPECT : delete_purge_demand($demand_ids,$user_login, $user_pwd, $data_folder)
// check login and password
// check login and password
$res
=
0
;
if
(
isset
(
$user_login
)
&&
isset
(
$user_pwd
)
&&
$user_login
!=
'undefined'
&&
$user_pwd
!=
'undefined'
)
{
$connection
=
ssh2_connect
(
'127.0.0.1'
,
22
);
...
...
@@ -886,13 +873,8 @@ class tx_nG6_eid {
$res
=
tx_nG6_db
::
delete_purge_demand
(
$purge_ids
,
$user_login
,
$user_pwd
,
$data_folder
);
}
print
$res
;
}
}
elseif
(
$type
==
'extend_retention_date'
)
{
//Extend the retention date for the
//TODO check if user is still logged
if
(
$user_id
==
""
){
print
json_encode
(
"Error: reconnect"
);
}
else
{
$purge_ids
=
trim
(
t3lib_div
::
_GP
(
'purge_demand'
));
$value
=
trim
(
t3lib_div
::
_GP
(
'date_value'
));
$type_extend
=
trim
(
t3lib_div
::
_GP
(
'type_extend'
));
//all project or only run/analyse obsolete
...
...
@@ -900,8 +882,6 @@ class tx_nG6_eid {
$date
=
explode
(
'/'
,
$value
);
$timestamp
=
mktime
(
0
,
0
,
1
,
$date
[
1
],
$date
[
0
],
$date
[
2
]);
print
json_encode
(
tx_nG6_db
::
extend_retention_date
(
explode
(
','
,
$purge_ids
),
$timestamp
,
$type_extend
));
}
}
}
...
...
ui/nG6/res/js/tx_nG6_pi6.js
View file @
5c9e2015
...
...
@@ -392,7 +392,8 @@ $(function () {
});
//resend email
$
(
"
#btn_demand_resend_mail
"
).
click
(
function
(){
var
demands
=
getDatatableCheckedValue
(
purge_table
[
"
demand
"
],
"
demand
"
);
var
demands
=
getPurgeDatatableCheckedValue
(
purge_table
[
"
demand
"
],
"
demand
"
);
$
.
ajax
({
url
:
"
index.php?eID=tx_nG6&type=purge_managment_resend_mail&purge_demand=
"
+
demands
.
join
(
'
,
'
)
+
"
&user_id=
"
+
$
(
'
input[id=user_id]
'
).
val
(),
dataType
:
'
json
'
,
...
...
@@ -705,7 +706,6 @@ function getPurgeDatatableCheckedValue(oTable, type){
values
.
push
(
$
(
this
).
val
());
});
});
console
.
log
(
values
);
return
values
}
...
...
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