/** * Description of the Method * * @param s Description of the Parameter * @return Description of the Return Value */ protected Element makeInput(WebSession s) { Table t = new Table(0).setCellSpacing(0).setCellPadding(0).setBorder(0); TR row1 = new TR(); TR row2 = new TR(); row1.addElement(new TD(new StringElement(WebGoatI18N.get("Title") + ": "))); Input inputTitle = new Input(Input.TEXT, TITLE, ""); row1.addElement(new TD(inputTitle)); TD item1 = new TD(); item1.setVAlign("TOP"); item1.addElement(new StringElement(WebGoatI18N.get("Message") + ": ")); row2.addElement(item1); TD item2 = new TD(); TextArea ta = new TextArea(MESSAGE, 5, 60); item2.addElement(ta); row2.addElement(item2); t.addElement(row1); t.addElement(row2); Element b = ECSFactory.makeButton(WebGoatI18N.get("Submit")); ElementContainer ec = new ElementContainer(); ec.addElement(t); ec.addElement(new P().addElement(b)); return (ec); }
/** * Description of the Method * * @param s Description of the Parameter * @return Description of the Return Value */ protected Element createContent(WebSession s) { ElementContainer ec = new ElementContainer(); Element b = ECSFactory.makeButton("Start the Course!"); ec.addElement(new Center(b)); return (ec); }
/** * Description of the Method * * @param s Description of the Parameter * @return Description of the Return Value */ protected Element makeLogin(WebSession s) { ElementContainer ec = new ElementContainer(); ec.addElement(new H1().addElement("Sign In ")); Table t = new Table() .setCellSpacing(0) .setCellPadding(2) .setBorder(0) .setWidth("90%") .setAlign("center"); if (s.isColor()) { t.setBorder(1); } TR tr = new TR(); tr.addElement( new TH() .addElement( "Please sign in to your account. See the OWASP admin if you do not have an account.") .setColSpan(2) .setAlign("left")); t.addElement(tr); tr = new TR(); tr.addElement(new TD().addElement("*Required Fields").setWidth("30%")); t.addElement(tr); tr = new TR(); tr.addElement(new TD().addElement(" ").setColSpan(2)); t.addElement(tr); TR row1 = new TR(); TR row2 = new TR(); row1.addElement(new TD(new B(new StringElement("*User Name: ")))); row2.addElement(new TD(new B(new StringElement("*Password: "******""); Input input2 = new Input(Input.PASSWORD, PASSWORD, ""); row1.addElement(new TD(input1)); row2.addElement(new TD(input2)); t.addElement(row1); t.addElement(row2); Element b = ECSFactory.makeButton("Login"); t.addElement(new TR(new TD(b))); ec.addElement(t); return (ec); }