1 <% include('/elements/header-popup.html', 'Vacation rule') %>
3 <% include('/elements/error.html') %>
5 <FORM NAME="VacationForm" ACTION="process/cgp_rule-vacation.html" METHOD=POST>
7 <INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $opt{'svcnum'} %>">
9 <% ntable("#cccccc", 2) %>
12 <TD ALIGN="right">Vacation message</TD>
13 <TD><textarea name="VacationText" rows="5" cols="50"><% $reply_with ? $reply_with->params : '' %></textarea></TD>
16 <% include('/elements/tr-input-date-field.html', {
18 'name' => 'vacationTill',
19 'format' => '%d %b %Y',
20 'value' => ( $cgi->param('error')
21 ? scalar($cgi->param('vacationTill'))
22 : ( $curr_date ? $curr_date->params : '' )
27 %#Clear 'Replied Addresses' List ?
32 <INPUT TYPE="submit" VALUE="<% $cgp_rule ? 'Edit' : 'Add' %> vacation message">
42 my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $opt{'svcnum'} } )
43 or die "unknown svcnum";
45 #look for existing rule
46 my $cgp_rule = qsearchs('cgp_rule', { 'svcnum' => $svc_acct->svcnum,
51 my( $curr_date, $reply_with ) = ( '', '' );
53 $curr_date = qsearchs('cgp_rule_condition', {
54 'rulenum' => $cgp_rule->rulenum,
55 'conditionname' => 'Current Date',
58 $reply_with = qsearchs('cgp_rule_action', {
59 'rulenum' => $cgp_rule->rulenum,
60 'action' => 'Reply with',