summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2010-12-10 22:09:06 +0000
committerivan <ivan>2010-12-10 22:09:06 +0000
commit9bf138ff16677425938e3aa784d0e5189d1b5a8b (patch)
tree1b275eab5c93a72a6df1d768dcfd6c157ccf1064 /httemplate
parent094ad79830314e3f21f9abde3fb98eb4d0fab791 (diff)
cardfortress backend support
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/edit/process/svc_acct.cgi11
-rwxr-xr-xhttemplate/view/svc_acct.cgi6
-rw-r--r--httemplate/view/svc_acct/cardfortress.html27
3 files changed, 40 insertions, 4 deletions
diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi
index ba21ab4b5..52701dfc4 100755
--- a/httemplate/edit/process/svc_acct.cgi
+++ b/httemplate/edit/process/svc_acct.cgi
@@ -44,11 +44,14 @@ unless ( $cgi->param('cgp_accessmodes') ) {
}
my %hash = $svcnum ? $old->hash : ();
-map {
+for ( fields('svc_acct'), qw( pkgnum svcpart usergroup ) ) {
$hash{$_} = scalar($cgi->param($_));
- #} qw(svcnum pkgnum svcpart username _password popnum uid gid finger dir
- # shell quota slipip)
- } (fields('svc_acct'), qw ( pkgnum svcpart usergroup ));
+}
+if ( $svcnum ) {
+ for ( grep $old->$_, qw( cf_privatekey ) ) {
+ $hash{$_} = $old->$_;
+ }
+}
my $new = new FS::svc_acct ( \%hash );
my $error = '';
diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi
index 9135e67e9..4e82569fc 100755
--- a/httemplate/view/svc_acct.cgi
+++ b/httemplate/view/svc_acct.cgi
@@ -56,6 +56,12 @@ Service #<B><% $svcnum %></B>
</FORM>
<BR>
+<% include( 'svc_acct/cardfortress.html',
+ 'svc_acct' => $svc_acct,
+ %gopt,
+ )
+%>
+
<% include( 'svc_acct/hosting.html',
%gopt,
)
diff --git a/httemplate/view/svc_acct/cardfortress.html b/httemplate/view/svc_acct/cardfortress.html
new file mode 100644
index 000000000..d010fcdad
--- /dev/null
+++ b/httemplate/view/svc_acct/cardfortress.html
@@ -0,0 +1,27 @@
+% if ( $svc_acct->cf_privatekey ) {
+
+<div class="fscontainer">
+<div class="fsbox">
+<div class="fsbox-title">
+ <span class="left">Card Fortress</span>
+</div>
+
+ <PRE><FONT STYLE="font-family:monospace"><% $svc_acct->cf_privatekey %></FONT></PRE>
+
+ <% $conf->config('svc_acct-cf_privatekey-message') %>
+
+%#XXX and then there should be a remove link to get rid of it
+
+% }
+
+</div>
+</div>
+<%init>
+
+my %opt = @_;
+
+my $svc_acct = $opt{'svc_acct'};
+
+my $conf = new FS::Conf;
+
+</%init>