[freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi tktview.html, NONE, 1.1 myaccount.html, 1.19, 1.20 selfservice.cgi, 1.49, 1.50

Erik Levinson levinse at wavetail.420.am
Thu Dec 16 17:16:02 PST 2010


Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi
In directory wavetail.420.am:/tmp/cvs-serv3002/fs_selfservice/FS-SelfService/cgi

Modified Files:
	myaccount.html selfservice.cgi 
Added Files:
	tktview.html 
Log Message:
self-service improvements, RT10883

Index: selfservice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/selfservice.cgi,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -w -d -r1.49 -r1.50
--- selfservice.cgi	15 Dec 2010 15:09:44 -0000	1.49
+++ selfservice.cgi	17 Dec 2010 01:16:00 -0000	1.50
@@ -16,7 +16,7 @@
   part_svc_info provision_acct provision_external
   unprovision_svc change_pkg suspend_pkg domainselector
   list_svcs list_svc_usage list_cdr_usage list_support_usage
-  myaccount_passwd list_invoices create_ticket
+  myaccount_passwd list_invoices create_ticket get_ticket
   mason_comp
 );
 
@@ -73,7 +73,7 @@
 
 #order|pw_list XXX ???
 $cgi->param('action') =~
-    /^(myaccount|tktcreate|invoices|view_invoice|make_payment|make_ach_payment|make_term_payment|make_thirdparty_payment|payment_results|ach_payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|change_pay|process_change_bill|process_change_ship|process_change_pay|customer_order_pkg|process_order_pkg|customer_change_pkg|process_change_pkg|process_order_recharge|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|view_usage|view_usage_details|view_cdr_details|view_support_details|change_password|process_change_password|customer_suspend_pkg|process_suspend_pkg)$/
+    /^(myaccount|tktcreate|tktview|invoices|view_invoice|make_payment|make_ach_payment|make_term_payment|make_thirdparty_payment|payment_results|ach_payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|change_pay|process_change_bill|process_change_ship|process_change_pay|customer_order_pkg|process_order_pkg|customer_change_pkg|process_change_pkg|process_order_recharge|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|view_usage|view_usage_details|view_cdr_details|view_support_details|change_password|process_change_password|customer_suspend_pkg|process_suspend_pkg)$/
   or die "unknown action ". $cgi->param('action');
 my $action = $1;
 
@@ -224,6 +224,13 @@
 	    );
 }
 
+sub tktview {
+ get_ticket(	'session_id' => $session_id,
+		'ticket_id' => $cgi->param('ticket_id'),
+		'reply' => $cgi->param('reply'),
+	    );
+}
+
 sub customer_order_pkg {
   my $init_data = signup_info( 'customer_session_id' => $session_id );
   return $init_data if ( $init_data->{'error'} );

Index: myaccount.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/myaccount.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -w -d -r1.19 -r1.20
--- myaccount.html	14 Dec 2010 23:27:19 -0000	1.19
+++ myaccount.html	17 Dec 2010 01:16:00 -0000	1.20
@@ -94,8 +94,9 @@
 
     foreach my $ticket ( @tickets ) {
       my $td = qq!<TD BGCOLOR="#$col">!;
+      my $link = qq!<A HREF="${url}tktview;ticket_id=$ticket->{id}">!;
       $OUT .=
-        "<TR>$td". $ticket->{'id'}. "</TD>".
+        "<TR>$td $link". $ticket->{'id'}. "</A></TD>".
         $td. $ticket->{'subject'}. "</TD>".
         $td. ($ticket->{'content'} || $ticket->{'priority'}). "</TD>".
         $td. $ticket->{'queue'}. "</TD>".

--- NEW FILE: tktview.html ---
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('header', "View ticket #$ticket_id") %>

<%=
if($error) {
    $OUT .= qq! <div style="font-weight: bold; color: red; font-size: 110%">Error: $error</div> !;
}
elsif(@transactions) {
    $OUT .= qq! <TABLE border="1">!;
    foreach my $txn ( @transactions ) {
	next if $txn->{content} eq 'This transaction appears to have no content';
	$OUT .= "<TR><TD><B>$txn->{created} &nbsp; $txn->{description}</B>";
	$OUT .= "<PRE>$txn->{content}</PRE></TD></TR>";
    }
    $OUT .= "</TABLE>";
}
else {
    $OUT .= "No transactions on this ticket";
}
%>
<BR><BR><BR>
<FORM ACTION="<%=$selfurl%>" METHOD=POST>
    <input type="hidden" name="session" value="<%=$session_id%>">
    <input type="hidden" name="ticket_id" value="<%=$ticket_id%>">
    <input type="hidden" name="action" value="tktview">
    Add reply to ticket:
    <BR><textarea name="reply" cols="60" rows="10"></textarea>
    <BR><input type="submit" value="Reply">
</form> 

<%= include('footer') %>



More information about the freeside-commits mailing list