add test page for maestro status, RT#9381
authorivan <ivan>
Tue, 27 Jul 2010 01:48:23 +0000 (01:48 +0000)
committerivan <ivan>
Tue, 27 Jul 2010 01:48:23 +0000 (01:48 +0000)
FS/FS/Conf.pm
httemplate/misc/maestro-customer_status-test.html [new file with mode: 0644]
httemplate/view/cust_main.cgi

index 0d891be..0d77f3d 100644 (file)
@@ -3821,6 +3821,14 @@ and customer address. Include units.',
     'select_enum' => [ 'misc_info', 'top' ],
   },
 
+  {
+    'key'         => 'maestro-status_test',
+    'section'     => 'UI',
+    'description' => 'Display a link to the maestro status test page on the customer view page',
+    'type'        => 'checkbox',
+  },
+
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
diff --git a/httemplate/misc/maestro-customer_status-test.html b/httemplate/misc/maestro-customer_status-test.html
new file mode 100644 (file)
index 0000000..16d4b57
--- /dev/null
@@ -0,0 +1,32 @@
+<% include('/elements/header.html', {
+             'title' => "Customer $query status",
+          }) %>
+
+<% include('/elements/small_custview.html', $query, '', 1) %>
+<BR>
+
+<table style="border:1px solid #000000">
+% foreach my $key (keys %$return) {
+  <TR>
+    <TD ALIGN="right"><% $key %>:</TD>
+    <TD><B><% $return->{$key} %></B></TD>
+  </TR>
+% }
+</table>
+
+<% include('/elements/footer.html') %>
+<%init>
+
+my $return;
+
+my($query) = $cgi->keywords;
+if ( $query =~ /^(\d+)$/ ) {
+
+  use FS::Maestro;
+  $return = FS::Maestro::customer_status($1);
+
+} else {
+  $return = { 'error' => 'No custnum' };
+}
+
+</%init>
index a196c75..f6bef43 100755 (executable)
@@ -90,6 +90,9 @@ function areyousure(href, message) {
   This customer's signup URL: <A HREF="<% $signupurl %>?ref=<% $custnum %>"><% $signupurl %>?ref=<% $custnum %></A><BR><BR>
 % } 
 
+%if ( $conf->exists('maestro-status_test') ) {
+  <A HREF="<% $p %>misc/maestro-customer_status-test.html?<% $custnum %>">Test maestro status</A><BR><BR>
+% } 
 
 <A NAME="cust_main"></A>
 <TABLE BORDER=0>