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