diff options
author | Alexander Tkachev | 2016-07-11 14:44:15 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 29e6020574e1bed81e20cf5ab5df521285d28615 (patch) | |
tree | 03c3661e9c4c30a1bf28628f76748d71bd3e7d11 /backends/networking | |
parent | 2f5138f7959e74606f0b9493ce9523110d2f46dd (diff) | |
download | scummvm-rg350-29e6020574e1bed81e20cf5ab5df521285d28615.tar.gz scummvm-rg350-29e6020574e1bed81e20cf5ab5df521285d28615.tar.bz2 scummvm-rg350-29e6020574e1bed81e20cf5ab5df521285d28615.zip |
CLOUD: Update "/files" hardcoded response template
Diffstat (limited to 'backends/networking')
-rw-r--r-- | backends/networking/sdl_net/handlers/filespagehandler.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp index 4de76b9d07..9dba0c54ad 100644 --- a/backends/networking/sdl_net/handlers/filespagehandler.cpp +++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp @@ -46,7 +46,26 @@ Common::String encodeDoubleQuotes(Common::String s) { } void FilesPageHandler::handle(Client &client) { - Common::String response = "<html><head><title>ScummVM</title></head><body><table>{content}</table></body></html>"; //TODO: add controls + Common::String response = + "<html>" \ + "<head><title>ScummVM</title></head>" \ + "<body>" \ + "<p>{create_directory_desc}</p>" \ + "<form action=\"create\">" \ + "<input type=\"hidden\" name=\"path\" value=\"{path}\"/>" \ + "<input type=\"text\" name=\"directory_name\" value=\"\"/>" \ + "<input type=\"submit\" value=\"{create_directory_button}\"/>" \ + "</form>" \ + "<hr/>" \ + "<p>{upload_file_desc}</p>" \ + "<form action=\"upload?path={path}\" method=\"post\" enctype=\"multipart/form-data\">" \ + "<input type=\"file\" name=\"upload_file[]\" multiple/>" \ + "<input type=\"submit\" value=\"{upload_file_button}\"/>" \ + "</form>" + "<hr/>" \ + "<table>{content}</table>" \ + "</body>" \ + "</html>"; Common::String itemTemplate = "<tr><td><a href=\"{link}\">{name}</a></td><td>{size}</td></tr>\n"; //TODO: load this template too? // load stylish response page from the archive |