* lib/cgi.rb (CGI#form): fix ruby-bugs-ja:PR#280, add default action.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
87c2982847
commit
eaf7368732
@ -1,3 +1,7 @@
|
|||||||
|
Sun Aug 25 20:10:32 2002 Wakou Aoyama <wakou@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/cgi.rb (CGI#form): fix ruby-bugs-ja:PR#280, add default action.
|
||||||
|
|
||||||
Sat Aug 24 15:32:16 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Sat Aug 24 15:32:16 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* eval.c (call_trace_func): restore source file/line, as trace
|
* eval.c (call_trace_func): restore source file/line, as trace
|
||||||
|
10
lib/cgi.rb
10
lib/cgi.rb
@ -1253,7 +1253,7 @@ convert string charset, and set language to "ja".
|
|||||||
|
|
||||||
The hash keys are case sensitive. Ask the samples.
|
The hash keys are case sensitive. Ask the samples.
|
||||||
=end
|
=end
|
||||||
def form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded")
|
def form(method = "post", action = script_name, enctype = "application/x-www-form-urlencoded")
|
||||||
attributes = if method.kind_of?(String)
|
attributes = if method.kind_of?(String)
|
||||||
{ "METHOD" => method, "ACTION" => action,
|
{ "METHOD" => method, "ACTION" => action,
|
||||||
"ENCTYPE" => enctype }
|
"ENCTYPE" => enctype }
|
||||||
@ -1273,9 +1273,13 @@ The hash keys are case sensitive. Ask the samples.
|
|||||||
end
|
end
|
||||||
if @output_hidden
|
if @output_hidden
|
||||||
hidden = @output_hidden.collect{|k,v|
|
hidden = @output_hidden.collect{|k,v|
|
||||||
"<DIV><INPUT TYPE=HIDDEN NAME=\"#{k}\" VALUE=\"#{v}\"></DIV>"
|
"<INPUT TYPE=HIDDEN NAME=\"#{k}\" VALUE=\"#{v}\">"
|
||||||
}.to_s
|
}.to_s
|
||||||
body += hidden
|
if defined? fieldset
|
||||||
|
body += fieldset{ hidden }
|
||||||
|
else
|
||||||
|
body += hidden
|
||||||
|
end
|
||||||
end
|
end
|
||||||
super(attributes){body}
|
super(attributes){body}
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user