summaryrefslogtreecommitdiff
path: root/httemplate/edit/acct_snarf.html
blob: 1c815b2cb462b5789390d968239cb9bc99923942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<% include('elements/edit.html',
             'name_singular' => 'remote email address',
             'table'         => 'acct_snarf',
             'labels' => { 'snarfnum'         => 'Remote email address',
                           #'svcnum'           => 'Local account',
                           'snarfname'        => 'Name',
                           'machine'          => 'Mail server',
                           'protocol'         => 'Protocol',
                           'username'         => 'Username',
                           '_password'        => 'Password',
                           'check_freq'       => 'Poll every',
                           'leavemail'        => 'Leave',
                           'apop'             => 'Use APOP',
                           'tls'              => 'TLS',
                           'mailbox'          => 'Mailbox',
                         },
             'fields' => [ 
                           { field=>'svcnum',   type=>'hidden', },
                           { field=>'protocol', type=>'hidden', },
                           'snarfname',
                           'machine',
                           'username',
                           { 'field'=>'_password', type=>'password', },
                           { 'field'     => 'check_freq',
                             'type'      => 'select',
                             'options'   => [ keys %$cf_labels ],
                             'labels'    => $cf_labels,
                           },
                           { field=>'leavemail', type=>'checkbox', value=>'Y' },
                           { field=>'apop',      type=>'checkbox', value=>'Y' },
                           { field=>'tls',       type=>'checkbox', value=>'Y' },
                           'mailbox',
                         ],
             'new_callback' => sub { my( $cgi, $acct_snarf ) = @_;
                                     $acct_snarf->svcnum($cgi->param('svcnum'));
                                     $acct_snarf->protocol('POP');
                                   },
             #'viewall_url' => $viewall_url,
             'menubar' => [],
          )
%>
<%init>

my %opt = @_;

#my $viewall_url = $p. "browse/$table.html?svcnum=$svcnum";

my $cf_labels = FS::acct_snarf->check_freq_labels;

</%init>