Print user account name when modifying expiration settings
This commit is contained in:
parent
b468604304
commit
2eaaa3781f
|
@ -51,6 +51,10 @@
|
|||
<base>LABEL_WARN_USERS</base>
|
||||
<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>
|
||||
|
|
|
@ -47,6 +47,10 @@
|
|||
<base>DESC_WARN_USERS</base>
|
||||
<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>
|
||||
|
|
|
@ -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…
Reference in New Issue