Skip to content

Commit

Permalink
Revert "[playframework#1090] - see tikcet [#1737]"
Browse files Browse the repository at this point in the history
This reverts commit 0fafc91.
  • Loading branch information
Notalifeform committed Oct 21, 2013
1 parent e8c9446 commit e29b233
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions framework/src/play/templates/FastTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,13 @@ public static void _form(Map<?, ?> args, Closure body, PrintWriter out, Executab
if (args.containsKey("name")) {
name = args.get("name").toString();
}
String id = args.containsKey("id") ? " id=\"" + args.get("id") + "\"" : "";
String clz = args.containsKey("class") ? " class=\"" + args.get("class") + "\"" : "";

if (!("GET".equals(actionDef.method) || "POST".equals(actionDef.method))) {
String separator = actionDef.url.indexOf('?') != -1 ? "&" : "?";
actionDef.url += separator + "x-http-method-override=" + actionDef.method.toUpperCase();
actionDef.method = "POST";
}
String encoding = Http.Response.current().encoding;
out.print("<form action=\"" + actionDef.url + "\" method=\"" + actionDef.method.toLowerCase() + "\" accept-charset=\""+encoding+"\" enctype=\"" + enctype + "\" " + serialize(args, "action", "method", "accept-charset", "enctype") + (name != null?"name=\"" + name + "\"":"") + id + clz + ">");
out.print("<form action=\"" + actionDef.url + "\" method=\"" + actionDef.method.toLowerCase() + "\" accept-charset=\""+encoding+"\" enctype=\"" + enctype + "\" " + serialize(args, "action", "method", "accept-charset", "enctype") + (name != null?"name=\"" + name + "\"":"") + ">");
if (!("GET".equals(actionDef.method))) {
_authenticityToken(args, body, out, template, fromLine);
}
Expand Down

0 comments on commit e29b233

Please sign in to comment.