From 03ceab71dad1e5eb366865d304e5e459cc905ce4 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 28 Dec 2009 19:20:25 +0000 Subject: beginning of prospect/CRM/contact work --- httemplate/elements/contact.html | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 httemplate/elements/contact.html (limited to 'httemplate/elements/contact.html') diff --git a/httemplate/elements/contact.html b/httemplate/elements/contact.html new file mode 100644 index 000000000..38703bfef --- /dev/null +++ b/httemplate/elements/contact.html @@ -0,0 +1,72 @@ +% unless ( $opt{'js_only'} ) { + + + + + + + + + + +
+ + >
+ First name +
+ + >
+ Last name +
+ + >
+ Title/Position +
+ + >
+ Comment +
+ +% } +<%init> + +my( %opt ) = @_; + +my $name = $opt{'element_name'} || $opt{'field'} || 'contactnum'; +my $id = $opt{'id'} || 'contactnum'; + +my $curr_value = $opt{'curr_value'} || $opt{'value'}; + +my $onchange = ''; +if ( $opt{'onchange'} ) { + $onchange = $opt{'onchange'}; + $onchange .= '(this)' unless $onchange =~ /\(\w*\);?$/; + $onchange =~ s/\(what\);/\(this\);/g; #ugh, terrible hack. all onchange + #callbacks should act the same + $onchange = 'onChange="'. $onchange. '"'; +} + +my $contact; +if ( $curr_value ) { + $contact = qsearchs('contact', { 'contactnum' => $curr_value } ); +} else { + $contact = new FS::contact {}; +} + + -- cgit v1.2.1