diff options
author | ivan <ivan> | 2010-07-23 10:02:40 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-23 10:02:40 +0000 |
commit | 22e59cf0fddecd4808a6ce91fe2b1712f3ab3c87 (patch) | |
tree | c7a99c8945765677fbec24b4e59b6696a961caba /FS | |
parent | abdb0f8539d8604b3e1ba6218e36a8717e96f88d (diff) |
add EmptyTrash values and finish consolidating the CGP timezone arrays, RT#7083
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/svc_CGP_Mixin.pm | 34 | ||||
-rw-r--r-- | FS/FS/svc_acct.pm | 13 | ||||
-rw-r--r-- | FS/FS/svc_domain.pm | 12 |
3 files changed, 47 insertions, 12 deletions
diff --git a/FS/FS/svc_CGP_Mixin.pm b/FS/FS/svc_CGP_Mixin.pm index adde61fe2..489e9791f 100644 --- a/FS/FS/svc_CGP_Mixin.pm +++ b/FS/FS/svc_CGP_Mixin.pm @@ -30,7 +30,7 @@ Returns an arrayref of Communigate time zones. #http://www.communigate.com/pub/client/TimeZones.data #http://www.communigate.com/cgatepro/WebMail.html#Settings -sub cgp_timezone { +sub cgp_timezone_values { #my $self = shift; #i'm used as a class and object method but just return data [ '', @@ -96,7 +96,39 @@ sub cgp_timezone { 'SouthAmerica/Chile', 'SouthAmerica/Paraguay', ]; +} + +=item cgp_emptytrash_values + +Returns an arrayref of possible EmptyTrash values. + +=cut +#http://www.communigate.com/cgatepro/WebMail.html#Trash + +sub cgp_emptytrash_values { + #my $self = shift; #i'm used as a class and object method but just return data + + [ '', #<option value="-1">default(92 days) + '0 seconds', + '60 minutes', + '2 hours', + '3 hours', + '6 hours', + '12 hours', + '24 hours', + '2 days', + '3 days', + '7 days', + '10 days', + '2 weeks', + '3 weeks', + '30 days', + '60 days', + '90 days', + '180 days', + '360 days', + ]; } =back diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 6aede58e8..0458bb998 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -451,8 +451,9 @@ sub table_info { disable_select => 1, }, 'cgp_emptytrash' => { - label => 'Communigate on logout remove trash', - type => 'text', + label => 'Communigate on logout remove trash', + type => 'select', + select_list => __PACKAGE__->cgp_emptytrash_values, disable_inventory => 1, disable_select => 1, }, @@ -464,9 +465,9 @@ sub table_info { disable_select => 1, }, 'cgp_timezone' => { - label => 'Communigate time zone', - type => 'select', - select_list => __PACKAGE__->cgp_timezone, + label => 'Communigate time zone', + type => 'select', + select_list => __PACKAGE__->cgp_timezone_values, disable_inventory => 1, disable_select => 1, }, @@ -1184,7 +1185,7 @@ sub check { || $self->ut_enum('cgp_addmailtrailer', [ '', 'Y' ]) #preferences || $self->ut_alphasn('cgp_deletemode') - || $self->ut_alphan('cgp_emptytrash') + || $self->ut_enum('cgp_emptytrash', $self->cgp_emptytrash_values) || $self->ut_alphan('cgp_language') || $self->ut_textn('cgp_timezone') || $self->ut_textn('cgp_skinname') diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index 8215380bb..4d85060d3 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -159,7 +159,8 @@ sub table_info { }, 'acct_def_cgp_emptytrash' => { label => 'Acct. default Communigate on logout remove trash', - type => 'text', + type => 'select', + select_list => __PACKAGE__->cgp_emptytrash_values, disable_inventory => 1, disable_select => 1, }, @@ -220,9 +221,9 @@ sub table_info { disable_select => 1, }, 'acct_def_cgp_timezone' => { - label => 'Acct. default time zone', - type => 'select', - select_list => __PACKAGE__->cgp_timezone, + label => 'Acct. default time zone', + type => 'select', + select_list => __PACKAGE__->cgp_timezone_values, disable_inventory => 1, disable_select => 1, }, @@ -492,7 +493,8 @@ sub check { #XXX archive messages #preferences || $self->ut_alphasn('acct_def_cgp_deletemode') - || $self->ut_alphan('acct_def_cgp_emptytrash') + || $self->ut_enum('acct_def_cgp_emptytrash', + $self->cgp_emptytrash_values ) || $self->ut_alphan('acct_def_cgp_language') || $self->ut_textn('acct_def_cgp_timezone') || $self->ut_textn('acct_def_cgp_skinname') |