package to.etc.domuidemo.pages.overview.allcomponents;

import to.etc.domui.component.upload.FileUpload2;
import to.etc.domui.component.upload.FileUploadMultiple;
import to.etc.domui.component2.form4.FormBuilder;
import to.etc.domui.dom.html.Div;
import to.etc.domui.dom.html.HTag;

/**
 * @author <a href="mailto:jal@etc.to">Frits Jalvingh</a>
 * Created on 14-11-17.
 */
public class FileUploadFragment extends Div {
	@Override public void createContent() throws Exception {
		add(new HTag(2, "File upload component").css("ui-header"));

		FormBuilder fb = new FormBuilder(this);
		FileUpload2 u1 = new FileUpload2("png", "jpg", "gif", "jpeg");
		fb.label("Select an image").item(u1);


		FileUploadMultiple u2 = new FileUploadMultiple("png", "jpg", "gif", "jpeg");
		fb.label("Select multiple").item(u2);

		//FileUpload u2 = new FileUpload("png", "jpg", "gif", "jpeg");
		//fb.label("OLD").item(u2);

	}
}

@@ -49,16 +49,67 @@
 nents;%0A%0A
+import to.etc.domui.component.layout.ContentPanel;%0A
 import t
@@ -584,16 +584,68 @@
 er%22));%0A%0A
+%09%09ContentPanel cp = new ContentPanel();%0A%09%09add(cp);%0A%0A
 %09%09FormBu
@@ -675,12 +675,10 @@
 der(
-this
+cp
 );%0A%09

Fix spacing in demo for FileUpload.