communigate vacation & redirect all rules, RT#7514
authorivan <ivan>
Mon, 26 Jul 2010 22:59:04 +0000 (22:59 +0000)
committerivan <ivan>
Mon, 26 Jul 2010 22:59:04 +0000 (22:59 +0000)
httemplate/edit/cgp_rule-redirect_all.html [new file with mode: 0644]
httemplate/edit/cgp_rule-vacation.html [new file with mode: 0644]
httemplate/view/svc_acct/communigate.html

diff --git a/httemplate/edit/cgp_rule-redirect_all.html b/httemplate/edit/cgp_rule-redirect_all.html
new file mode 100644 (file)
index 0000000..898eef8
--- /dev/null
@@ -0,0 +1,57 @@
+<% include('/elements/header-popup.html', 'Redirect all mail') %>
+
+<FORM NAME="RedirectAllForm" ACTION="process/cgp_rule-redirect_all.html" METHOD=POST>
+
+%# XXX upstream Redirect 1
+
+<% ntable("#cccccc", 2) %>
+
+<TR>
+  <TD ALIGN="right">Redirect all mail to</TD>
+  <TD><textarea name="RedirectText" rows="5" cols="50"></textarea></TD>
+</TR>
+
+<% include('/elements/tr-checkbox.html',
+             'name'       => 'RedirKeep',
+             'label'      => 'Keep a copy',
+             'value'      => 1,
+             'curr_value' => '', #XXX
+          )
+%>
+
+<% include('/elements/tr-checkbox.html',
+             'name'       => 'RedirHuman',
+             'label'      => 'Do not redirect automatic messages',
+             'value'      => 1,
+             'curr_value' => '', #XXX
+          )
+%>
+
+<% include('/elements/tr-checkbox.html',
+             'name'       => 'KeepToAndCc',
+             'label'      => 'Preserve To/Cc fields',
+             'value'      => 1,
+             'curr_value' => '', #XXX
+          )
+%>
+
+</TABLE>
+
+<BR>
+<INPUT TYPE="submit" VALUE="Redirect all mail">
+%#XXX Add/Edit
+
+</FORM>
+
+</BODY>
+</HTML>
+<%init>
+
+my %opt = @_;
+
+my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $opt{'svcnum'} } )
+  or die "unknown svcnum";
+
+#XXX look for existing redirect all rule
+
+</%init>
diff --git a/httemplate/edit/cgp_rule-vacation.html b/httemplate/edit/cgp_rule-vacation.html
new file mode 100644 (file)
index 0000000..efdc541
--- /dev/null
@@ -0,0 +1,47 @@
+<% include('/elements/header-popup.html', 'Vacation rule') %>
+
+<FORM NAME="VacationForm" ACTION="process/cgp_rule-vacation.html" METHOD=POST>
+
+%# XXX upstream Vacation 1
+
+<% ntable("#cccccc", 2) %>
+
+<TR>
+  <TD ALIGN="right">Vacation message</TD>
+  <TD><textarea name="VacationText" rows="5" cols="50"></textarea></TD>
+</TR>
+
+<% include('/elements/tr-input-date-field.html', {
+             'label' => 'Ends',
+             'name'  => 'vacationTill',
+             'value' => '', #XXX
+          })
+%>
+%# XXX upstream:
+%#  VacationTill 1
+%#  vacationDay
+%#  vacationMonth
+%#  vacationYear
+
+%#XXX Clear 'Replied Addresses' List
+
+</TABLE>
+
+<BR>
+<INPUT TYPE="submit" VALUE="Add vacation message">
+%#XXX Add/Edit
+
+</FORM>
+
+</BODY>
+</HTML>
+<%init>
+
+my %opt = @_;
+
+my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $opt{'svcnum'} } )
+  or die "unknown svcnum";
+
+#XXX look for existing vacation rule
+
+</%init>
index 9d66807..0f090fd 100644 (file)
   <% include('/view/elements/tr.html', label=>'Send read receipts',
                         value=>$svc_acct->cgp_sendmdnmode ) %>
 
-%#XXX vacation message, redirect all mail
+%# 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">
+      <% include('/elements/popup_link.html',
+                   'action' => $p.'edit/cgp_rule-vacation.html?'.
+                                 'svcnum='. $svc_acct->svcnum,
+                   'label'  => '(add)', #XXX (edit)
+                   'actionlabel' => 'Vacation message',
+                   'width'  => 600,
+                   'height' => 300,
+                   #'color'
+                )
+      %>
+    </TD>
+  </TR>
+
+%# redirect all mail
+%#XXX finish me...
+
+  <TR>
+    <TD ALIGN="right">Redirect all mail</TD>
+    <TD BGCOLOR="#FFFFFF">
+      <% include('/elements/popup_link.html',
+                   'action' => $p.'edit/cgp_rule-redirect_all.html?'.
+                                 'svcnum='. $svc_acct->svcnum,
+                   'label'  => '(add)', #XXX (edit)
+                   'actionlabel' => 'Redirect all mail',
+                   'width' => 763,
+                   #'height'
+                   #'color'
+                )
+      %>
+    </TD>
+  </TR>
 
 %# mail rules