X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fedit.html;h=3eb75f85f00a0843ec80a6f4007c5a6deab6b0a8;hb=bf951595745feebeebc8acf91a5cf846c22c6533;hp=8dd15dcfb973c96e5b2b4caddf9b280a576141d0;hpb=a2ecb1cf6a6c084c521710f1256da082f70ba9e5;p=freeside.git diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 8dd15dcfb..3eb75f85f 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -240,6 +240,7 @@ Example: % my $url = $opt{'post_url'} || popurl(1)."process/$table.html"; +% $js_form_validate = { 'edit_topform' => { 'name' => 'edit_topform', 'errormessage' => 'Please only numeric characters ' } };
- + <% defined($opt{'form_init'}) ? ( ref($opt{'form_init'}) @@ -372,6 +373,7 @@ Example: % qw( alt_format ), #select-cust_location % qw( classnum ), # select-inventory_item % qw( aligned ), # columnstart +% qw( debug ), # select-table % ; % % #select-table @@ -407,6 +409,12 @@ Example: % $include_common{'layer_prefix'} = "$field$fieldnum." % if $layer_prefix_on; % +% ## set conditionname field values for validation. +% if ($field eq 'conditionname') { +% my $validate_field = $field . $fieldnum . '.after_event.run_delay'; +% $js_form_validate->{edit_topform}{$validate_field} = 'numeric'; +% } +% % my @include = % ( "/elements/$include.html", % 'field' => "$field$fieldnum", @@ -833,7 +841,11 @@ Example: : $opt{'html_foot'} %> - <% include("/elements/footer.html") %> +% my %footerdata = ( +% 'formvalidation' => $js_form_validate, +% ); + + <% include("/elements/footer.html", %footerdata) %> % } <%init> @@ -851,6 +863,8 @@ my $fields = $opt{'fields'} || [ grep { $_ ne $pkey } fields($table) ]; #my @actualfields = map { ref($_) ? $_->{'field'} : $_ } @$fields; +my $js_form_validate = {}; + my( $mode, $object); my $clone = ''; if ( $opt{'embed'} ) {