--- a/tool/run/plugins/spdx/create.java
+++ b/tool/run/plugins/spdx/create.java
@@ -31,7 +31,6 @@
import script.DownloadBigFile;
import script.RunningTask;
import utils.html;
-import www.Form;
import www.RequestOrigin;
import www.WebRequest;
@@ -50,7 +49,9 @@
final String acceptedExtension =
".tar.gz"
+ ">>"
- + "zip";
+ + "zip",
+ templateFolderHTML = "spdxFolder.html";
+
int interval = 3;
@@ -80,11 +81,11 @@
public void main(WebRequest request){
//request.setPage("spdxDialog.html");
String result = "<html>\n" +
- "<head>\n" +
- "<style type=\"text/css\">body {font-family:verdana,arial,"
- + "sans-serif;font-size:10pt;margin:30px;}</style>"
- + "</head>\n" +
- "\n" +
+// "<head>\n" +
+// "<style type=\"text/css\">body {font-family:verdana,arial,"
+// + "sans-serif;font-size:10pt;margin:30px;}</style>"
+// + "</head>\n" +
+// "\n" +
"<body>"
+ ""
+ "Testing stuff!"
@@ -112,12 +113,10 @@
* @param request
*/
public void mainFolder(WebRequest request){
- // no support for requests from the browser
-// if(request.requestOrigin == RequestOrigin.BROWSER){
-// log.write(is.ERROR, "Support to SPDX creation from folder on disk "
-// + "is not yet implemented");
-// return;
-// }
+
+ // load our template
+ request.setTemplate(templateFolderHTML);
+
// get the value used before
String selectedFolder = settings.read(LastFolderNewSPDX, "");
@@ -127,29 +126,34 @@
selectedFolder = "NONE";
}
- String result =
- html.div()
- + html.h2("Create a new SPDX from folder on disk")
- + "Use this page to create an SPDX document from a given "
- + "folder on your disk. "
- + html.br
- + html.br
- + html.h3("Selected Folder")
- + selectedFolder
- + html.br
-
- + html.br
- + html.link("Choose a folder", "create?x=folder")
-
- + html.br
- + html.br
- + html.link("Start", "create?x=foldercreate")
-
-
- + html._div
- ;
-
- request.setAnswer(result);
+ // add the value of our directory
+ request.changeTemplate("none-template", selectedFolder);
+ // all done
+ request.close();
+
+//
+// String result =
+// html.div()
+// + html.h2("Create a new SPDX from folder on disk")
+// + "Use this page to choose a folder and create an SPDX document"
+// + html.br
+// + html.br
+// + html.h3("Selected Folder")
+// + selectedFolder
+// + html.br
+//
+// + html.br
+// + html.link("Choose a folder", "create?x=folder")
+//
+// + html.br
+// + html.br
+// + html.link("Start", "create?x=foldercreate")
+//
+//
+// + html._div
+// ;
+//
+// request.setAnswer(result);
}