diff options
author | jeff <jeff> | 2006-10-18 23:07:08 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-10-18 23:07:08 +0000 |
commit | 52281cbeaf8d4e02345eca3c1aa0500133823558 (patch) | |
tree | c0174e1f4b9fb952c7976db92d464b74d82cf11f /httemplate/edit/elements | |
parent | 609fe46a015c92be8a93c1b05a2fb67133bfd22b (diff) |
suspension and cancellation reasons
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r-- | httemplate/edit/elements/edit.html | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index ac00fc5f0..750e62f97 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -71,9 +71,10 @@ % &{$opt{'error_callback'}}($cgi, $object) % if $opt{'error_callback'}; % -% } elsif ( $cgi->keywords ) { #editing +% } elsif ( $cgi->keywords || $cgi->param($pkey) ) { #editing % % my( $query ) = $cgi->keywords; +% $query = $cgi->param($pkey) unless $query; % $query =~ /^(\d+)$/; % $object = qsearchs( $table, { $pkey => $1 } ); % warn "$table $pkey => $1" @@ -99,6 +100,9 @@ % % my $title = "$action $opt{'name'}"; % +% my $viewall_url = $p . ( $opt{'viewall_dir'} || 'search' ) . "/$table.html"; +% $viewall_url = $opt{'viewall_url'} if $opt{'viewall_url'}; +% % my @menubar = (); % if ( $opt{'menubar'} ) { % @menubar = @{ $opt{'menubar'} }; @@ -106,8 +110,7 @@ % @menubar = ( % 'Main menu' => $p, #eventually get rid of this when the ACL/UI update is done % #eventually use Lingua::bs to pluralize -% "View all $opt{'name'}s" => $p. ( $opt{'viewall_dir'} || 'search' ). -% "/$table.html", +% "View all $opt{'name'}s" => $viewall_url, % ); % } % @@ -158,12 +161,28 @@ <TD BGCOLOR="#dddddd"><% $f->{'value'} %></TD> <INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% $f->{'value'} %>"> +% } elsif ( $type eq 'fixedhidden' ) { + + + <INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% $f->{'value'} %>"> % } elsif ( $type eq 'checkbox' ) { <TD> <INPUT TYPE="checkbox" NAME="<% $field %>" VALUE="<% $f->{'value'} %>" <% $object->$field() eq $f->{'value'} ? ' CHECKED' : '' %>> </TD> +% } elsif ( $type eq 'select' ) { + <TD> + <SELECT NAME="<% $field %>" +% my $aref = $f->{'value'}{'values'}; +% my $vkey = $f->{'value'}{'vcolumn'}; +% my $ckey = $f->{'value'}{'ccolumn'}; +% foreach my $v (@$aref) { + <OPTION <% ($object->$field() eq $v->$vkey) ? 'SELECTED' : '' %> + VALUE="<% $v->$vkey %>"><% $v->$ckey %></OPTION> +% } + </SELECT> + </TD> % } else { |