diff options
author | Mark Wells <mark@freeside.biz> | 2012-06-13 16:18:49 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-06-13 16:18:49 -0700 |
commit | 9ef78be87df0f0f880ff5d903ed6243b67369cf0 (patch) | |
tree | e69278b1e33baf2b9c0356ed31435fc0f0188b01 /httemplate/browse | |
parent | daa09251fec52517b630b3f6935041dc7c795f90 (diff) |
table of FTP targets for invoice spool upload, #17620
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/ftp_target.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/httemplate/browse/ftp_target.html b/httemplate/browse/ftp_target.html new file mode 100644 index 000000000..4a5782058 --- /dev/null +++ b/httemplate/browse/ftp_target.html @@ -0,0 +1,56 @@ +<& elements/browse.html, + 'title' => 'FTP targets', + 'menubar' => [ 'Add a target' => $p.'edit/ftp_target.html', ], + 'name' => 'FTP targets', + 'query' => { 'table' => 'ftp_target', + 'hashref' => {}, + }, + 'count_query' => $count_query, + 'header' => [ '#', + 'Server', + 'Username', + 'Password', + 'Path', + 'Protocol', + '', #handling + ], + 'fields' => [ 'targetnum', + 'hostname', + 'username', + 'password', + 'path', + sub { + my $ftp_target = shift; + my $label; + if ($ftp_target->secure) { + $label = 'SFTP'; + $label .= ' (port '.$ftp_target->port.')' + if $ftp_target->port != 22; + } + else { + $label = 'FTP'; + $label .= ' (port '.$ftp_target->port.')' + if $ftp_target->port != 21; + } + $label; + }, + 'handling', + ], + 'links' => [ $link, $link ], +&> +</TABLE> + +<% include('/elements/footer.html') %> + +<%once> + +my $count_query = 'SELECT COUNT(*) FROM ftp_target'; + +</%once> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $link = [ $p.'edit/ftp_target.html?', 'targetnum' ]; +</%init> |