summaryrefslogtreecommitdiff
path: root/httemplate/view
diff options
context:
space:
mode:
authorivan <ivan>2010-11-07 00:57:16 +0000
committerivan <ivan>2010-11-07 00:57:16 +0000
commit2d77bbdb0f3deff86a4b721e7b4f8be7ff5996d4 (patch)
treee6e297369e93092440710eecb5ebb1ebd5d26a28 /httemplate/view
parent9c2d7c2a11002c9dc6774106e26953f6590ddf00 (diff)
certificates ala communigate, RT#7515
Diffstat (limited to 'httemplate/view')
-rw-r--r--httemplate/view/elements/svc_Common.html10
-rw-r--r--httemplate/view/svc_Common.html4
-rw-r--r--httemplate/view/svc_cert.cgi19
3 files changed, 30 insertions, 3 deletions
diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html
index 8a352f3fa..618d33eed 100644
--- a/httemplate/view/elements/svc_Common.html
+++ b/httemplate/view/elements/svc_Common.html
@@ -18,6 +18,10 @@
# defaults to "edit/$table.cgi?", will have svcnum appended
'edit_url' =>
+
+ #at the very bottom (well, as low as you can go from here)
+ 'html_foot' => '',
+
)
</%doc>
@@ -56,12 +60,14 @@ Unprovision this Service</A>
% foreach my $f ( @$fields ) {
%
-% my($field, $type);
+% my($field, $type, $value);
% if ( ref($f) ) {
% $field = $f->{'field'},
+% $value = $f->{'value'} ? &{ $f->{'value'} }($svc_x) : $svc_x->$field;
% $type = $f->{'type'} || 'text',
% } else {
% $field = $f;
+% $value = $svc_x->$field;
% $type = 'text';
% }
%
@@ -78,7 +84,7 @@ Unprovision this Service</A>
% #eventually more options for <SELECT>, etc. fields
- <TD BGCOLOR="#ffffff"><% $svc_x->$field %><TD>
+ <TD BGCOLOR="#ffffff"><% $value %><TD>
</TR>
diff --git a/httemplate/view/svc_Common.html b/httemplate/view/svc_Common.html
index defbee974..7ed63c7aa 100644
--- a/httemplate/view/svc_Common.html
+++ b/httemplate/view/svc_Common.html
@@ -1,6 +1,6 @@
<% include('elements/svc_Common.html',
'table' => $table,
- 'edit_url' => $p."edit/svc_Common.html?svcdb=$table;svcnum=",
+ 'edit_url' => $edit_url, #$p."edit/svc_Common.html?svcdb=$table;svcnum=",
%opt,
)
%>
@@ -12,6 +12,8 @@ $cgi->param('svcdb') =~ /^(svc_\w+)$/ or die "unparsable svcdb";
my $table = $1;
require "FS/$table.pm";
+my $edit_url = svc_url( 'm' => $m, 'action' => 'edit', 'svcdb' => $table, query => '' );
+
my %opt;
if ( UNIVERSAL::can("FS::$table", 'table_info') ) {
$opt{'name'} = "FS::$table"->table_info->{'name'};
diff --git a/httemplate/view/svc_cert.cgi b/httemplate/view/svc_cert.cgi
new file mode 100644
index 000000000..eeda9a1dd
--- /dev/null
+++ b/httemplate/view/svc_cert.cgi
@@ -0,0 +1,19 @@
+<% include('elements/svc_Common.html',
+ 'table' => 'svc_pbx',
+ 'edit_url' => $p."edit/svc_Common.html?svcdb=svc_pbx;svcnum=",
+ #'labels' => \%labels,
+ #'html_foot' => $html_foot,
+ 'fields' => []
+ )
+%>
+<%init>
+
+#my $fields = FS::svc_pbx->table_info->{'fields'};
+#my %labels = map { $_ => ( ref($fields->{$_})
+# ? $fields->{$_}{'label'}
+# : $fields->{$_}
+# );
+# }
+# keys %$fields;
+
+</%init>