X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fedit.html;h=17c5ad3ebf75cdda4aa4a78279a45c12d7a274a7;hp=c2ea22f276fa0f7ececb4f839e85faa221f2513b;hb=633c48448d9468690b7ad77eb6ff7c660a286658;hpb=6cb5c702b17b98be46adea4539e15d5f312e5be1 diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index c2ea22f27..17c5ad3eb 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -53,6 +53,9 @@ % # # ... % # "html_string"; % # }, +% # +% # # overrides default popurl(1)."process/$table.html" +% # 'post_url' => popurl(1).'process/something', % % my(%opt) = @_; % @@ -77,9 +80,14 @@ % % } elsif ( $cgi->keywords || $cgi->param($pkey) ) { #editing % -% my( $query ) = $cgi->keywords; -% $query = $cgi->param($pkey) unless $query; -% $query =~ /^(\d+)$/; +% my $value; +% if ( $cgi->param($pkey) ) { +% $value = $cgi->param($pkey) +% } else { +% my( $query ) = $cgi->keywords; +% $value = $query; +% } +% $value =~ /^(\d+)$/ or die "unparsable $pkey"; % $object = qsearchs( $table, { $pkey => $1 } ); % warn "$table $pkey => $1" % if $opt{'debug'}; @@ -129,8 +137,10 @@

% } +% my $url = $opt{'post_url'} || popurl(1)."process/$table.html"; -
+ + <% ( $opt{labels} && exists $opt{labels}->{$pkey} ) ? $opt{labels}->{$pkey}