From 2eaaa3781f30087f450778f880b58ff763822283 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 1 Mar 2016 11:19:35 +0100 Subject: [PATCH] Print user account name when modifying expiration settings --- .../en-us/etc/e-smith/web/functions/expireaccounts | 4 ++++ .../fr/etc/e-smith/web/functions/expireaccounts | 4 ++++ root/etc/e-smith/web/functions/expireaccounts | 2 ++ .../esmith/FormMagick/Panel/expireaccounts.pm | 11 +++++++++++ 4 files changed, 21 insertions(+) diff --git a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts index 0a331f5..03bf0ad 100644 --- a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts +++ b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts @@ -51,6 +51,10 @@ LABEL_WARN_USERS Notify users + + LABEL_USER_ACCOUNT + User account + DESC_LOCK_ON_DATE Specify the date on which the account will automatically be locked. The date must be in YYYY-MM-DD format, eg 2018-07-25 for July the 25th 2018. Keep this field blank to disable account expiration. diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts index 59e3d48..a6db803 100644 --- a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts +++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts @@ -47,6 +47,10 @@ DESC_WARN_USERS En plus de notifier un administrateur, vous pouvez notifier l'utilisateur concerné par email. + + LABEL_USER_ACCOUNT + Compte utilisateur + LABEL_WARN_USERS Notifier les utilisateurs diff --git a/root/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/web/functions/expireaccounts index 2561dae..1e83d2b 100755 --- a/root/etc/e-smith/web/functions/expireaccounts +++ b/root/etc/e-smith/web/functions/expireaccounts @@ -64,6 +64,7 @@ __DATA__ + DESC_AUTO_REPLY @@ -78,6 +79,7 @@ __DATA__ + DESC_LOCK_ON_DATE diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm index 275eff0..780543a 100644 --- a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm +++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm @@ -38,6 +38,7 @@ our @EXPORT = qw( print_save_button print_custom_button print_section_bar + print_account_name ); our $a = esmith::AccountsDB->open || die "Couldn't open AccountsDB"; @@ -186,6 +187,16 @@ sub print_custom_button{ return undef; } +sub print_account_name{ + my ($self) = @_; + my $acctName = $self->{cgi}->param('acctName'); + print qq() . + $self->localise('LABEL_USER_ACCOUNT') . + qq() . + qq($acctName); + return undef; +} + sub get_user_prop{ my ($self, $field) = @_; return $a->get($self->{cgi}->param('acctName'))->prop("$field") || $defaults{$field} || '';