diff options
author | levinse <levinse> | 2010-12-17 01:16:00 +0000 |
---|---|---|
committer | levinse <levinse> | 2010-12-17 01:16:00 +0000 |
commit | 0a9c2506f72162e9fc99679a35a6540b27a22848 (patch) | |
tree | b65354c18a350814780193cb13617bdba8350e9a /fs_selfservice | |
parent | 95c2cfba9666f31c5444f8f6c207e7a728a5e96f (diff) |
self-service improvements, RT10883
Diffstat (limited to 'fs_selfservice')
-rw-r--r-- | fs_selfservice/FS-SelfService/SelfService.pm | 1 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/myaccount.html | 3 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 11 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/tktview.html | 31 |
4 files changed, 43 insertions, 3 deletions
diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm index 9e6fe6887..135feebd5 100644 --- a/fs_selfservice/FS-SelfService/SelfService.pm +++ b/fs_selfservice/FS-SelfService/SelfService.pm @@ -61,6 +61,7 @@ $socket .= '.'.$tag if defined $tag && length($tag); 'unprovision_svc' => 'MyAccount/unprovision_svc', 'myaccount_passwd' => 'MyAccount/myaccount_passwd', 'create_ticket' => 'MyAccount/create_ticket', + 'get_ticket' => 'MyAccount/get_ticket', 'signup_info' => 'Signup/signup_info', 'skin_info' => 'MyAccount/skin_info', 'access_info' => 'MyAccount/access_info', 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 %>!<BR><BR> 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>". 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! <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} $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') %> |