[freeside-commits] freeside/httemplate/edit/elements edit.html, 1.40, 1.41
Ivan,,,
ivan at wavetail.420.am
Wed Dec 30 18:20:35 PST 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit/elements
In directory wavetail.420.am:/tmp/cvs-serv16477/httemplate/edit/elements
Modified Files:
edit.html
Log Message:
prospecting: proper contact error handling when you add a prospect
Index: edit.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/elements/edit.html,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- edit.html 28 Dec 2009 19:18:20 -0000 1.40
+++ edit.html 31 Dec 2009 02:20:33 -0000 1.41
@@ -40,14 +40,14 @@
'disabled' => 0,
'onchange' => 'javascript_function',
- #m2 stuff only tested w/selectlayers so far
- #might work w/select too, dunno others
'm2name_table' => 'table_name',
'm2name_namecol' => 'name_column',
#OR#
'm2m_method' =>
#'m2m_srccol' => #opt, if not the same as this table
'm2m_dstcol' => #required for now, eventuaully opt, if not the same as target table
+ #OR#
+ 'o2m_table' =>
'm2_label' => 'Label', #
'm2_new_default' => \@table_name_objects, #default
@@ -235,6 +235,7 @@
% $layer_values = &{ $f->{'layer_values_callback'} }( $cgi, $object )
% if $f->{'layer_values_callback'}
% && ! $f->{'m2name_table'}
+% && ! $f->{'o2m_table'}
% && ! $f->{'m2m_method'};
%
% warn "layer values: ". Dumper($layer_values)
@@ -356,12 +357,15 @@
%
% my $fieldnum = '';
% my $curr_value = '';
-% if ( $f->{'m2name_table'} || $f->{'m2m_method'} ) { #XXX test this for all
-% #types of fields
+% if ( $f->{'m2name_table'} || $f->{'o2m_table'} || $f->{'m2m_method'} ) {
+%
% my($table, $col);
% if ( $f->{'m2name_table'} ) {
% $table = $f->{'m2name_table'};
% $col = $f->{'m2name_namecol'};
+% } elsif ( $f->{'o2m_table'} ) {
+% $table = $f->{'o2m_table'};
+% $col = dbdef->table($f->{'o2m_table'})->primary_key;
% } elsif ( $f->{'m2m_method'} ) {
% $table = $f->{'m2m_method'};
% $col = $f->{'m2m_dstcol'};
@@ -374,8 +378,8 @@
% @existing = &{ $f->{'m2_error_callback'} }( $cgi, $object );
% } elsif ( $object->$pkey() ) { # $mode eq 'edit'||'clone'
% @existing = $object->$table();
-% warn scalar(@existing). " from $object->$table: ". join('/', @existing)
-% if $opt{'debug'};
+% warn scalar(@existing). " from $object->$table: ". join('/', @existing)
+% if $opt{'debug'};
% } elsif ( $f->{'m2_new_default'} ) { # && $mode eq 'new'
% @existing = @{ $f->{'m2_new_default'} };
% }
@@ -459,7 +463,7 @@
% ( $fieldnum ? ('cell_style' => 'border-top:1px solid black') : () ),
% );
%
-% if ( $f->{'m2name_table'} || $f->{'m2m_method'} ) {
+% if ( $f->{'m2name_table'} || $f->{'o2m_table'} || $f->{'m2m_method'} ) {
% $include[0] =~ s(^/elements/tr-)(/elements/);
% my @label = @include;
% $label[0] = '/elements/tr-td-label.html';
@@ -492,7 +496,7 @@
<% include( @include ) %>
% }
-% if ( $f->{'m2name_table'} || $f->{'m2m_method'} ) {
+% if ( $f->{'m2name_table'} || $f->{'o2m_table'} || $f->{'m2m_method'} ) {
<SCRIPT TYPE="text/javascript">
More information about the freeside-commits
mailing list