mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
WebAdmin: add expired to the status in users page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
6b07908084
commit
d7975d8d76
3 changed files with 14 additions and 4 deletions
|
@ -259,7 +259,8 @@
|
|||
"day_of_week": "Day of week",
|
||||
"day_of_month": "Day of month",
|
||||
"month": "Month",
|
||||
"options": "Options"
|
||||
"options": "Options",
|
||||
"expired": "Expired"
|
||||
},
|
||||
"fs": {
|
||||
"view_file": "View file \"{{- path}}\"",
|
||||
|
|
|
@ -259,7 +259,8 @@
|
|||
"day_of_week": "Giorno settimana",
|
||||
"day_of_month": "Giorno mese",
|
||||
"month": "Mese",
|
||||
"options": "Opzioni"
|
||||
"options": "Opzioni",
|
||||
"expired": "Scaduto"
|
||||
},
|
||||
"fs": {
|
||||
"view_file": "Visualizza file \"{{- path}}\"",
|
||||
|
|
|
@ -267,15 +267,23 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||
{
|
||||
data: "status",
|
||||
render: function(data, type, row) {
|
||||
let result = data;
|
||||
if (row.expiration_date){
|
||||
if (row.expiration_date < Date.now()){
|
||||
result = -1;
|
||||
}
|
||||
}
|
||||
if (type === 'display') {
|
||||
switch (data){
|
||||
switch (result){
|
||||
case 1:
|
||||
return $.t('general.active');
|
||||
case -1:
|
||||
return $.t('general.expired');
|
||||
default:
|
||||
return $.t('general.inactive');
|
||||
}
|
||||
}
|
||||
return data;
|
||||
return result;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue