From bac64070c16f459a5818f4ebcd561f56e4bac00e Mon Sep 17 00:00:00 2001 From: Johan Ehinger Date: Mon, 4 Oct 2021 12:47:03 +0200 Subject: [PATCH] invitations: Display expiration times in settings > invitations. Fixes #19680. --- static/js/settings_invites.js | 2 +- static/templates/settings/admin_invites_list.hbs | 3 +++ static/templates/settings/invites_list_admin.hbs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/settings_invites.js b/static/js/settings_invites.js index 3ca391b9ea..ed14b29d28 100644 --- a/static/js/settings_invites.js +++ b/static/js/settings_invites.js @@ -58,11 +58,11 @@ function populate_invites(invites_data) { add_invited_as_text(invites_data.invites); const invites_table = $("#admin_invites_table").expectOne(); - ListWidget.create(invites_table, invites_data.invites, { name: "admin_invites_list", modifier(item) { item.invited_absolute_time = timerender.absolute_time(item.invited * 1000); + item.expiry_date_absolute_time = timerender.absolute_time(item.expiry_date * 1000); item.is_admin = page_params.is_admin; item.disable_buttons = item.invited_as === settings_config.user_role_values.owner.code && diff --git a/static/templates/settings/admin_invites_list.hbs b/static/templates/settings/admin_invites_list.hbs index ba3255c414..e088cdbcca 100644 --- a/static/templates/settings/admin_invites_list.hbs +++ b/static/templates/settings/admin_invites_list.hbs @@ -21,6 +21,9 @@ {{invited_absolute_time}} + + {{expiry_date_absolute_time}} + {{invited_as_text}} diff --git a/static/templates/settings/invites_list_admin.hbs b/static/templates/settings/invites_list_admin.hbs index 1032d65e6a..856a5893c1 100644 --- a/static/templates/settings/invites_list_admin.hbs +++ b/static/templates/settings/invites_list_admin.hbs @@ -20,6 +20,7 @@ {{t "Invited by" }} {{/if}} {{t "Invited at" }} + {{t "Expires at" }} {{t "Invited as" }} {{t "Actions" }}