summaryrefslogtreecommitdiff
path: root/httemplate/browse
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-10-27 14:24:00 -0700
committerMark Wells <mark@freeside.biz>2012-10-27 14:24:00 -0700
commiteccc8de2366e2e004a37761b8da2b447ec861ecb (patch)
treebce8f9b106ae4fec53432600847352a48b0d14b5 /httemplate/browse
parent2c2da653a3d39945d8d2c244d102ccbee862053b (diff)
ICS invoice spool format and email delivery, #17620
Diffstat (limited to 'httemplate/browse')
-rw-r--r--httemplate/browse/ftp_target.html56
-rw-r--r--httemplate/browse/upload_target.html49
2 files changed, 49 insertions, 56 deletions
diff --git a/httemplate/browse/ftp_target.html b/httemplate/browse/ftp_target.html
deleted file mode 100644
index 4a5782058..000000000
--- a/httemplate/browse/ftp_target.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<& 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>
diff --git a/httemplate/browse/upload_target.html b/httemplate/browse/upload_target.html
new file mode 100644
index 000000000..e166f3520
--- /dev/null
+++ b/httemplate/browse/upload_target.html
@@ -0,0 +1,49 @@
+<& elements/browse.html,
+ 'title' => 'Upload targets',
+ 'menubar' => [ 'Add a target' => $p.'edit/upload_target.html', ],
+ 'name' => 'targets',
+ 'query' => { 'table' => 'upload_target',
+ 'hashref' => {},
+ },
+ 'count_query' => $count_query,
+ 'header' => [ '#',
+ 'Protocol',
+ 'Username',
+ 'Server/Domain',
+ 'Password',
+ 'Path',
+ '', #handling
+ ],
+ 'fields' => [ 'targetnum',
+ sub {
+ my $target = shift;
+ $label{$target->protocol}
+ },
+ 'username',
+ 'hostname',
+ 'password',
+ 'path',
+ 'handling',
+ ],
+ 'links' => [ $link, $link, $link, $link, ],
+&>
+</TABLE>
+
+<% include('/elements/footer.html') %>
+
+<%once>
+
+my $count_query = 'SELECT COUNT(*) FROM upload_target';
+my %label = (
+ email => 'Email',
+ ftp => 'FTP',
+ sftp => 'SFTP',
+);
+</%once>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $link = [ $p.'edit/upload_target.html?', 'targetnum' ];
+</%init>