X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fedit.html;h=d9843471feef14f71e3c4c4075566831b07bb508;hb=8c59634ee0d66d79b27f76818ca5ba41f797359b;hp=0417dc536f09abdbf9cca1439a561840fc642669;hpb=2f70c9917333028f4a869de0a1acef2d29b746f6;p=freeside.git diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 0417dc536..d9843471f 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -2,7 +2,7 @@ Example: - include( 'elements/edit.html', + <& elements/edit.html, 'name_singular' => #singular name for the record # (preferred, will be pluralized automatically) 'name' => #name for the record @@ -182,7 +182,7 @@ Example: #run before display to manipulate element of the 'fields' arrayref 'field_callback' => sub { my( $cgi, $object, $field_hashref ) = @_; }, - ); + &> @@ -260,6 +260,10 @@ Example: % 'maxlength' => $f->{'maxlength'}, % 'postfix' => $f->{'postfix'}, % +% #textarea +% 'rows' => $f->{'rows'}, +% 'cols' => $f->{'cols'}, +% % #checkbox, title, fixed, hidden % #& deprecated weird value hashref used only by reason.html % 'value' => $f->{'value'}, @@ -268,6 +272,7 @@ Example: % 'options' => $f->{'options'}, % 'labels' => $f->{'labels'}, % 'multiple' => $f->{'multiple'}, +% 'label_showkey' => $f->{'label_showkey'}, % 'disable_empty' => $f->{'disable_empty'}, % #select-reason % 'reason_class' => $f->{'reason_class'}, @@ -279,33 +284,29 @@ Example: % % #umm. for select-agent_types at least % 'disabled' => $f->{'disabled'}, -% ); % -% #selectlayers, others? -% $include_common{$_} = $f->{$_} -% foreach grep exists($f->{$_}), -% qw( js_only html_only select_only layers_only cell_style); +% #any? +% 'colspan' => $f->{'colspan'}, +% ); % -% #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 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 ); +% $include_common{$_} = ref( $f->{$_} ) eq 'CODE' +% ? &{ $f->{$_} }( $cgi, $object ) #, $f ) +% : $f->{$_} +% foreach grep exists($f->{$_}), qw( extra_sql ); % % if ( $type eq 'tablebreak-tr-title' ) { % $include_common{'table_id'} = 'TableNumber'. $tablenum++; @@ -342,6 +343,19 @@ Example: % %include_common, % %opt, % ); +% +% if ( $include eq 'tr-input-date-field' ) { +% # it's either hacking it here, or changing a lot more stuff +% @include = ( +% "/elements/$include.html", { +% 'name' => $field, +% 'value' => $opt{curr_value}, +% 'label' => $label, +% 'noinit' => $f->{noinit}, +% } +% ); +% } +% % @include; % }; % @@ -370,6 +384,7 @@ Example: % $g_row = 1 if $type eq 'tablebreak-tr-title'; % $g_row++; % $g_row++ if $type eq 'title'; +% $g_row += scalar( @{ $f->{options} } )-1 if $type eq 'radio'; % } else { % if ( $type eq 'columnstart' ) { % push @g_row_stack, $g_row; @@ -425,7 +440,7 @@ Example: % } % warn "layer values: ". Dumper($layer_values) % if $opt{'debug'}; -% +% % my @existing = &{ $include_sub }( % 'label' => $ex_label, % 'fieldnum' => $fieldnum, @@ -536,7 +551,7 @@ Example: var field_regex = /(\d+)(_[a-z]+)?$/; var match = field_regex.exec(what.name); if ( !match ) { - alert(what.name + " didn't match?!"); + alert(what.name + " didn't match for " + what); return; } if ( match[1] != <%$field%>_fieldnum ) {