default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / view / svc_acct / communigate.html
1 %# settings
2
3   <% include('/view/elements/tr.html', label=>'Mailbox type', value=>$svc_acct->cgp_type) %>
4
5   <% include('/view/elements/tr.html', label=>'Enabled services',
6                         value=>$svc_acct->cgp_accessmodes ) %>
7
8   <% include('/view/elements/tr.html', label=>'Mail storage limit',
9                         value=>$svc_acct->quota ) %>
10
11   <% include('/view/elements/tr.html', label=>'File storage limit',
12                         value=>$svc_acct->file_quota ) %>
13
14   <% include('/view/elements/tr.html', label=>'Number of files limit',
15                         value=>$svc_acct->file_maxnum ) %>
16
17   <% include('/view/elements/tr.html', label=>'File size limit',
18                         value=>$svc_acct->file_maxsize ) %>
19
20   <% include('/view/elements/tr.html', label=>'Password recovery',
21                value=>$svc_acct->password_recover ? 'YES' : 'NO' ) %>
22
23   <% include('/view/elements/tr.html', label=>'Allowed mail rules',
24                         value=>$svc_acct->cgp_rulesallowed || 'default (No)') %>
25
26   <% include('/view/elements/tr.html', label=>'RPOP modifications',
27                         value=>$svc_acct->cgp_rpopallowed ? 'YES' : 'NO' ) %>
28
29   <% include('/view/elements/tr.html', label=>'Accepts mail to "all"',
30                         value=>$svc_acct->cgp_mailtoall ? 'YES' : 'NO' ) %>
31
32   <% include('/view/elements/tr.html', label=>'Add trailer to sent mail',
33                         value=>$svc_acct->cgp_addmailtrailer ? 'YES' : 'NO' ) %>
34
35 % my $archive_after = $svc_acct->cgp_archiveafter;
36 % $archive_after =
37 %   $archive_after
38 %     ? ( $archive_after / 86400 ). ' days'
39 %     : ( $archive_after eq '0' ? 'Never' : 'default (730 days)' );
40   <% include('/view/elements/tr.html', label=>'Archive messages after',
41                         value=>$archive_after, ) %>
42
43 %# preferences
44
45   <% include('/view/elements/tr.html', label=>'Message delete method',
46                         value=>$svc_acct->cgp_deletemode ) %>
47
48   <% include('/view/elements/tr.html', label=>'On logout remove trash',
49                         value=>$svc_acct->cgp_emptytrash ) %>
50
51   <% include('/view/elements/tr.html', label=>'Language',
52                         value=>$svc_acct->cgp_language || 'default (English)' ) %>
53   <% include('/view/elements/tr.html', label=>'Time zone',
54                         value=>$svc_acct->cgp_timezone || 'default (HostOS)' ) %>
55   <% include('/view/elements/tr.html', label=>'Layout',
56                         value=>$svc_acct->cgp_skinname || 'default (***)' ) %>
57
58   <% include('/view/elements/tr.html', label=>'Pronto style',
59                         value=>$svc_acct->cgp_prontoskinname ) %>
60
61   <% include('/view/elements/tr.html', label=>'Send read receipts',
62                         value=>$svc_acct->cgp_sendmdnmode ) %>
63
64 %# vacation message
65   <% include('/elements/init_overlib.html') %>
66
67   <TR>
68     <TD ALIGN="right">Vacation message</TD>
69     <TD BGCOLOR="#FFFFFF">
70       <% $vacation_rule ? 'Active' : '' %>
71       <% include('/elements/popup_link.html',
72                    'action' => $p.'edit/cgp_rule-vacation.html?'.
73                                  'svcnum='. $svc_acct->svcnum,
74                    'label'  => $vacation_rule ? '(edit)' : '(add)',
75                    'actionlabel' => 'Vacation message',
76                    'width'  => 600,
77                    'height' => 300,
78                    #'color'
79                 )
80       %>
81     </TD>
82   </TR>
83
84 %# redirect all mail
85
86   <TR>
87     <TD ALIGN="right">Redirect all mail</TD>
88     <TD BGCOLOR="#FFFFFF">
89       <% $redirect_rule ? 'Active' : '' %>
90       <% include('/elements/popup_link.html',
91                    'action' => $p.'edit/cgp_rule-redirect_all.html?'.
92                                  'svcnum='. $svc_acct->svcnum,
93                    'label'  => $redirect_rule ? '(edit)' : '(add)',
94                    'actionlabel' => 'Redirect all mail',
95                    'width' => 763,
96                    #'height'
97                    #'color'
98                 )
99       %>
100     </TD>
101   </TR>
102
103 %# mail rules
104
105   <% include('/view/elements/tr.html', label=>'Mail rules',
106                value=>$rule_link,
107             )
108   %>
109
110 %# RPOP
111
112   <% include('/view/elements/tr.html', label=>'Remote POP accounts',
113                value=>$rpop_link,
114             )
115   %>
116
117 <%init>
118
119 my %opt = @_;
120
121 #my $conf = new FS::Conf;
122
123 my $svc_acct = $opt{'svc_acct'};
124 #my $part_svc = $opt{'part_svc'};
125
126 my $rule_link = qq(<A HREF="${p}browse/cgp_rule.html?svcnum=). #"dum vim
127                       $svc_acct->svcnum. '">View/edit mail rules</A>';
128
129 my $rpop_link = qq(<A HREF="${p}browse/acct_snarf.html?svcnum=). #"dee vim
130                       $svc_acct->svcnum. '">View/edit remote POP accounts</A>';
131
132 my $vacation_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum,
133                                            'name'   => '#Vacation'
134                                          }
135                             );
136
137 my $redirect_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum,
138                                            'name'   => '#Redirect'
139                                          }
140                             );
141
142 </%init>