diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-20 17:52:10 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-12-20 17:52:10 +0000 |
commit | 3553d308f65a037d7cef2f0c7546db44c23afa14 (patch) | |
tree | 9025f22fdc470dd93bd77b5342ef21650b20b8e8 /libs/web/luasrc/view | |
parent | 8358175f25c1d73002af5a3ae8f9a7d4711bf228 (diff) |
[PATCH] Naive fix for bug #208
For SimpleSection, use the section name (always "1") instead of the
section type in the CBI-like string used to identify the upload. This
allows upload fields to be placed in SimpleSections. The fix changes a
minimal number of lines, but does introduce some unnecessary confusion,
it may or may not be better than a more thorough/invasive fix.
Set the enctype for the form element in the simpleform view to be
multipart/form-data because the default
application/x-www-form-urlencoded does not support input files.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r-- | libs/web/luasrc/view/cbi/simpleform.htm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/web/luasrc/view/cbi/simpleform.htm b/libs/web/luasrc/view/cbi/simpleform.htm index 1a4726a02d..f7c9f33243 100644 --- a/libs/web/luasrc/view/cbi/simpleform.htm +++ b/libs/web/luasrc/view/cbi/simpleform.htm @@ -1,5 +1,5 @@ <% if not self.embedded then %> -<form method="post" action="<%=REQUEST_URI%>"> +<form method="post" enctype="multipart/form-data" action="<%=REQUEST_URI%>"> <div> <script type="text/javascript" src="<%=resource%>/cbi.js"></script> <input type="hidden" name="cbi.submit" value="1" /> |