Print user account name when modifying expiration settings

tags/smeserver-expire-accounts-0.1.7-1
Daniel Berteaud 9 years ago
parent b468604304
commit 2eaaa3781f
  1. 4
      root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts
  2. 4
      root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts
  3. 2
      root/etc/e-smith/web/functions/expireaccounts
  4. 11
      root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm

@ -52,6 +52,10 @@
<trans>Notify users</trans>
</entry>
<entry>
<base>LABEL_USER_ACCOUNT</base>
<trans>User account</trans>
</entry>
<entry>
<base>DESC_LOCK_ON_DATE</base>
<trans>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.</trans>
</entry>

@ -48,6 +48,10 @@
<trans>En plus de notifier un administrateur, vous pouvez notifier l'utilisateur concerné par email.</trans>
</entry>
<entry>
<base>LABEL_USER_ACCOUNT</base>
<trans>Compte utilisateur</trans>
</entry>
<entry>
<base>LABEL_WARN_USERS</base>
<trans>Notifier les utilisateurs</trans>
</entry>

@ -64,6 +64,7 @@ __DATA__
<subroutine src="print_save_button()" />
</page>
<page name="ModifyLocked" pre-event="turn_off_buttons()" post-event="modify_user()">
<subroutine src="print_account_name()" />
<field type="select" id="ExpireAutoReply" value="get_user_bool('ExpireAutoReply')" options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'">
<description>DESC_AUTO_REPLY</description>
<label>LABEL_AUTO_REPLY</label>
@ -78,6 +79,7 @@ __DATA__
<subroutine src="print_save_button()" />
</page>
<page name="ModifyActive" pre-event="turn_off_buttons()" post-event="modify_user()">
<subroutine src="print_account_name()" />
<field type="text" size="30" id="ExpireLockOn" validation="is_future_date_or_empty" value="get_user_prop('ExpireLockOn')">
<description>DESC_LOCK_ON_DATE</description>
<label>LABEL_LOCK_ON_DATE</label>

@ -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(<tr><td class="sme-noborders-label">) .
$self->localise('LABEL_USER_ACCOUNT') .
qq(</td>) .
qq(<td class="sme-noborders-content">$acctName</td>);
return undef;
}
sub get_user_prop{
my ($self, $field) = @_;
return $a->get($self->{cgi}->param('acctName'))->prop("$field") || $defaults{$field} || '';

Loading…
Cancel
Save