Changeset 3794


Ignore:
Timestamp:
Aug 25, 2010, 12:40:11 PM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #698. Adding ProfilePasswordForm and removing getMyProfilePasswordForm(...) method in FormFactory

Location:
trunk/client/servlet/src/org/proteios
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/src/org/proteios/action/user/ChangeMyPassword.java

    r2381 r3794  
    3131import org.proteios.core.DbControl;
    3232import org.proteios.core.User;
    33 import org.proteios.gui.form.Form;
    34 import org.proteios.gui.form.FormFactory;
     33import org.proteios.gui.form.*;
    3534import se.lu.thep.waf.ActionException;
    3635import se.lu.thep.waf.constraints.InvalidParameterValue;
     
    4645      throws ActionException, InvalidParameterValue
    4746  {
    48     Form frm = getFormFactory().getMyProfilePasswordForm(getOwner());
     47    Form frm = new ProfilePasswordForm(getOwner());
    4948    verifyParameters(frm);
    5049    String pwd1 = getValidString(FormFactory.VPWD1);
  • trunk/client/servlet/src/org/proteios/action/user/ViewMyProfileAction.java

    r3598 r3794  
    4141import org.proteios.gui.ColumnContainer;
    4242import org.proteios.gui.RowContainer;
    43 import org.proteios.gui.form.Form;
     43import org.proteios.gui.form.*;
    4444import org.proteios.gui.layout.RowLayout;
    4545
     
    9292    if (!user.isMultiuserAccount())
    9393    {
    94       pwdForm = getFormFactory().getMyProfilePasswordForm(user);
     94      pwdForm = new ProfilePasswordForm(user);
    9595      tb2 = new Toolbar();
    9696      changePassword = getActionFactory().getActionLink(
  • trunk/client/servlet/src/org/proteios/gui/form/FormFactory.java

    r3793 r3794  
    775775
    776776 // Cleaning up from here
    777   public Form getMyProfilePasswordForm(User user)
    778   {
    779     Form form = new Form("myPasswordForm");
    780     Fieldset fs = new Fieldset();
    781     form.addFieldset(fs);
    782     fs.getLegendTitle().setTitle("Password");
    783     TextField<Integer> userIdF = newHiddenItemIdField();
    784     fs.add(userIdF);
    785     if (user != null)
    786       userIdF.setValue(user.getId());
    787     fs.add(new PasswordField(VPWD1).setLabel("Password"));
    788     fs.add(new PasswordField(VPWD2).setLabel("VerifyPassword"));
    789     return form;
    790   }
    791 
    792 
    793777  private TextField<String> newEmailField()
    794778  {
  • trunk/client/servlet/src/org/proteios/gui/form/PasswordField.java

    r3593 r3794  
    3838{
    3939  public static final VString VPWD1 = new VString("pwd1", 1, 32, true);
     40 public static final VString VPWD2 = new VString("pwd2", 1, 32, true);
    4041
    4142  public PasswordField(String id)
     
    4445  }
    4546
    46   public PasswordField(VParameter vpwd1)
     47  public PasswordField(VParameter vpwd)
    4748  {
    48     super(vpwd1);
     49    super(vpwd);
    4950  this.setCharWidth(15);
    5051  }
Note: See TracChangeset for help on using the changeset viewer.