summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2011-03-13 02:31:10 +0000
committerivan <ivan>2011-03-13 02:31:10 +0000
commit37314c736907de968d3f61dd5dc93aa61c6ca161 (patch)
tree83657e8acce2bb28d6754bc03f0cab2600110263 /httemplate/edit
parent1888d732dcc9f50b7f88ebc684d1c05b534cbd92 (diff)
qualification address handling changes, RT#7111
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/elements/edit.html50
-rw-r--r--httemplate/edit/prospect_main.html10
2 files changed, 15 insertions, 45 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index b0c27e62a..545221a28 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -281,51 +281,25 @@ Example:
% 'disabled' => $f->{'disabled'},
% );
%
-% #selectlayers, others?
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}),
-% qw( js_only html_only select_only layers_only cell_style);
-%
-% #select-*
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}), qw( empty_label );
+% $include_common{$_} = $f->{$_} foreach grep exists($f->{$_}),
+% qw( js_only html_only select_only layers_only cell_style ),#selectlayers,?
+% qw( empty_label ), # select-*
+% qw( value_col ), # select-table
+% qw( table name_col ), #(select,checkboxes)-table
+% qw( target_table link_table ), #checkboxes-table
+% qw( hashref agent_virt agent_null agent_null_right ),#*-table
+% qw( formatted_value ), #fixed
+% qw( country ), #select-country
+% qw( width height ), #htmlarea
+% qw( alt_format ), #select-cust_location
+% ;
%
% #select-table
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}), qw( value_col );
% $include_common{$_} = ref( $f->{$_} ) eq 'CODE'
% ? &{ $f->{$_} }( $cgi, $object ) #, $f )
% : $f->{$_}
% foreach grep exists($f->{$_}), qw( extra_sql );
%
-% #select-table, checkboxes-table
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}), qw( table name_col );
-%
-% #checkboxes-table
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}), qw( target_table link_table );
-%
-% #*-table
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}),
-% qw( hashref agent_virt agent_null agent_null_right );
-%
-% # fixed
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}),
-% qw( formatted_value );
-%
-% # select-country
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}),
-% qw( country );
-%
-% #htmlarea
-% $include_common{$_} = $f->{$_}
-% foreach grep exists($f->{$_}), qw( width height );
-%
-%
% if ( $type eq 'tablebreak-tr-title' ) {
% $include_common{'table_id'} = 'TableNumber'. $tablenum++;
% }
diff --git a/httemplate/edit/prospect_main.html b/httemplate/edit/prospect_main.html
index c260eb8e2..eb3e4d6d3 100644
--- a/httemplate/edit/prospect_main.html
+++ b/httemplate/edit/prospect_main.html
@@ -19,12 +19,6 @@
{ 'field' => 'contactnum',
'type' => 'contact',
'colspan' => 6,
- ##actually o2m, but this seems to be working for edit so far
- #'m2name_table' => 'contact',
- #'m2name_namecol' => 'contactnum',
- #'m2_label' => 'Contact',
- #'m2_error_callback' => $m2_error_callback,
-
'o2m_table' => 'contact',
'm2_label' => 'Contact',
'm2_error_callback' => $m2_error_callback,
@@ -33,6 +27,7 @@
{ 'field' => 'locationnum',
'type' => 'select-cust_location',
'empty_label' => 'No address',
+ 'alt_format' => $conf->exists('prospect_main-alt_address_format'),
},
],
'new_callback' => $new_callback,
@@ -44,6 +39,7 @@
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
+my $conf = new FS::Conf;
my $prospectnum;
if ( $cgi->param('error') ) {
@@ -139,7 +135,7 @@ my $m2_error_callback = sub {
my $num = $1;
if ( grep $cgi->param("contactnum$num$_"), @gfields ) {
my $x = new FS::contact {
- 'contactnum' => $cgi->param("contactnum$num"),
+ 'contactnum' => scalar($cgi->param("contactnum$num")),
map { $_ => scalar($cgi->param("contactnum${num}_$_")) } @fields,
};
$x;