mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
WebAdmin: add expired to the status in users page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -259,7 +259,8 @@
|
|||||||
"day_of_week": "Day of week",
|
"day_of_week": "Day of week",
|
||||||
"day_of_month": "Day of month",
|
"day_of_month": "Day of month",
|
||||||
"month": "Month",
|
"month": "Month",
|
||||||
"options": "Options"
|
"options": "Options",
|
||||||
|
"expired": "Expired"
|
||||||
},
|
},
|
||||||
"fs": {
|
"fs": {
|
||||||
"view_file": "View file \"{{- path}}\"",
|
"view_file": "View file \"{{- path}}\"",
|
||||||
|
|||||||
@@ -259,7 +259,8 @@
|
|||||||
"day_of_week": "Giorno settimana",
|
"day_of_week": "Giorno settimana",
|
||||||
"day_of_month": "Giorno mese",
|
"day_of_month": "Giorno mese",
|
||||||
"month": "Mese",
|
"month": "Mese",
|
||||||
"options": "Opzioni"
|
"options": "Opzioni",
|
||||||
|
"expired": "Scaduto"
|
||||||
},
|
},
|
||||||
"fs": {
|
"fs": {
|
||||||
"view_file": "Visualizza file \"{{- path}}\"",
|
"view_file": "Visualizza file \"{{- path}}\"",
|
||||||
|
|||||||
@@ -267,15 +267,23 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
{
|
{
|
||||||
data: "status",
|
data: "status",
|
||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
|
let result = data;
|
||||||
|
if (row.expiration_date){
|
||||||
|
if (row.expiration_date < Date.now()){
|
||||||
|
result = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (type === 'display') {
|
if (type === 'display') {
|
||||||
switch (data){
|
switch (result){
|
||||||
case 1:
|
case 1:
|
||||||
return $.t('general.active');
|
return $.t('general.active');
|
||||||
|
case -1:
|
||||||
|
return $.t('general.expired');
|
||||||
default:
|
default:
|
||||||
return $.t('general.inactive');
|
return $.t('general.inactive');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user