diff options
author | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
commit | 03ceab71dad1e5eb366865d304e5e459cc905ce4 (patch) | |
tree | 18b4532289a0237ae694b1ad5c033b25f448bd7c /httemplate/edit/process/prospect_main.html | |
parent | 5950a980cef4968ac59ca8041d2204e6d98e7a3d (diff) |
beginning of prospect/CRM/contact work
Diffstat (limited to 'httemplate/edit/process/prospect_main.html')
-rw-r--r-- | httemplate/edit/process/prospect_main.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html new file mode 100644 index 000000000..34d26421b --- /dev/null +++ b/httemplate/edit/process/prospect_main.html @@ -0,0 +1,34 @@ +<% include('elements/process.html', + 'table' => 'prospect_main', + 'args_callback' => $args_callback, + 'agent_virt' => 1, + 'process_o2m' => { + 'table' => 'contact', + 'fields' => [qw( first last title comment )], + }, + 'redirect' => popurl(3). 'view/prospect_main.html?', + ) +%> +<%init> + +my $args_callback = sub { + my( $cgi, $object ) = @_; + + $cgi->param('locationnum') =~ /^(\-?\d*)$/ + or die 'illegal locationnum '. $cgi->param('locationnum'); + my $locationnum = $1; + + return ( 'cust_location' => '' ) unless $locationnum; + + my $cust_location = new FS::cust_location { + map { $_ => scalar($cgi->param($_)) } + qw( address1 address2 city county state zip country ) + }; + + $cust_location->locationnum($locationnum) unless $locationnum == -1; + + ( 'cust_location' => $cust_location ); + +}; + +</%init> |