summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorivan <ivan>2010-08-06 00:45:29 +0000
committerivan <ivan>2010-08-06 00:45:29 +0000
commit0715eb639658bfde2c21c39cd5ccaf4bf22b18d4 (patch)
treea4abf0d4d046b65151d8e7d13657467b8f2322de /httemplate/view
parentb93983d6758cd67b7bcb6c4118344981d8bb6e8d (diff)
communigate account rules: vacation & redirect all, RT#7514
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/svc_acct/communigate.html21
1 files changed, 15 insertions, 6 deletions
diff --git a/httemplate/view/svc_acct/communigate.html b/httemplate/view/svc_acct/communigate.html
index 0f090fdb9..870744a87 100644
--- a/httemplate/view/svc_acct/communigate.html
+++ b/httemplate/view/svc_acct/communigate.html
@@ -54,17 +54,16 @@
value=>$svc_acct->cgp_sendmdnmode ) %>
%# vacation message
-%#XXX finish me... do we need to search for specific rules
-%# (and hide them?) need to see what CGP gives back after we've added a rule
<% include('/elements/init_overlib.html') %>
<TR>
<TD ALIGN="right">Vacation message</TD>
<TD BGCOLOR="#FFFFFF">
+ <% $vacation_rule ? 'Active' : '' %>
<% include('/elements/popup_link.html',
'action' => $p.'edit/cgp_rule-vacation.html?'.
'svcnum='. $svc_acct->svcnum,
- 'label' => '(add)', #XXX (edit)
+ 'label' => $vacation_rule ? '(edit)' : '(add)',
'actionlabel' => 'Vacation message',
'width' => 600,
'height' => 300,
@@ -75,15 +74,15 @@
</TR>
%# redirect all mail
-%#XXX finish me...
<TR>
<TD ALIGN="right">Redirect all mail</TD>
<TD BGCOLOR="#FFFFFF">
+ <% $redirect_rule ? 'Active' : '' %>
<% include('/elements/popup_link.html',
'action' => $p.'edit/cgp_rule-redirect_all.html?'.
'svcnum='. $svc_acct->svcnum,
- 'label' => '(add)', #XXX (edit)
+ 'label' => $redirect_rule ? '(edit)' : '(add)',
'actionlabel' => 'Redirect all mail',
'width' => 763,
#'height'
@@ -110,6 +109,16 @@ my $svc_acct = $opt{'svc_acct'};
#my $part_svc = $opt{'part_svc'};
my $rule_link = qq(<A HREF="${p}browse/cgp_rule.html?svcnum=).
- $svc_acct->svcnum. '">View/edit mail rules</A>';
+ $svc_acct->svcnum. '">View/edit mail rules</A>'; #'dum vim
+
+my $vacation_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum,
+ 'name' => '#Vacation'
+ }
+ );
+
+my $redirect_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum,
+ 'name' => '#Redirect'
+ }
+ );
</%init>