communigate account rules: vacation & redirect all, RT#7514
[freeside.git] / httemplate / edit / process / cgp_rule-vacation.html
diff --git a/httemplate/edit/process/cgp_rule-vacation.html b/httemplate/edit/process/cgp_rule-vacation.html
new file mode 100644 (file)
index 0000000..f10d72b
--- /dev/null
@@ -0,0 +1,29 @@
+<% include('cgp_rule-simplified.html',
+             'name'       => '#Vacation',
+             'priority'   => 2,
+             'redirect'   => 'cgp_rule-vacation.html',
+             'conditions' => [
+               { conditionname => 'Human Generated', },
+               { conditionname => 'From',
+                 op            => 'not in',
+                 params        => '#RepliedAddresses',
+               },
+               ( $cgi->param('VacationTill')
+                   ? ( { conditionname => 'Current Date',
+                         op            => 'less than', #is less?
+                         params        => scalar($cgi->param('VacationTill')),
+                       }
+                     )
+                   : ()
+               ),
+             ],
+             'actions'    => [
+               { action => 'Reply with',
+                 params => scalar($cgi->param('VacationText')),
+               },
+               { action => "Remember 'From' in",
+                 params => 'RepliedAddresses',
+               },
+             ],
+          )
+%>