From 2e928dafa3cf6383ea9e97f48af61af05e5a292a Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 31 Dec 2009 02:20:33 +0000 Subject: prospecting: proper contact error handling when you add a prospect --- httemplate/elements/contact.html | 56 ++++++++++++++-------------------------- httemplate/elements/menu.html | 7 +++++ 2 files changed, 27 insertions(+), 36 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html index 38703bfef..2023a6cfe 100644 --- a/httemplate/elements/contact.html +++ b/httemplate/elements/contact.html @@ -4,42 +4,18 @@ - - - - +% foreach my $field ( @fields ) { + +% }
- - >
- First name -
- - >
- Last name -
- - >
- Title/Position -
- - >
- Comment -
+ get($field) |h %>" + <% $onchange %> + >
+ <% $label{$field} %> +
@@ -69,4 +45,12 @@ if ( $curr_value ) { $contact = new FS::contact {}; } +tie my %label, 'Tie::IxHash', + 'first' => 'First name', + 'last' => 'Last name', + 'title' => 'Title/Position', + 'comment' => 'Comment', +; +my @fields = keys %label; + diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 167559d0b..573741e21 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -60,6 +60,11 @@ my $curuser = $FS::CurrentUser::CurrentUser; #XXX Active tickets not assigned to a customer +tie my %report_prospects, 'Tie::IxHash', + 'List prospects' => [ $fsurl. 'search/prospect_main.html', '' ], + 'Advanced prospect reports' => [ $fsurl. 'search/report_prospect_main.html', '' ], +; + tie my %report_customers_lists, 'Tie::IxHash', 'by customer number' => [ $fsurl. 'search/cust_main.cgi?browse=custnum', '' ], 'by last name' => [ $fsurl. 'search/cust_main.cgi?browse=last', '' ], @@ -251,6 +256,8 @@ if($curuser->access_right('Financial reports')) { } # else $report_financial contains nothing. tie my %report_menu, 'Tie::IxHash'; +$report_menu{'Prospects'} = [ \%report_prospects, 'Prospect reports' ] + if $curuser->access_right('List prospects'); $report_menu{'Customers'} = [ \%report_customers, 'Customer reports' ] if $curuser->access_right('List customers'); $report_menu{'Invoices'} = [ \%report_invoices, 'Invoice reports' ] -- cgit v1.2.1