From 7c5c97fd11e04b0e71afed4d014ca5de6e05015a Mon Sep 17 00:00:00 2001 From: levinse Date: Fri, 17 Dec 2010 01:16:04 +0000 Subject: self-service improvements, RT10883 --- fs_selfservice/FS-SelfService/cgi/myaccount.html | 3 ++- fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 11 ++++++-- fs_selfservice/FS-SelfService/cgi/tktview.html | 31 +++++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 fs_selfservice/FS-SelfService/cgi/tktview.html (limited to 'fs_selfservice/FS-SelfService/cgi') diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount.html b/fs_selfservice/FS-SelfService/cgi/myaccount.html index db95f339f..eaf4164bf 100644 --- a/fs_selfservice/FS-SelfService/cgi/myaccount.html +++ b/fs_selfservice/FS-SelfService/cgi/myaccount.html @@ -94,8 +94,9 @@ Hello <%= $name %>!

foreach my $ticket ( @tickets ) { my $td = qq!!; + my $link = qq!!; $OUT .= - "$td". $ticket->{'id'}. "". + "$td $link". $ticket->{'id'}. "". $td. $ticket->{'subject'}. "". $td. ($ticket->{'content'} || $ticket->{'priority'}). "". $td. $ticket->{'queue'}. "". diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 0ef4e9aad..acd64146e 100644 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -16,7 +16,7 @@ use FS::SelfService qw( 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 @@ $session_id = $cgi->param('session'); #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 tktcreate { ); } +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'} ); diff --git a/fs_selfservice/FS-SelfService/cgi/tktview.html b/fs_selfservice/FS-SelfService/cgi/tktview.html new file mode 100644 index 000000000..6f540bcf4 --- /dev/null +++ b/fs_selfservice/FS-SelfService/cgi/tktview.html @@ -0,0 +1,31 @@ +<%= $url = "$selfurl?session=$session_id;action="; ''; %> +<%= include('header', "View ticket #$ticket_id") %> + +<%= +if($error) { + $OUT .= qq!
Error: $error
!; +} +elsif(@transactions) { + $OUT .= qq! !; + foreach my $txn ( @transactions ) { + next if $txn->{content} eq 'This transaction appears to have no content'; + $OUT .= ""; + } + $OUT .= "
$txn->{created}   $txn->{description}"; + $OUT .= "
$txn->{content}
"; +} +else { + $OUT .= "No transactions on this ticket"; +} +%> +


+
+ + + + Add reply to ticket: +
+
+
+ +<%= include('footer') %> -- cgit v1.2.1